Library / Statistics / STA-04
Statistics
Sample size for a target precision
The number of readings needed so that the confidence interval is no wider than ± E.
- Ref
- STA-04
- Rev
- v1
- Field
- Statistics
- Result
- n
E is the largest half-width of the confidence interval you are willing to accept. z is the critical value for the confidence level, σ the standard deviation of the data (from a pilot study or past results). Round the answer up to a whole number of readings.
The number of readings needed so that the confidence interval is no wider than ± E. Halving E needs four times as many readings.
Calculator
- Readings needed, rounded up217
- Readings needed if the allowed error is halved, rounded up865
What drives the result
Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.
- The cost of precision grows quickly: at the defaults 217 readings give ±2, but ±1 would need about 865.
- The calculation needs a prior estimate of σ, so a short pilot run is worth doing before planning the full trial.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing () | Local step | Change in result |
|---|---|---|---|---|---|---|
| E Allowed half-width | 0.05 to 20 | 2.161 | 345,700 | 345,700 | +10% | −17.4 % |
| σ Standard deviation | 0.1 to 100 | 0.009604 | 9,604 | 9,604 | +10% | +21 % |
| z Critical value (1.96 for 95 %) | 1 to 3.5 | 56.25 | 689.1 | 632.8 | +10% | +21 % |
Sweep of Allowed half-width
| Allowed half-width | Readings needed |
|---|---|
| 0.05 | 345,700 |
| 2.544 | 133.6 |
| 5.037 | 34.06 |
| 7.531 | 15.24 |
| 10.03 | 8.601 |
| 12.52 | 5.515 |
| 15.01 | 3.835 |
| 17.51 | 2.82 |
| 20 | 2.161 |
Sweep one variable
Variables and how each one contributes
Readings needed
What the equation gives you. Everything else feeds it.
Critical value (1.96 for 95 %)
The critical value for the confidence level wanted. Squared in the result: moving from 95 % to 99 % confidence raises the required readings by about 73 %.
Standard deviation
The standard deviation of the readings. Squared in the result: doubling the scatter needs four times as many readings.
Allowed half-width
The largest half-width of the interval you will accept. Inverse square: halving the allowed error needs four times as many readings.
Worked example with the values above
- Ratio: zσ/E = 1.96 × 15 / 2 = 14.7.
- Square it: 216.1.
- n = 216.1, so take 217 readings.
Assumptions and limits
- Independent readings from one population.
- σ is known from earlier data, and approximately normal scatter or a large n.
Common mistakes
- Forgetting to round up: 216.09 readings means 217, not 216.
- Using the half-width where the full interval width was intended.
Statistics and uncertainty
Sample size grows with the square of the precision you want: halving the allowed error E needs four times the data. Round the answer up.
Where it is used
- Planning how many firings, runs or samples a trial needs.
- Costing a test programme for a required precision.
Maths you need
- Confidence intervals: z σ/√n
- Rearranging formulas: solving for n