Lesson 6 of 8 · 15 min
Margin of error and sample size
Calculate the margin of error , read and from an interval, see how and the confidence level change , and choose the sample size for a required precision.
What you will be able to do
- Calculate the approximate margin of error .
- Find and from the endpoints of an interval, and work back to .
- Explain how the margin of error changes with sample size, confidence level and variability.
- Find the smallest sample size that gives a required margin of error.
A confidence interval is "estimate plus or minus a margin": . The margin of error is how far the interval reaches on each side of , so it measures how precise the estimate is. A council planning a bus route cares whether the mean commute is known to within 3 minutes or within 30 seconds, and that is a question about .
Key idea
Approximate margin of error
The interval is . Its width is .
Given an interval, you can work backwards. The sample mean is the midpoint and the margin of error is half the width:
An approximate confidence interval for a population mean is . Find the sample mean and the margin of error .
Worked example
Working back from a confidence interval
A clinic surveys a random sample of patients and reports an approximate 95% confidence interval of minutes for the mean waiting time.
(a) Find the sample mean and the margin of error.
(b) Find the sample standard deviation , correct to 2 decimal places.
(c) Find the approximate 99% confidence interval from the same sample, correct to 2 decimal places.
Step 1: Read off the centre and half-width
and .
Step 2: Rearrange the margin of error for s
Step 3: Scale the margin to 99%
Only changes, so
Scaling avoids rounding first. is proportional to when and are fixed.
Step 4: Write the 99% interval
. It is wider than the 95% interval, as it must be.
Try it yourself first, then check the working one step at a time.
Answer
(a) min, min. (b) min. (c) min.
Method
is the midpoint and is half the width.
Rearrange for the unknown.
For a new confidence level, scale by the ratio of the values.
Watch out for
Using the full width as the margin of error.
Forgetting when solving for .
The horizontal axis is the sample size . Trace the curve at , and : each time is multiplied by 4, halves. Then raise from to (99%) and watch every margin grow.
| Change | Effect on | Why |
|---|---|---|
| Larger sample | Smaller | : four times the sample halves . |
| Higher confidence level | Larger | A larger is needed to capture more often. |
| More variable population (larger ) | Larger | . |
| Larger population (same ) | No change | The population size is not in the formula. |
A 95% confidence interval for a mean, from a sample of , has margin of error . Roughly what sample size would give a 95% interval with margin of error ?
Before collecting data, you can choose to get the precision you need. Rearrange for , using an estimate of from a pilot study or past data:
If the margin must be at most , take the next whole number up. Rounding down would give a margin slightly bigger than required.
Worked example
Choosing a sample size for a required margin of error
A furniture company wants to estimate the mean time customers take to assemble its flat-pack desk. A pilot study suggests the standard deviation is about minutes. How many customers should it time so that the margin of error is at most minutes with (a) 95% confidence (b) 99% confidence?
Step 1: Set up the inequality
Step 2: Substitute for 95%
Step 3: Round up
must be a whole number at least , so .
With the margin would be slightly more than .
Step 4: Repeat for 99%
so .
Step 5: Compare
Raising the confidence from 95% to 99% needs about 70% more customers for the same precision, because grows with .
Try it yourself first, then check the working one step at a time.
Answer
(a) customers (b) customers
Method
Rearrange to .
Use the pilot estimate of s.
Always round up.
Watch out for
Rounding down to .
Forgetting to square, giving .
A pilot study suggests the standard deviation of a measurement is about units. What is the smallest sample size that gives an approximate 95% confidence interval for the mean with a margin of error of at most unit?
Common mistake
Rounding a sample size
Sample sizes always round up, even from . A sample of 157 would not quite reach the required precision. And don't round , or along the way: carry full accuracy until the final step.
Summary
The approximate margin of error is ; the interval is .
From an interval: is the midpoint and is half the width.
Larger gives a smaller (four times the sample halves it); higher confidence or larger gives a larger .
For a margin of at most , , rounded up.
Finished the lesson?
Try the 3 quick checks above and the lesson completes itself, or mark it complete now.