Login
📚 Python for Introductory Statistics
Chapters ▾

9.3 Central Limit Theorem

Watch demo video

The sampling distribution of the sample mean is the probability distribution for the possible values of the mean that results when random sample of size n are repeatedly drawn from the population with mean μ and standard deviation σ.

When the sample size is large or the samples are drawn from a population that is normally distributed with mean μ and standard deviation σ, the sampling distribution of the sample mean x¯ is approximately normal with mean μ and standard deviation of σn

Example: A normally distributed population has a mean of 90 and a standard deviation of 15. Samples of size n = 25 are drawn randomly from the population and the mean is computed.

P ( x ¯ < 85 ) = stats.norm.cdf(85,90,15/25**.5)

from scipy import stats
stats.norm.cdf(85,90,15/25**(1/2))
Show expected output
0.0477903522728147

Interpretation: P(x¯<85)=0.0477903522728147

Example: A normally distributed population has a mean of 90 and a standard deviation of 15. Samples of size n = 25 are drawn randomly from the population and the mean is computed.

P ( 85 < x ¯ < 92 ) = P ( x ¯ < 92 ) P ( x ¯ < 85 )

= s t a t s . n o r m . c d f ( 92 , 90 , 15 25 ) s t a t s . n o r m . c d f ( 85 , 90 , 15 25 )

from scipy import stats
stats.norm.cdf(92,90,15/25**.5)-stats.norm.cdf(85,90,15/25**.5)
Show expected output
0.6997171101802624

Interpretation: P(85<x¯<92)=0.6997171101802624

Example: The mean age of tablet device users is 34 years. Suppose the standard deviation is 15 years. If a random sample of size n = 100 is drawn from this population:

P ( x ¯ > 30 ) = 1 P ( x ¯ < 30 ) = 1 stats.norm.cdf ( 30 , 34 , 15 100 )

from scipy import stats
1-stats.norm.cdf(30,34,15/100**.5)
Show expected output
0.9961696194324102

Interpretation: P(x¯>30)=0.9961696194324102

95 t h  percentile = stats.norm.ppf ( .95 , 34 , 15 100 )

from scipy import stats
stats.norm.ppf(.95,34,15/100**.5)
Show expected output
36.46728044042721

Interpretation: Ninety-five percent of the sample means are less than or equal to 36.46728044042721

Example

The average score for an IQ test is 100 with a standard deviation of 15. Assume the test scores are normally distributed.

  1. If a random sample of 25 test scores is selected from this population, what is the probability that the sample mean is between 90 and 110.
  2. Find the 95th percentile for the sample mean score.
from scipy import stats
stats.norm.cdf(110,100,15/(25**.5))-stats.norm.cdf(90,100,15/(25**.5))
Show expected output
0.9991418793336064

Interpretation: The probability that the mean is between 90 and 110 is 0.9991418793336064. That is, P(90<x¯<110)=0.9991418793336064

from scipy import stats
stats.norm.ppf(.95,100,15/(25**.5))
Show expected output
104.93456088085442

Interpretation: 95 percent of the test scores are less than or equal to 104.93456088085442.

Adapted from Python for Introductory Statistics, by Simon Aman (Truman College, City Colleges of Chicago), licensed under CC BY 4.0. Changes were made: reformatted as an accessible XYZ web edition with live in-browser code cells. License: CC-BY-4.0.