You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Central Limit Theorem
This is an interactive tool to illustrate the Central Limit Theorem. It lets you take random samples from different distributions and see how the distribution of sample means gradually approaches a normal curve.
Features
- Several distributions to choose from: Normal, Uniform, Exponential, Bernoulli, Poisson, and Student’s t
- Adjustable distribution parameters (e.g. mu, sigma, lambda, p, nu)
- Sliders to set:
- sample size per trial (n)
- total number of sample means (M)
- number of means added per animation step
- Two plots shown side by side:
- Population vs the current sample
- Histogram of sample means with the matching normal curve
- Start, pause, and reset controls for running the animation
Why use it?
This script is handy for teaching or reviewing probability and statistics. It provides a clear, real-time demonstration of the CLT and shows that the result holds regardless of the shape of the original distribution.
How to run
Just type:
clt_demo
Pick a distribution, adjust the sliders, and press Start to watch the convergence in action.
Notes
- No special toolboxes required.
- The layout is simple enough to use in lectures or as a self-study aid.
Cite As
B.R.P (2026). Central Limit Theorem Demo (https://www.mathworks.com/matlabcentral/fileexchange/182173-central-limit-theorem-demo), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0 (3.51 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0 |
