Skip to content
Tutorials Center
My learning

Topics

Lesson 32 of 37 · Sampling and Inference Basics

Sampling Distributions and the Central Limit Theorem

See how sample means vary, why their spread is sigma over root n, and why they look normal even when the population does not. Includes simulations.

Take a sample and compute its mean. Take another sample from the same population and the mean will be a little different. If you repeated this thousands of times, the sample means themselves would form a distribution. This is the sampling distribution of the mean. Its shape and spread are what allow us to say how far a sample mean is likely to be from the true mean.

This lesson relies on the ideas in populations and samples and on the normal distribution.

Two facts about the sample mean

Suppose a population has mean μ and standard deviation σ, and you draw independent random samples of size n. Then the sample mean x̄ has:

Text
mean of x̄  = μ                 (the sample mean is unbiased)
sd of x̄    = σ / √n            (called the standard error)

The standard error shrinks as n grows, but slowly: to halve it you need four times as many observations.

The Central Limit Theorem (CLT)

For a large enough sample, the sampling distribution of x̄ is approximately normal, whatever the shape of the population (provided it has a finite mean and standard deviation). So:

Text
x̄ ≈ N( μ, (σ/√n)² )

A common rule of thumb is n ≥ 30 for moderately skewed populations; heavily skewed ones need more, and populations that are already normal need none.

Seeing it: a skewed population

An exponential distribution (the waiting time between random events) is strongly right-skewed. With mean 1 it also has standard deviation 1. For samples of size 30, the standard error should be 1/√30 ≈ 0.1826.

Python Sampling distribution of the mean for skewed data

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The left plot is strongly skewed; the right one is close to a symmetric bell shape, centred at 1.

Effect of sample size

Python Standard error as n grows

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The two columns should agree closely. For n = 1 the "mean" is just one observation, so the distribution is still the original skewed one; the bell shape appears gradually.

flowchart LR
  P["Population<br/>(any shape)"] --> S["Many samples<br/>of size n"]
  S --> M["Sample means"]
  M --> N["Approximately normal<br/>mean μ, sd σ/√n"]

The CLT says the middle box tends toward a bell curve as n grows.

Using the CLT: a probability

A machine fills bags with mean 500 g and standard deviation 10 g. For a sample of 25 bags, the standard error is 10/√25 = 2 g. What is the probability that the sample mean is below 497 g?

Text
z = (497 - 500) / 2 = -1.5,  P(x̄ < 497) = Φ(-1.5) ≈ 0.0668

The assumption here is that individual bag weights are roughly normal (so the result holds at n = 25) or that n is large enough for the CLT.

Python Probability for a sample mean

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Standard deviation (σ) describes how individual values vary. Standard error (σ/√n) describes how sample means vary. They are not the same.

Sampling distribution of a proportion

For a sample proportion p̂ with true proportion p, the mean of p̂ is p and the standard error is √(p(1-p)/n). For large samples (with np and n(1-p) both at least about 10), p̂ is approximately normal.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. A population has σ = 12. What is the standard error of the mean for samples of size 36?

    σ/√n = 12/6 = 2.
  2. 2. The Central Limit Theorem says that for large n the distribution of x̄ is approximately...

    Regardless of the population's shape, sample means become approximately normal as n grows.
  3. 3. To cut the standard error in half you need a sample size that is...

    SE = σ/√n. Multiplying n by 4 multiplies √n by 2, halving SE.
  4. 4. Which describes the standard error?

    It is the standard deviation of the sampling distribution.

Summary

  • The sampling distribution of x̄ has mean μ and standard error σ/√n.
  • By the CLT it is approximately normal for large n, whatever the population shape.
  • Bigger samples give smaller standard errors, at a diminishing rate.
  • This lets you compute probabilities for sample means and, next, build confidence intervals.

Next: Confidence Intervals