Key ideas
Inference draws conclusions about a population from a sample. A confidence interval gives a range of plausible values, and a test asks whether a sample result is far enough from a claimed value to call it unlikely.
- A confidence interval for a mean is x̄ ± z × σ ÷ √n, with z = 1.96 for 95 % confidence and 2.58 for 99 %. The half-width is the margin of error.
- To reach a margin of error E, the sample size must be n = (z × σ ÷ E)², rounded up.
- The test statistic for a mean is z = (x̄ − μ₀) ÷ (σ ÷ √n). A value beyond ±1.96 is significant at the 5 % level.
- For a proportion, the margin is z × √(p̂(1 − p̂) ÷ n). Larger samples give narrower intervals.
Key equations
CI = x̄ ± z × σ ÷ √nn = (z × σ ÷ E)²z = (x̄ − μ₀) ÷ (σ ÷ √n)margin for a proportion = z × √(p̂(1 − p̂) ÷ n)
Worked example
A sample of 100 has a mean of 52 and σ = 10, so SE = 1 and the 95 % interval is 52 ± 1.96, or 50.04 to 53.96. To cut the margin to 2 with σ = 10, n = (1.96 × 10 ÷ 2)² = 96.04, so 97 are needed. Testing against μ₀ = 50 gives z = (52 − 50) ÷ 1 = 2.0, which is beyond 1.96, so the result is significant. For p̂ = 0.4 with n = 400 the margin is 1.96 × √(0.24 ÷ 400) = 0.048.
Common mistakes
- Interpreting a 95 % interval as meaning that 95 % of the data lie inside it. It is about the plausible values of the mean.
- Rounding the sample size down. It must be rounded up to the next whole number.
- Using the standard deviation in place of the standard error, σ ÷ √n, for the interval.
Practice
Test yourself with practice questions on this topic: Confidence intervals