Menu

The Central Limit Theorem

The Central Limit Theorem

The Central Limit Theorem (CLT) states that the distribution of sample means approaches a normal distribution as the sample size grows, regardless of the original data's shape. The data itself can be skewed or irregular.

What the Theorem Gives You

For samples of size n drawn from a population with mean μ and standard deviation σ:

  • The mean of the sample means is μ.
  • The standard deviation of the sample means is σ / √n, the standard error.
  • The shape approaches a normal curve as n increases.

A sample size of about 30 or more is a common rule of thumb. Heavily skewed data may need a larger sample, while data already close to normal needs less.

Why It Matters

Normal-based tools such as confidence intervals and z-tests assume the sample mean is roughly normal. The CLT lets us use them even when the data isn't normal.

Example: Time spent on an app has a mean of 10 minutes and a standard deviation of 8 minutes, and the data is right-skewed. For a sample of 64 users, what is the probability that the sample mean exceeds 12 minutes?

  1. SE = 8 / √64 = 1
  2. z = (12 − 10) / 1 = 2
  3. P(Z > 2) ≈ 1 − 0.9772 = 0.0228

There is about a 2.3% chance of seeing a sample mean above 12 minutes.

import numpy as np

rng = np.random.default_rng(1)
data = rng.exponential(scale=10, size=100000)
means = [rng.choice(data, 50).mean() for _ in range(2000)]
print(np.mean(means), np.std(means))

Code Explanation:

  • We create a large, skewed dataset from an exponential distribution with a mean of 10.
  • We draw 2,000 random samples of size 50 and store each mean.
  • The average of those means comes out close to 10.
  • Their standard deviation is close to 10 / √50, about 1.41, and a histogram of means looks bell-shaped.

Probability and Statistics for Data Science

AP

Abhishek Pati



Learn via Video Course

Probability and Statistics for Data Science Logo

Probability and Statistics for Data Science

4 hrs



Get in Touch For Details