The sample mean as a random variable
Take a sample of n values, , , up to , each drawn at random from a population with mean and variance . Their mean is , read “X-bar”.
Each is a random variable with mean and variance , and X̄ is a random variable too: a different sample gives a different value. Its mean and its variance can be worked out from , and n.
The mean of X̄ is
Expected values add, so . Dividing the total by n divides its expected value by n, so .
On average, then, the sample mean equals the population mean. A single sample mean can be too high or too low, but it does not tend to miss in either direction. An estimate with this property is called unbiased, and X̄ is an unbiased estimator of .
One dice and two
Roll a fair dice. The score X is 1, 2, 3, 4, 5 or 6, each with probability , so . Its variance is .
Now roll two dice and take the mean of the two scores. There are 6 × 6 = 36 equally likely outcomes, and the mean can be 1, 1.5, 2, and so on up to 6. Only one outcome gives a mean of 1 (two ones), but six outcomes give 3.5. The mean of two dice is still centered on 3.5, and it is far more likely to be near 3.5 than a single score is.
Working through all 36 outcomes, the variance of the mean of two dice is . That is exactly half of : with n = 2, the variance has been divided by 2.
One dice: each score from 1 to 6 has probability .
The mean of two dice, in steps of 0.5 from 1 to 6, counted out of the 36 outcomes: 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1. The center is still 3.5, and the ends are now rare.
The variance of X̄ is
When the values in the sample are independent, their variances add: Var.
Dividing a random variable by n divides its variance by , because variance is measured in squared units: if every value is divided by n, every squared distance from the mean is divided by . So Var. One n cancels, and Var.
For the two dice, , the value found from the 36 outcomes.
One egg and twenty-five
The masses of eggs from a farm are normally distributed with mean 62 g and standard deviation 5 g, so . For the mean mass of 25 eggs, E(X̄) = 62 g and Var(X̄) = 25 ÷ 25 = 1, so the standard deviation of X̄ is .
About a third of single eggs, a proportion of 0.317, weigh more than 5 g away from 62 g. The mean of 25 eggs is more than 2 g away from 62 g with probability only 0.046.
The low, wide dashed curve is the mass of one egg, with standard deviation 5 g. The tall gold curve is the mean of 25 eggs, with standard deviation 1 g. Both are centered on 62 g, and each encloses an area of 1.
Larger samples, tighter estimates
Because n is in the denominator, every extra observation makes Var(X̄) a little smaller. With , a sample of 4 gives Var(X̄) = 36 ÷ 4 = 9, a sample of 9 gives 36 ÷ 9 = 4, and a sample of 36 gives 36 ÷ 36 = 1.
The standard deviation of X̄ is the square root: 3, then 2, then 1. Going from 4 readings to 36, nine times as many, divides the variance by 9 but the standard deviation only by 3. The spread shrinks with the square root of n. The standard deviation of X̄, , is called the standard error.
When the values are not independent
The variances add only when the values in the sample are independent. That holds when sampling with replacement, and very nearly holds when the sample is a small part of a large population.
Drawing without replacement from a small population breaks it. The ten scores 3, 5, 4, 8, 2, 6, 5, 7, 4 and 6 have mean 5 and variance 3. The means of all 210 samples of four, drawn without replacement, do average 5, as says. But their variance is 0.5, not 3 ÷ 4 = 0.75: once the 8 is in a sample it cannot be drawn again, and that makes extreme samples rarer still.
The usual mistakes
Keeping the population variance. is the variance of one value; the mean of n values has variance .
Dividing the variance by and stopping. The variances add to first, so dividing by leaves .
Dividing the standard deviation by n. It is the variance that is divided by n; the standard deviation is divided by . For the eggs, , not .
Worked example: Eggs from a Farm Weighed One at a Time and Twenty-Five at a Time
Question The masses of eggs from a farm are normally distributed with mean 62 g and standard deviation 5 g. An inspector weighs a random sample of 25 eggs and works out their mean mass, X grams. (a) Find E(X) and Var(X). (b) Using Φ(2) = 0.9772 and Φ(0.4) = 0.6554, find the probability that the mean mass of the sample is less than 60 g, and compare it with the probability that a single egg is less than 60 g.
1.The mean of the sample has the same expected value as a single egg: E(X) = μ = 62 g.
The mean of 25 eggs is centered on the same 62 g as one egg: E(X) = 62. 2.(a) Var(X) = σ2n = 5225 = 2525 = 1. So E(X) = 62 and Var(X) = 1, and the standard deviation of the mean is √1 = 1 g.
(a) Var(X) = 5225 = 1, so the curve for the mean is 5 times as narrow as the curve for one egg. 3.The masses are normal, so X ∼ N(62, 1). Standardize with the standard deviation of the mean: z = 60 − 621 = −2, so P(X < 60) = 1 − Φ(2) = 1 − 0.9772 = 0.0228.
The shaded tail of the mean's curve: P(X < 60) = 1 − Φ(2) = 0.0228. 4.For a single egg the standard deviation is 5 g: z = 60 − 625 = −0.4, so P(X < 60) = 1 − Φ(0.4) = 1 − 0.6554 = 0.3446.
For one egg, 60 g is only 0.4 standard deviations below the mean: P(X < 60) = 0.3446. 5.(b) The mean of the sample is below 60 g with probability 0.0228, while a single egg is below 60 g with probability 0.3446, about 15 times as likely. Check: the curve for the mean is 5 times as narrow, so 60 g is 2 of its standard deviations below 62 g, rather than 0.4 of them.
(b) The mean of the sample is below 60 g with probability 0.0228, a single egg with probability 0.3446.
Answer: (a) E(X) = 62 g and Var(X) = 1; (b) P(X < 60) = 0.0228, against 0.3446 for a single egg
Common mistakes
- Standardizing the sample mean with σ = 5 and getting 0.3446. That is the probability for a single egg; the mean of 25 eggs has standard deviation 5√25 = 1 g.
- Dividing the standard deviation by 25 instead of by √25. It is the variance that is divided by n; the standard deviation is divided by √n = 5.