Your Equation

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

Solve for
13.5
0.1100
0.0520
  • 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.

Readings needed () current value 216.1
EAllowed half-widthKey driver
2.16346,000
σStandard deviation
0.00969,600
zCritical value (1.96 for 95 %)
56.3689
  • 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

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
E Allowed half-width0.05 to 20 2.161345,700345,700+10%−17.4 %
σ Standard deviation0.1 to 100 0.0096049,6049,604+10%+21 %
z Critical value (1.96 for 95 %)1 to 3.5 56.25689.1632.8+10%+21 %

Sweep of Allowed half-width

Allowed half-widthReadings needed
0.05345,700
2.544133.6
5.03734.06
7.53115.24
10.038.601
12.525.515
15.013.835
17.512.82
202.161

Sweep one variable

Readings needed ()Hover, touch, or use the arrow keys on the chart
0100k200k300k 5101520 Allowed half-width now 216.1

Variables and how each one contributes

n

Readings needed

Result ·

What the equation gives you. Everything else feeds it.

z

Critical value (1.96 for 95 %)

· typical 1 to 3.5

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

· typical 0.1 to 100

The standard deviation of the readings. Squared in the result: doubling the scatter needs four times as many readings.

E

Allowed half-width

· typical 0.05 to 20

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

  1. Ratio: zσ/E = 1.96 × 15 / 2 = 14.7.
  2. Square it: 216.1.
  3. 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

Related formulas

Practise this formula