AP subjects/AP Statistics/Central Limit Theorem Simulator
CED 4.1AP Statistics

Central Limit Theorem Simulator

Use this free Central Limit Theorem simulator to draw thousands of random samples from a skewed, uniform, bimodal or Normal population and watch the sampling distribution of xˉ\bar{x} take shape. Compare what you see with the theory: mean μ\mu, standard deviation σ/n\sigma/\sqrt{n}, and a shape that turns approximately Normal as n grows.

Controls
nsliderresetBtn

How to use the simulator

There are two panels, both on a 0 to 10 scale. The top panel (coral) is the population you sample from, with a dashed line and a label at its mean μ. The bottom panel (teal) is the sampling distribution of x̄: every sample you draw adds one sample mean to it. A navy Normal curve with mean μ and standard deviation σ/√n is drawn over the bars, and a dashed coral line marks the average of the sample means so far.
  • Population shape: Right-skewed (default), Uniform, Bimodal or Normal.
  • Sample size n: a slider from 2 to 100 in steps of 1 (default 30).
  • Draw 1, Draw 10, Draw 100, Draw 1000: take that many new random samples of size n and add their means to the bottom panel.
  • Reset: clears the sample means.
The readout lists samples drawn, population μ, mean of x̄ (observed), SD of x̄ (observed) and σ/√n (predicted SE), all to three decimal places.
Changing the shape or moving the n slider clears every sample drawn so far, so set n first and then draw. The population's μ and σ are estimated from 40,000 random values each time you choose a shape, so the third decimal can shift slightly from one visit to the next. Draw at least 1000 samples before comparing the observed values with the predictions.

The key ideas

For random samples of size n from a population with mean μ\mu and standard deviation σ\sigma:
μxˉ=μσxˉ=σn\mu_{\bar{x}} = \mu \qquad \sigma_{\bar{x}} = \frac{\sigma}{\sqrt{n}}
  • The mean of xˉ\bar{x} equals μ\mu for every n, so xˉ\bar{x} is an unbiased estimator.
  • The formula σ/n\sigma/\sqrt{n} needs independent observations. When you sample without replacement, check the 10% condition: n is at most 10% of the population.
  • The Central Limit Theorem covers the shape. When n is large, the sampling distribution of xˉ\bar{x} is approximately Normal even if the population is not. The usual AP guideline is n≥30n \ge 30.
  • If the population is Normal, xˉ\bar{x} is exactly Normal for every n, so no large sample is needed.
  • Because of the square root, you must multiply n by 4 to halve the standard deviation of xˉ\bar{x}.
Keep three distributions apart. The population never changes, one sample's data look roughly like the population, and only the sampling distribution of x̄ (the bottom panel) narrows and becomes bell-shaped as n grows.

Worked example

Problem: Waiting times at a coffee counter are strongly skewed to the right, with mean μ=2\mu = 2 minutes and standard deviation σ=2\sigma = 2 minutes. A random sample of 30 customers is taken. Find the probability that their mean wait is more than 2.5 minutes.
Step 1: Check the conditions. The sample is random. Thirty customers is less than 10% of all customers, so the observations are close to independent. The population is skewed, but n=30n = 30 is large enough for the Central Limit Theorem to say xˉ\bar{x} is approximately Normal.
Step 2: Describe the sampling distribution. μxˉ=2\mu_{\bar{x}} = 2 and σxˉ=2/30=0.365\sigma_{\bar{x}} = 2/\sqrt{30} = 0.365 minutes.
Step 3: Standardize. z=2.5−20.365=1.37z = \dfrac{2.5 - 2}{0.365} = 1.37, so P(xˉ>2.5)=P(Z>1.37)≈0.085P(\bar{x} > 2.5) = P(Z > 1.37) \approx 0.085.
Interpretation: about 8.5% of random samples of 30 customers would have a mean wait above 2.5 minutes. A Normal model would not work for one customer's wait, because individual times are skewed.
Check it in the simulator: the Right-skewed population is close to this one. It is exponential with mean about 2, with values capped at 10, so the readout shows μ ≈ 1.99 and a slightly smaller σ of about 1.93. At n = 30 the predicted SE reads about 0.353. Press Draw 1000 twice: the observed SD of x̄ should land close to that, and the bars should follow the navy curve. Then set n = 2 and draw 1000 more. The predicted SE grows to about 1.366 and the pile of means is still clearly skewed right.

Common mistakes on the AP exam

  • Saying the population or the sample becomes Normal. The CLT is about the sampling distribution of x̄ only. A larger sample just shows the population's shape more clearly.
  • Using σ instead of σ/√n. For a probability about one individual, use σ. For a probability about a sample mean, use σ/√n.
  • Applying the CLT to a small sample from a skewed population. With n = 5 from a strongly skewed population, a Normal calculation for x̄ is not justified.
  • Citing "n ≥ 30" with no context. Write the check in full: "n = 30 ≥ 30, so by the Central Limit Theorem the sampling distribution of the sample mean wait is approximately Normal."
  • Mixing up the two conditions. The 10% condition protects independence (the σ/√n formula). The large-sample condition protects shape (the Normal model).

When the AP exam uses this

This is topic 4.1, Sampling Distributions for Sample Means, the opening topic of Unit 4 (Inference for Quantitative Data: Means). The mean and standard deviation of x̄ are on the formula sheet. You will use them for probability questions about a sample mean, and the CLT later justifies the Normal/Large Sample condition for every t procedure in the unit.
Embed this simulator on your class page

Free for classroom use. Paste this into your site, LMS page or blog; keep the credit link under it.