A sample mean is itself a random variable: take another sample and you get a different value. Knowing how it varies is what makes it possible to say anything about the population from a single sample.
The sampling distribution of the mean
If a population has mean μ and variance σ2, then for samples of size n:
E(Xˉ)=μVar(Xˉ)=nσ2
The standard deviation of Xˉ is called the standard error:
SE=nσ
For μ=100, σ=15 and n=25:
SE=515=3
So sample means cluster around 100 with a standard deviation of 3 — five times tighter than individual values.
If the population is normal, Xˉ is exactly normal:
Xˉ∼N(μ,nσ2)
Find P(Xˉ>103) in the example above.
z=3103−100=1P(Z>1)=1−0.8413=0.1587
The Central Limit Theorem
For a sufficiently large sample, the distribution of Xˉ is approximately normal whatever the shape of the population.
In practice n≥30 is taken as sufficient, and less is needed when the population is already roughly symmetric.
This is what makes normal-based methods so widely applicable: the population may be skewed, discrete or oddly shaped, and the sample mean is still approximately normal.
Unbiased estimators
An estimator is unbiased if its expected value equals the parameter it estimates.
E(Xˉ)=μso xˉ is an unbiased estimator of μ
For the variance the natural formula is biased — it systematically underestimates, because the deviations are measured from the sample's own mean rather than the true one. Dividing by n−1 corrects it:
s2=n−1∑(x−xˉ)2=n−11(∑x2−n(∑x)2)
Confidence intervals
A confidence interval gives a range of plausible values for μ:
xˉ±znσ
Confidence level
z
90%
1.645
95%
1.96
99%
2.576
A sample of 64 has mean 50, from a population with σ=8. Find a 95% confidence interval for μ.
SE=648=150±1.96(1)=(48.04,51.96)
At 99% confidence the same data gives
50±2.576(1)=(47.42,52.58)
— a wider interval, because more confidence demands more room.
When σ is unknown and the sample is small, s replaces σ and the t-distribution replaces the normal — the subject of the next topic.
Interpreting a confidence interval
The correct statement is:
If many samples were taken and an interval constructed from each in this way, about 95% of those intervals would contain the true μ.
The incorrect statement, and the one most often written:
There is a 95% probability that μ lies in this interval.
μ is a fixed number, not a random one. Either it is in this particular interval or it is not; the probability refers to the procedure, not to this single result.
Choosing a sample size
The margin of error is the half-width:
E=znσ⇒n=(Ezσ)2
How large a sample gives a margin of error of 1 at 95% confidence, with σ=8?