Populations, samples and random selection
A cook tastes one spoonful to judge the pot. A sample does that for data: a few members, chosen fairly, speak for the whole population. Here, a random sample of 36 runs of one calibration process (σ = 6) gives a mean of 52.
1Name the population, the parameter and the sample
| Quantity | Before sampling | After these 36 runs |
|---|---|---|
| Population mean μ | Fixed, unknown | Still unknown; it has not become 52 |
| Readings X₁, …, X₃₆ | Random variables | 36 recorded values |
| Sample mean X̄ | Random: another sample gives another mean | x̄ = 52, a point estimate of μ |
- 1A census records every member of the population.
- 2A sample saves time and cost. It is the only choice when measuring uses up or damages the item.
- 3Neither excuses a selection rule that leaves part of the population out.
2Pick a random sample from a numbered list
- 1An archive holds 240 runs, labelled 001–240. Four are needed, without replacement.
- 2Reject 260 and 000: they are not on the frame.
- 3Reject the second 185: it is already chosen.
- 4Keep 007 and 042: leading zeros make valid labels.
3Say who the selection leaves out
| Selection rule | Who is left out | Why the mean could be wrong |
|---|---|---|
| Only runs from the cool period | Runs in warmer periods | Temperature may change the readings |
| Only runs with a paper printout | Runs whose logging failed | Those runs may behave differently |
4Try it
1 A frame lists 150 records, 001–150. The random triples read 072 418 150 072 000 093. Which records are chosen?
2 A café times 40 randomly chosen weekday customers to estimate the mean waiting time. Name the population, the parameter and the statistic.
3 The café times only customers who arrive before 9 am. Who is left out, and why could the mean be wrong?
- 1072, 150, 093: reject 418 and 000 (not on the frame) and the second 072 (a repeat)
- 2population: all weekday customers; parameter: their mean waiting time μ; statistic: the mean x̄ of the 40 times
- 3later customers have no chance; queues may be longer or shorter later, so the mean could be too high or too low
Estimating the population mean and variance
A sample cannot tell you μ and σ² exactly, but it gives your best guesses. An unbiased estimate is right on average over many samples, even if one sample misses. For the variance that needs one change: divide by n − 1, not n.
1Estimate from raw data
At another setting, eight independent readings are 45, 48, 49, 50, 52, 53, 55, 56. Find unbiased estimates of the population mean and variance.
- Find the meanx̄=408 ÷ 8 = 51
- Square each deviation and add36 + 9 + 4 + 1 + 1 + 4 + 16 + 25=96
- Divide by n − 1 = 7
- Answerx̄ = 51; s² = 96/7 ≈ 13.7 units²
2Use summary totals instead
| You want to | Divisor | Result |
|---|---|---|
| describe these eight values only | n = 8 | 96/8 = 12 |
| estimate the population variance | n − 1 = 7 | 96/7 ≈ 13.7 |
3Undo a coding
A sample of 64 readings has Σ(x − 50) = 64 and Σ(x − 50)² = 631. Find unbiased estimates of the population mean and variance.
- Mean of the coded values, then add 50 back=
- Squared-deviation total=
- Divide by n − 1 = 63=
- Answerx̄ = 51; s² = 9
4Try it
1 Five readings are 12, 15, 9, 14, 10. Estimate μ and σ² without bias.
2 n = 10, Σx = 230, Σx² = 5410. Estimate μ and σ² without bias.
3 n = 20, Σ(x − 100) = −30, Σ(x − 100)² = 245. Estimate μ and σ² without bias.
- 1x̄ = 12; Σ(x − 12)² = 26, so s² = 26/4 = 6.5
- 2x̄ = 23; 5410 − 230²/10 = 120, so s² = 120/9 = 40/3 ≈ 13.3
- 3x̄ = 100 − 1.5 = 98.5; 245 − (−30)²/20 = 200, so s² = 200/19 ≈ 10.5
The distribution of the sample mean
Another sample gives another mean, so the sample mean X̄ is a random variable. It centres on μ and is far less spread out than single readings: that is why a mean of 36 runs tells you more than one run.
1Find the mean and standard error of X̄
| Sample size | E(X̄) | Var(X̄) | SE |
|---|---|---|---|
| 4 | 52 | 36/4 = 9 | 3 |
| 36 | 52 | 36/36 = 1 | 1 |
2Normal readings give a normal mean
3Large samples: the central limit theorem
- 1In the two-state mode, the count K of 55s is Bin(n, 0.8), so X̄ = 40 + 15K/n.
- 2E(X) = 40(0.2) + 55(0.8) = 52; Var(X) = (−12)²(0.2) + 3²(0.8) = 36.
- 3n = 4: Var(X̄) = 9, SE 3. n = 36: Var(X̄) = 1, SE 1. The bars bunch up and take a bell shape.
4Find a probability about X̄
Readings X are independent and X ~ N(52, 6²). A random sample of 36 readings has mean X̄. Find P(51 < X̄ < 53.5).
- Find the distribution of X̄X̄ ~ N(52, 6²/36)SE=6 ÷ √36 = 1
- Standardise both endsz=(51 − 52) ÷ 1 = −1z=(53.5 − 52) ÷ 1 = 1.5
- Subtract the left-tail areas=Φ(1.5) − Φ(−1)=0.9332 − 0.1587 = 0.7745
- AnswerP(51 < X̄ < 53.5) = 0.775 (3 s.f.)
5Try it
1 X ~ N(80, 10²). Write down the distribution of the mean of 25 independent readings.
2 For that sample, find P(X̄ > 83).
3 A population (not normal) has mean 7 and variance 9. Find, approximately, P(X̄ < 6.7) for a random sample of 100.
- 1X̄ ~ N(80, 100/25) = N(80, 2²)
- 2z = (83 − 80) ÷ 2 = 1.5; 1 − Φ(1.5) = 0.0668
- 3by the CLT X̄ ≈ N(7, 0.09), SE 0.3; z = −1; Φ(−1) = 0.159
Confidence intervals for a mean or a proportion
One number like x̄ = 52 is almost certainly a little off. A confidence interval gives a range instead, wide enough to catch μ in most samples. Every one has the same shape: estimate ± z × SE.
1Known σ: use SE = σ/√n
2Unknown σ: estimate it, then use a large sample
3A proportion: use p̂ and its estimated SE
4Choose the method from what you know
| What you have | What to use |
|---|---|
| Normal parent, known σ = 6, n = 36, x̄ = 52 | SE = 6/√36 = 1; 95% interval [50.04, 53.96] |
| Unknown variance, large n = 64, coded totals | s² = 9, SE ≈ 3/8; approximate [50.265, 51.735] |
| Eight readings, s² = 96/7, unknown variance | Estimates only: too small for a normal-based interval |
| 80 successes in 200 independent trials | p̂ = 0.4, SE ≈ √(0.24/200); approximate [0.3321, 0.4679] |
- 1An interval estimates the fixed μ. It is not a range holding 95% of single readings (those have SD 6).
- 2Records from the cool period only give a precise answer about the wrong target.
- 3Report the parameter, the endpoints, the level, and any approximation used.
5Try it
1 A normal population has σ = 5. A sample of 25 has x̄ = 40. Find a 95% interval for μ.
2 In a random sample of 150, 45 say yes. Find an approximate 95% interval for the proportion p.
3 n = 50, Σx = 600, Σx² = 7449, variance unknown. Find an approximate 95% interval for μ.
- 1SE = 5/√25 = 1; 40 ± 1.96 = [38.04, 41.96]
- 2p̂ = 0.3; SE = √(0.21/150) ≈ 0.0374; 0.3 ± 0.0733 = [0.227, 0.373]
- 3x̄ = 12; s² = (7449 − 7200)/49 ≈ 5.08; SE ≈ 0.319; 12 ± 0.625 = [11.38, 12.62]
What a confidence level promises
μ never moves. What moves is the interval, because every new sample gives a new x̄. A 95% confidence level is a promise about the method: about 95% of the intervals it makes will cover μ.
1Check each interval against the fixed μ
2Combine coverage for independent intervals
3Work back to the confidence level
4Try it
1 Four independent 90% intervals are made for the same μ. Find the probability that all four cover μ.
2 Find the probability that exactly one of the four misses μ.
3 Two independent intervals each cover μ with probability q. P(both cover) = 0.81. Find the confidence level.
- 10.9⁴ = 0.6561
- 24(0.9³)(0.1) = 0.2916
- 3q² = 0.81, q = 0.9: a 90% level
Working backwards: level, count and sample size
Every interval is centre ± z × SE. Run it backwards: the midpoint gives the estimate, half the width gives the margin, and from those come the level, a count, or the sample size you need.
1Recover the centre and the level
2Recover a count from a width
3Find the least sample size
| Check | 95% margin | At most 1.2? |
|---|---|---|
| n = 96 | 1.200250 units | No |
| n = 97 | 1.194047 units | Yes |
- 1Four times the sample halves the margin.
- 2A higher level needs a larger z, so a wider interval, unless n grows to make up for it.
- 3Plan with the known σ = 6. An estimate from a small sample carries its own uncertainty.
4Try it
1 From 36 readings with known σ = 6, an interval for μ is [21.2, 24.8]. Find x̄ and the confidence level.
2 σ = 4. Find the least n for a 95% margin of at most 0.5.
3 A 95% interval for p from 100 trials has width 0.1568. Find the possible numbers of successes.
- 1x̄ = 23; margin 1.8, z = 1.8 ÷ 1 = 1.8; 2Φ(1.8) − 1 ≈ 0.928: about 92.8%
- 2n ≥ (1.96 × 4 ÷ 0.5)² = 245.86, so n = 246
- 3p̂(1 − p̂) = 100(0.1568 ÷ 3.92)² = 0.16, p̂ = 0.2 or 0.8: 20 or 80