Sampling distribution of a sample mean
A coffee roaster’s machine leaves about one bag in four under 12 ounces. Why, then, is a sample of 9 bags that averages under 12 ounces a sign that the machine has gone wrong?
Where you are 7 in Sampling distributions
Why this exists
A coffee roaster’s machine fills bags labeled 12 ounces. No machine is exact: from bag to bag the fill weight varies. The roaster cannot weigh every bag, so each day it weighs a random sample and looks at the sample mean \bar{x}. A low \bar{x} might be bad luck or a machine that has drifted. Telling the two apart needs one thing: how \bar{x} varies from sample to sample when the machine is working as it should. That pattern is the sampling distribution of the sample mean, one case of the general idea in Sampling distributions.
The The central limit theorem showed that for large random samples this pattern is close to normal, centered at \mu with standard deviation \displaystyle \sigma/\sqrt{n}. This lesson turns that into a working tool. Day 1 is the center and spread of \bar{x}, when they hold, and normal calculations for a population that is itself normal. Day 2 is the condition for using a normal model when the population’s shape is not known: a population known to be normal, or a sample large enough, judged from a plot of the sample as in Checking whether data look normal.
The roaster, its people and every number here are made up. Arben, Besnik and Drita work there.
Definition
Fix a population with mean \mu and standard deviation \sigma, and a sample size n. The sampling distribution of the sample mean is the distribution of the values \bar{x} takes over all possible random samples of size n from that population. Its mean is written \mu_{\bar{x}} and its standard deviation \sigma_{\bar{x}}.
Three different distributions are in play, and the symbols keep them apart:
| distribution of | values | center | spread |
|---|---|---|---|
| the population | one bag at a time | \mu | \sigma |
| one sample’s data | the n bags weighed | \bar{x} | s_x |
| the sampling distribution | \bar{x} over all samples of size n | \mu_{\bar{x}} | \sigma_{\bar{x}} |
The roaster’s model for one bag: fill weights roughly normal, \mu = 12.10 ounces, \sigma = 0.15 ounce.
Intuition
One light bag is common. A light sample mean is not, because for the mean of 9 bags to fall below 12.00 ounces, the 9 must be light on balance, several of them at once, and a light bag is usually paired with an ordinary or heavy one that pulls the mean back. Averaging lets the bag-to-bag errors cancel, partly, so the means crowd closer to \mu than single bags do. Figure 1 draws both on one scale.
The cancelling is only partial. Nine bags do not cut the spread to a ninth; they cut it to a third, \displaystyle \sigma/\sqrt{9}. The square root comes from the way spreads combine, shown below in “Why it is true”. Both curves are bells here because fill weights are normal; for a population that is not normal, the shape of \bar{x} is the separate question of Day 2.
Results
Day 1: center and spread
For a random sample of size n from a population with mean \mu and standard deviation \sigma:
The center holds for every random sample, so \bar{x} is an Bias and variability of an estimator of \mu. The spread needs independent observations: sampling with replacement, or without replacement with n at most 10\% of the population (The ten percent condition).
If the population is normal, \bar{x} is exactly normal for every n, and its chances come from
and the standard normal areas of Normal calculations: areas and percentiles.
Day 2: the normal condition for a mean
A normal model for \bar{x} may be used when either
- the population is known to be normal (any n), or
- the sample is large enough for the The central limit theorem. A common guide is n \ge 30, larger for a strongly skewed population.
When the population’s shape is not known, the sample’s own plot is the evidence. These cutoffs are rules of thumb, not theorems: how large n must be depends on how far the population is from normal, which is the very thing not known. A common guide:
- n under about 15: use the normal model only if the plot looks close to symmetric with no outliers.
- n from about 15 to 30: the model is reasonable unless the plot shows strong skew or outliers.
- n of 30 or more: moderate skew is fine; extreme skew or far outliers still call for care, or a larger sample.
The formulas \mu_{\bar{x}} = \mu and \displaystyle \sigma_{\bar{x}} = \sigma/\sqrt{n} do not depend on this condition: it is only about shape.
Why it is true
Center. The mean of a sum is the sum of the means, so X_1 + \cdots + X_n has mean n\mu, and dividing by n gives \mu_{\bar{x}} = \mu.
Spread. For independent observations, variances add, so the sum has variance n\sigma^2. Dividing a variable by n divides its variance by n^2:
It is the variances, not the standard deviations, that add. That is why n bags shrink the spread by \displaystyle \sqrt{n} rather than by n.
Shape, normal population. A sum of independent normal variables is normal (Normal random variables), and dividing by n rescales it, so \bar{x} is normal at every n. For any other population the normal shape is only approximate, and the The central limit theorem says how it improves as n grows.
Worked examples
Normal areas use z rounded to two decimal places and \Phi(z), the area to the left of z under the standard normal curve. For a negative z, \Phi(-z) = 1 - \Phi(z).
| z | \Phi(z) | z | \Phi(z) |
|---|---|---|---|
| 0.67 | 0.7486 | 1.83 | 0.9664 |
| 0.79 | 0.7852 | 1.94 | 0.9738 |
| 0.88 | 0.8106 | 1.96 | 0.9750 |
| 1.00 | 0.8413 | 2.00 | 0.9772 |
| 1.33 | 0.9082 | 2.12 | 0.9830 |
| 1.51 | 0.9345 | 2.67 | 0.9962 |
| 1.60 | 0.9452 | ||
| 1.67 | 0.9525 |
Cutoffs: \Phi(1.282) = 0.900, \Phi(2.326) = 0.990, \Phi(2.576) = 0.995, \Phi(3.090) = 0.999.
Day 1: center and spread of the mean of 9 bags
Drita, who runs quality checks, weighs a random sample of 9 bags from each day’s run of 2{,}400 bags. Find the mean and standard deviation of \bar{x}, check the condition the spread formula needs, and say what the numbers mean.
SolutionThe center is the population mean, since \bar{x} is unbiased:
The bags are drawn without replacement, so the spread formula needs the ten percent condition: 9 \le 0.10(2{,}400) = 240. It holds, so
In context: over all possible samples of 9 bags from a run, the sample means average 12.10 ounces, and a typical sample mean misses 12.10 by about 0.05 ounce. A single bag typically misses by about 0.15, three times as much.
Day 1: one light bag against a light mean
Find the chance that one bag weighs less than 12.00 ounces, and the chance that the mean of Drita’s 9 bags is less than 12.00 ounces, when the machine is on target.
SolutionOne bag. Fill weights are normal with \mu = 12.10 and \sigma = 0.15:
so P(X < 12.00) \approx \Phi(-0.67) = 1 - 0.7486 = 0.2514. About one bag in four is under 12.00 ounces.
The mean of 9. The population is normal, so \bar{x} is exactly normal, with mean 12.10 and standard deviation 0.05 from Example 1. Standardize against the distribution of \bar{x}, not of one bag:
so P(\bar{x} < 12.00) = \Phi(-2.00) = 1 - 0.9772 = 0.0228.
The same 0.10 ounce shortfall is 0.67 of a standard deviation for one bag and 2 standard deviations for the mean of 9. A light bag happens daily; a sample mean under 12.00 happens about 2 days in 100 when all is well, so it is good reason to inspect the machine. Figure 1 shows the two shaded areas.
Day 1: a range and a cutoff for the mean
Drita wants two numbers for the mean of 9 bags when the machine is on target: the chance that \bar{x} falls between 12.05 and 12.20 ounces, and the cutoff that only 1\% of sample means fall below.
SolutionWith \sigma_{\bar{x}} = 0.05, the two ends standardize to
so the chance is \Phi(2.00) - \Phi(-1.00) = 0.9772 - 0.1587 = 0.8185.
For the cutoff, the z with area 0.01 to its left is -2.326. Undo the standardizing, again with \sigma_{\bar{x}}:
about 11.98 ounces. A mean of 9 bags below 11.98 ounces is a 1 in 100 event for a machine on target. The cutoff for a single bag would be far lower, 12.10 - 2.326(0.15) \approx 11.75 ounces.
Day 1: choosing the sample size
Besnik wants samples large enough that, with the machine on target, a sample mean under 12.00 ounces happens at most 0.1\% of the time. How many bags should a sample have?
SolutionA mean under 12.00 has chance at most 0.001 when 12.00 sits at least 3.090 standard deviations of \bar{x} below 12.10:
Multiply both sides by \displaystyle 0.15/\sqrt{n} and divide by 0.10, both positive, so the inequality keeps its direction:
so n \ge 4.635^2 \approx 21.48. A sample size is a whole number, so the smallest is n = 22. Check: at n = 22, \displaystyle \sigma_{\bar{x}} = 0.15/\sqrt{22} \approx 0.0320 and z \approx -3.13, inside the limit; at n = 21, z \approx -3.06, just outside it. Twenty-two bags is still under 10\% of a 2{,}400 bag run, so the formula holds.
Day 2: a small sample from a machine of unknown shape
A new machine is said to fill with \mu = 12.10 and \sigma = 0.15 ounce, but nothing is known about the shape of its fills. Arben weighs a random sample of 8 bags: 12.03, 12.10, 12.14, 12.17, 12.19, 12.22, 12.27 and 12.32 ounces. Their dot plot is the top panel of Figure 2. Is a normal model for \bar{x} justified? If so, how unusual is a sample mean as large as Arben’s, if the stated values are right?
The condition. The population is not known to be normal, and n = 8 is far from large, so the normal model rests on the sample’s plot. The 8 values are spread fairly evenly from 12.03 to 12.32, with the mean and median both 12.18, no long tail on either side and no value apart from the rest. A sample this small cannot prove the population normal, but it shows nothing against it, so the normal model is reasonable.
The calculation. The sum is 97.44, so \bar{x} = 97.44/8 = 12.18 ounces. Then
and P(\bar{x} \ge 12.18) \approx 1 - 0.9345 = 0.0655. About 7 samples in 100 would average this high, so Arben’s mean is a little high but not strong evidence that the machine overfills.
Day 2: an outlier in a small sample
Besnik weighs a random sample of 10 bags from the old backup machine (middle panel of Figure 2). Nine weigh between 12.05 and 12.20 ounces; the tenth weighs 11.40. He wants the normal chance that a sample mean of 10 bags is under 12.00 ounces, taking \sigma = 0.15. Should he trust a normal model for \bar{x}?
SolutionNo. The population is not known to be normal, the sample is small, and its plot has a clear outlier: 11.40 is 0.65 ounce below the next lightest bag, more than four times the stated \sigma. An outlier in a sample of 10 suggests the population itself has occasional very light bags, perhaps from a jam, and a normal model has almost no area that far out.
The outlier also shows how strongly one bag drives a small mean. The nine regular bags sum to 109.12, a mean of about 12.124; with the tenth the sum is 120.52 and \bar{x} = 12.052. One bag moved the mean by about 0.072 ounce, while
so a single bag shifted it by about 1.5 standard deviations of \bar{x}. The true chances for \bar{x} depend on how often such jams happen, which a normal model leaves out. The right next step is to find the cause of the light bag, or to collect far more data, not to compute a z-score.
Day 2: a large sample from a skewed population
The roaster also ships online orders: 6{,}000 this year, with delivery times averaging \mu = 3.2 days and \sigma = 1.8 days by its records. Drita takes a random sample of 40 orders; their dot plot (bottom panel of Figure 2) is skewed right, and the 40 times sum to 138 days. Is a normal model for \bar{x} justified, and how unusual is her sample mean if \mu = 3.2?
SolutionIndependence. A random sample, and 40 \le 0.10(6{,}000) = 600, so \displaystyle \sigma_{\bar{x}} = \sigma/\sqrt{n} holds.
Shape. Delivery times are not normal; the plot shows a pile between 1.5 and 3.5 days and a long right tail, with single orders at 7.5 and 9.5 days. A delivery time cannot be below about a day but can run long, so this skew is expected in the population too. But n = 40 is past the usual guide of 30, and the skew is moderate, with no value wildly far out for a sample of 40. So the The central limit theorem supports a normal model for \bar{x}, though not for single orders.
The calculation. \bar{x} = 138/40 = 3.45 days, and
so P(\bar{x} \ge 3.45) \approx 1 - 0.8106 = 0.1894. About 19 samples in 100 average this long, so her sample is ordinary. The same normal model would say nothing reliable about the chance that one order takes more than 3.45 days: that needs the skewed population itself.
Boundaries
Independent observations. The spread \displaystyle \sigma/\sqrt{n} needs independent draws. Nine bags filled one after another during a single jam, or all from one hour’s run, are linked, and their mean can vary far more than \displaystyle \sigma/\sqrt{n} says. Random sampling is what makes the formula apply.
The ten percent condition. Sampling without replacement from a small population makes \bar{x} vary less than \displaystyle \sigma/\sqrt{n}, because each bag drawn changes what is left. For a reserve run of only 60 bags, a sample of 20 breaks the condition; the formula gives \displaystyle 0.15/\sqrt{20} \approx 0.034 ounce, but the true standard deviation of \bar{x} is about 0.028, the formula’s value times \displaystyle \sqrt{(60 - 20)/(60 - 1)}. When n is at most 10\% of the population the difference is too small to matter.
A known \sigma. Every calculation here uses the population’s \sigma. When \sigma is unknown and replaced by the sample’s s_x, the standardized mean no longer follows the standard normal curve exactly; that is the subject of the The t distribution and degrees of freedom.
The plot is evidence, not proof. The condition is about the population. A plot of 8 values can hide a skewed population, which is why small samples must look clean before a normal model is used, and why a large sample is the safer route when the shape is in doubt.
The mean, not single values. A large n makes \bar{x} nearly normal; it never makes single bags or single orders normal (Example 7).
Where this goes next
The next lesson, Sampling distribution of a difference, compares two machines, or two roasters, through the gap between two independent sample means, with spreads combined the way variances add. The share of bags that are light, rather than their mean weight, has its own pattern in Sampling distribution of a sample proportion. The normal condition of Day 2 returns as one of the Conditions for one mean, and with \sigma estimated from the sample the same ideas become the confidence intervals and tests of Inference for means.
Exercises
Use the bag model (\mu = 12.10 ounces, \sigma = 0.15 ounce, normal) or the delivery model (\mu = 3.2 days, \sigma = 1.8 days, skewed right) as named, the \Phi table above, and assume random samples that meet the ten percent condition unless told otherwise.
Day 1: center and spread
- Find \mu_{\bar{x}} and \sigma_{\bar{x}} for samples of 4 bags.
- Find \sigma_{\bar{x}} for samples of 16 bags and of 64 bags, and compare.
- How many bags must a sample have for \sigma_{\bar{x}} to be 0.03 ounce?
- A small roast run makes 1{,}500 bags. What is the largest sample, drawn without replacement, for which the ten percent condition holds? Does a sample of 120 meet it? A sample of 200?
Day 1: normal calculations
- Find the chance that one bag weighs more than 12.30 ounces, and the chance that the mean of 4 bags does.
- For samples of 16 bags, find P(12.05 < \bar{x} < 12.15).
- For samples of 25 bags, find P(\bar{x} < 12.05).
- For samples of 9 bags, find the value that \bar{x} exceeds only 10\% of the time.
- The machine drifts so that its mean is 12.00 ounces, with \sigma still 0.15. For samples of 9 bags, find P(\bar{x} \ge 12.08).
- To what mean should the machine be set (with \sigma = 0.15) so that only 0.5\% of samples of 9 bags have \bar{x} < 12.00?
- With \mu = 12.10, find the smallest sample size for which P(\bar{x} < 12.00) is at most 0.01.
Day 2: the normal condition
- Say whether a normal model for \bar{x} is justified, and why: (a) 12 bags from a machine of unknown shape, dot plot roughly symmetric with no outliers; (b) 12 delivery times, dot plot strongly skewed right; (c) 60 delivery times, dot plot moderately skewed right; (d) 5 bags from the main machine, whose fills are known to be normal.
- For samples of 50 delivery times, find P(\bar{x} < 3.0).
- For samples of 100 delivery times, find P(\bar{x} > 3.55).
- For samples of 81 delivery times, find the interval that holds the middle 95\% of sample means.
- Can a normal model give the chance that one order takes more than 3.75 days? Find the chance that the mean of 36 orders is more than 3.75 days.
- Arben weighs 6 bags from a second new machine said to have \mu = 12.10 and \sigma = 0.15, shape unknown: 12.31, 12.04, 12.22, 12.40, 12.17, 12.24. Judge the normal condition from a dot plot, find \bar{x}, and find P(\bar{x} \ge that value) if the stated values are right.
- Besnik’s 7 delivery times are 1.5, 2, 2, 2.5, 3, 3 and 12 days. Should he use a normal model for the mean of 7 delivery times? Explain.
Reasoning
- Interpret \sigma_{\bar{x}} = 0.05 ounce for samples of 9 bags in one sentence about bags and sample means.
- The formula \displaystyle \sigma/\sqrt{n} does not contain the population size. Explain why a sample of 9 bags is equally informative from a run of 2{,}400 bags or of 24{,}000.
- Besnik says: “My sample of 50 delivery times is skewed right, so \bar{x} cannot be close to normal.” Respond.
- Explain why the normal condition is judged from a plot of the sample, and why a small sample must look cleaner than a large one before a normal model is used.
- Show that four times the sample size halves \sigma_{\bar{x}}, and find how many times larger a sample must be to cut \sigma_{\bar{x}} to a third.
Answers
- \mu_{\bar{x}} = 12.10 ounces; \displaystyle \sigma_{\bar{x}} = \frac{0.15}{\sqrt{4}} = 0.075 ounce.
- \displaystyle \frac{0.15}{\sqrt{16}} = 0.0375 and \displaystyle \frac{0.15}{\sqrt{64}} = 0.01875 ounce. Four times the bags, half the spread.
- 25 bags: \displaystyle \frac{0.15}{\sqrt{n}} = 0.03 gives \displaystyle \sqrt{n} = 5.
- 150 bags, since 0.10(1{,}500) = 150. A sample of 120 meets it; 200 does not.
- One bag: \displaystyle z = \frac{0.20}{0.15} \approx 1.33, so 1 - 0.9082 = 0.0918. Mean of 4: \sigma_{\bar{x}} = 0.075, \displaystyle z = \frac{0.20}{0.075} \approx 2.67, so 1 - 0.9962 = 0.0038.
- 0.8164: \sigma_{\bar{x}} = 0.0375, \displaystyle z = \pm\frac{0.05}{0.0375} \approx \pm 1.33, 0.9082 - 0.0918 = 0.8164.
- 0.0475: \sigma_{\bar{x}} = 0.03, \displaystyle z = \frac{-0.05}{0.03} \approx -1.67, 1 - 0.9525 = 0.0475.
- About 12.16 ounces: 12.10 + 1.282(0.05) = 12.1641.
- 0.0548: \displaystyle z = \frac{12.08 - 12.00}{0.05} = 1.6, 1 - 0.9452 = 0.0548.
- About 12.13 ounces: 12.00 + 2.576(0.05) = 12.1288.
- 13 bags: \displaystyle \sqrt{n} \ge \frac{2.326(0.15)}{0.10} = 3.489, so n \ge 12.17. At n = 12, z \approx -2.31, just short.
- (a) Yes: small, but the plot shows no skew or outliers. (b) No: small and strongly skewed. (c) Yes: n = 60 is large and the skew moderate. (d) Yes: a normal population gives a normal \bar{x} at any n.
- 0.2148: \displaystyle \sigma_{\bar{x}} = \frac{1.8}{\sqrt{50}} \approx 0.2546, \displaystyle z = \frac{-0.2}{0.2546} \approx -0.79, 1 - 0.7852 = 0.2148.
- 0.0262: \displaystyle \sigma_{\bar{x}} = \frac{1.8}{10} = 0.18, \displaystyle z = \frac{0.35}{0.18} \approx 1.94, 1 - 0.9738 = 0.0262.
- From 2.808 to 3.592 days: \displaystyle \sigma_{\bar{x}} = \frac{1.8}{9} = 0.2, and 3.2 \pm 1.96(0.2) = 3.2 \pm 0.392.
- No: one delivery time is skewed, not normal. Mean of 36: \displaystyle \sigma_{\bar{x}} = \frac{1.8}{6} = 0.3, \displaystyle z = \frac{0.55}{0.3} \approx 1.83, 1 - 0.9664 = 0.0336.
- Sorted, 12.04 to 12.40, fairly even with no outlier, so a normal model is reasonable. \displaystyle \bar{x} = \frac{73.38}{6} = 12.23; \displaystyle \sigma_{\bar{x}} = \frac{0.15}{\sqrt{6}} \approx 0.0612, \displaystyle z = \frac{0.13}{0.0612} \approx 2.12, 1 - 0.9830 = 0.0170. Surprising, a sign the machine overfills.
- No. With n = 7 the plot must look clean, and 12 days is far from the other six (all 3 or under), on top of a population known to be skewed.
- Over all samples of 9 bags, a sample mean typically misses the machine’s true mean by about 0.05 ounce.
- Under the ten percent condition the draws are nearly independent, and \sigma_{\bar{x}} depends only on how much bags vary and how many are averaged. A larger run adds bags like those already there; it does not change \sigma.
- The sample’s plot shows the population’s skew, and with 50 values it should. The theorem is about \bar{x} over many samples, and at n = 50 with moderate skew that pattern is close to normal.
- The condition concerns the population, which is not seen, so the sample’s plot is the only evidence of its shape. A small sample’s mean is moved strongly by one tail value, and the central limit theorem gives little help at small n, so any skew or outlier there matters more.
- \displaystyle \frac{\sigma}{\sqrt{4n}} = \frac{\sigma}{2\sqrt{n}}, half of \displaystyle \frac{\sigma}{\sqrt{n}}. For a third, \displaystyle \sqrt{kn} = 3\sqrt{n} needs k = 9: nine times the sample.