Statistics · AP Statistics
Sampling distributions
how a statistic varies
A statistic computed from a random sample changes from sample to sample. Its sampling distribution says by how much, and in what pattern.
The top board is a population: the number of books every student at a large school read last summer. It is skewed right, with mean μ = 2.54 books and standard deviation σ = 2.41 books.
Ten students at a time are chosen at random (red). Their mean, x̄, is where the cone balances them, and it drops into the dotplot below. After 120 samples the means have a centre of 2.45, close to μ, and a standard deviation of only 0.80. Their pile is far more symmetric than the population.
This chapter is about that pile: why samples differ, what the normal model says about them, and the centre, spread and shape of the sampling distributions of p̂ and x̄, alone and as differences. They are the base for every confidence interval and test in the units ahead.
sampling variability
Different random samples from the same population give different values of a statistic. This is sampling variability, and it is not a mistake.
The first 4 samples of 10 students from the opener, and their means:
| sample | books read | x̄ |
| 1 | 0, 0, 0, 2, 2, 5, 0, 4, 2, 3 | 1.8 |
| 2 | 8, 0, 2, 0, 4, 1, 0, 2, 6, 1 | 2.4 |
| 3 | 0, 7, 2, 0, 1, 5, 3, 3, 0, 0 | 2.1 |
| 4 | 5, 1, 0, 1, 3, 0, 6, 1, 0, 8 | 2.5 |
No sample matches the population mean, μ = 2.54, exactly; each is off by chance alone. Which students are picked is random, so the statistic is too.
The variation has a pattern. Across many samples, the values of x̄ cluster around μ, and larger samples cluster more tightly. Knowing that pattern lets us say how far from the truth a sample result is likely to be, and so whether a result is surprising.
Random selection is what makes the pattern predictable. A convenience sample, such as the students in one class, can be off in the same direction every time, and no formula can say by how much.
estimating a probability by simulation
A simulation imitates a chance process many times. The fraction of repetitions in which something happens estimates its probability.
A town council claims that half its voters, p = 0.5, support a new park. In a random sample of 40 voters, 26 said yes: p̂ = 0.650. Is that more than chance could easily produce, if the claim is true?
The model. Each voter says yes with probability 0.5 (a coin flip, or a random digit: 0–4 yes, 5–9 no). One trial is 40 voters; record p̂. Repeat it 100 times. The figure runs it: red balls are yes.
The result. 4 of the 100 simulated samples gave p̂ ≥ 0.650, so the estimated probability is 4/100 = 0.04. (The exact binomial value is 0.040.)
The conclusion. If half the voters support the park, a result at least this high happens only about 4% of the time. That is unusual, so the sample gives some evidence that more than half support it. It does not prove the claim wrong: unlikely results do happen.
A second run of 100 would give a slightly different count. More repetitions give a better estimate of the probability.
areas and cut-offs
For a normal distribution, a probability is an area under the curve. Standardize, then find the area.
The weights of apples from an orchard are approximately normal, with μ = 150 g and σ = 12 g. A z-score says how many standard deviations a value is from the mean:
An area. What proportion of apples weigh between 140 g and 165 g?
About 69.2% of apples (red). Above 165 g lie 0.106 of them.
A cut-off. How heavy must an apple be to be in the heaviest 10%? The z with area 0.90 below it is 1.28, so x = 150 + 1.28 × 12 = 165.4 g (blue).
On the exam, show the work: name the distribution and its parameters, the boundary and the area wanted, or a labelled sketch. Calculator syntax alone, such as normalcdf(…), earns no credit.
a fixed number and a random one
A parameter describes a population; a statistic describes a sample. A statistic is used to estimate a parameter.
| parameter | statistic |
| mean | μ | x̄ |
| standard deviation | σ | s |
| proportion | p | p̂ |
The mean weight of all the orchard’s apples, μ = 150 g (blue), is a parameter: one fixed number, usually unknown. A random sample of 8 apples gave x̄ = 159.1 g and s = 17.0 g: statistics. The next sample gave x̄ = 150.8 g.
Because the sample is random, a statistic is a random variable. Its probability distribution, the values it takes over all possible samples of the same size, is its sampling distribution.
Telling them apart: ask whether the number came from the whole population (parameter) or from the data in hand (statistic). Parameters use Greek letters, or p; statistics use Roman letters, or a hat.
means become normal
The central limit theorem (CLT): when n is large enough, the sampling distribution of x̄ is approximately normal, whatever the shape of the population.
The figure takes 400 random samples of each size from the skewed population of the opener and plots their means:
| n | mean of the x̄’s | SD of the x̄’s | σ/√n |
| 2 | 2.64 | 1.79 | 1.71 |
| 10 | 2.53 | 0.77 | 0.76 |
| 30 | 2.53 | 0.43 | 0.44 |
Three things hold at once. The centre stays at μ = 2.54. The spread shrinks like σ/√n. And the shape changes: at n = 2 the means are still skewed right, at n = 30 the red normal curve fits them closely.
How large is large enough depends on the population: the more skewed it is, the larger n must be. The AP rule of thumb is n ≥ 30.
A common mistake: the CLT is about the distribution of x̄, not of the data. A large sample from a skewed population looks skewed too; it is the means of many such samples that pile up in a normal shape.
aim and precision
A statistic used to estimate a parameter is a point estimator. It is unbiased when the mean of its sampling distribution equals the parameter.
Each target is one estimator. The blue bullseye is the parameter; each dart is the estimate from one random sample.
Bias is about the centre. The top two estimators centre on the bullseye: unbiased. The bottom two land off to one side, sample after sample: biased.
Variability is about the spread: how far the estimates scatter from sample to sample. The left two vary little, the right two a lot. The best estimator (red) has low bias and low variability.
x̄ is an unbiased estimator of μ and p̂ of p: in 5.3 the x̄’s centred on μ at every n. The sample maximum is biased for the population maximum: it can never be larger, and is usually smaller.
Larger samples reduce variability, not bias. From 5.3, the SD of x̄ fell from 0.77 at n = 10 to 0.43 at n = 30. But a biased method, such as a voluntary-response survey, stays biased however many answer it: it just misses more precisely.
centre p, spread √(p(1 − p)/n)
The sample proportion p̂ has a sampling distribution with mean p and a standard deviation that shrinks as n grows.
In a school district of 8,000 students, 35% walk to school (red beads). The figure takes random samples of 50 students and drops each sample’s p̂ into the dotplot.
| mean of p̂ | SD of p̂ |
| 100 simulated samples | 0.353 | 0.0657 |
| the formulas | 0.35 | 0.0675 |
Interpreting the SD. In random samples of 50 students from this district, the sample proportion who walk typically varies by about 0.067 from the true proportion, 0.35.
Because n is under the square root, four times the sample size halves the SD: samples of 200 would give 0.0337.
the 10% and large counts conditions
Two conditions let us use the formulas and a normal model for p̂. Check both, in context, before any calculation.
10% condition. Sampling without replacement, the draws are close enough to independent when n ≤ 10% of the population. Here 50 ≤ 0.10(8,000) = 800, so σp̂ = 0.0675 can be used.
Large counts condition. The sampling distribution is approximately normal when np ≥ 10 and n(1 − p) ≥ 10. Here 50(0.35) = 17.5 and 50(0.65) = 32.5: both at least 10. With smaller counts the distribution is skewed, away from the nearer end, 0 or 1.
A probability. How likely is a sample of 50 with at least 45% walkers?
The shaded tail. In the 100 simulated samples, 7 had p̂ ≥ 0.45: 0.07, close to the model.
In these conditions use p, the parameter, not p̂: the sampling distribution belongs to the true proportion.
comparing two groups by proportion
For two independent random samples, the difference p̂1 − p̂2 has its own sampling distribution, centred on p1 − p2.
District 1 is the district of 5.5: 35% walk; samples of 50. In district 2, 25% walk; samples of 60. Each pair of samples gives a difference (the red bar), which drops into the dotplot.
The variances add, even for a difference: two independent sources of chance make the difference vary more than either alone. Standard deviations do not add; variances do.
Conditions. Independent random samples; each less than 10% of its population; and all four counts at least 10: 17.5, 32.5, 15, 45. Then the sampling distribution is approximately normal.
A probability. How often would district 2’s sample show the higher proportion?
About 13% of the time, even though district 1 truly has more walkers. In the figure, 11 of 100 differences fell below 0.
centre μ, spread σ/√n
The sample mean x̄ has a sampling distribution with mean μ and standard deviation σ/√n.
For the orchard’s apples, N(150, 12), the mean weight of a random sample of 9 has a standard deviation of 4 g: the red curve, a third as wide as the population’s.
Shape. If the population is normal, x̄ is normal for any n. If it is not, the CLT makes x̄ approximately normal when n ≥ 30. With a small sample from a skewed or unknown population, neither holds, and a normal calculation is not justified. The SD formula also needs the 10% condition.
A probability. One apple over 155 g has z = (155 − 150)/12 = 0.42. The mean of 9 over 155 g has z = (155 − 150)/4 = 1.25:
A heavy apple is common; a heavy average of 9 is not, because light and heavy apples in a sample offset each other. The most common mistake is to divide by σ when the question is about x̄.
comparing two groups by mean
For independent random samples from two populations, x̄1 − x̄2 has mean μ1 − μ2, and its variance is the sum of the two variances.
Apples of variety A weigh N(150, 12) grams and of variety B N(140, 10). Take 9 A’s and 16 B’s at random and compare their means (the red bar on the top board).
Shape. Both populations are normal, so the difference is normal. Otherwise each sample needs n ≥ 30 for the CLT. Each sample must also be under 10% of its population, and the samples independent of each other.
A probability. How likely is the B sample to come out heavier on average?
Rare: with these sample sizes, the heavier variety almost always shows the heavier mean. Smaller samples would make the red curve wider and the shaded area larger.
← Probability and random variables · Inference for proportions →