Your Equation

Library / Statistics / STA-12

Statistics

Margin of error for a proportion

Uncertainty in a measured percentage or success rate.

Ref
STA-12
Rev
v1
Field
Statistics
Result
E

p is the proportion observed in the sample (0 to 1), n the sample size and z the critical value for the confidence level. The proportion is quoted as p ± E. E is largest at p = 0.5, so using p = 0.5 gives a safe worst-case margin.

Uncertainty in a measured percentage or success rate. It is largest when p is near 0.5.

Calculator

Solve for
13.5
0.010.99
5100,000
  • Margin in percentage points4.9 %
  • Sample size for ±1 percentage point at this p and z9,604

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.

Margin of error () current value 0.049
nSample sizeKey driver
0.00310.438
zCritical value (1.96 for 95 %)
0.0250.0875
pObserved proportion
0.00975
  • With 400 trials and a 50 % hit rate the true rate is known only to about ±4.9 points; a rate of 50 % could really be anywhere from 45 % to 55 %.
  • To tighten the margin to ±1 point at the default settings takes about 9,600 trials.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
n Sample size5 to 100,000 0.0030990.43830.4352+1 −0.125 %
z Critical value (1.96 for 95 %)1 to 3.5 0.0250.08750.0625+10%+10 %
p Observed proportion0.01 to 0.99 0.0097510.0490.03925+10%−0.501 %

Sweep of Critical value (1.96 for 95 %)

Critical value (1.96 for 95 %)Margin of error
10.025
1.3130.03281
1.6250.04063
1.9380.04844
2.250.05625
2.5630.06406
2.8750.07188
3.1880.07969
3.50.0875

Sweep one variable

Margin of error ()Hover, touch, or use the arrow keys on the chart
0.020.030.040.050.060.070.080.09 11.522.533.5 Critical value (1.96 for 95 %) now 0.049

Variables and how each one contributes

E

Margin of error

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. Directly proportional: 99 % confidence (2.576) gives a margin 31 % wider than 95 % (1.96).

p

Observed proportion

· typical 0.01 to 0.99

The observed proportion or success rate. Largest margin at p = 0.5, narrowing towards 0 or 1; near the default it has almost no effect (a 10 % rise in p changes the margin by about 0.5 %).

n

Sample size

· typical 5 to 100,000

The number of trials in the sample. Inverse square root: four times as many trials halve the margin.

Worked example with the values above

  1. Variance of the proportion: p(1 − p)/n = 0.5 × 0.5 / 400 = 6.25×10−4.
  2. Standard error: √ = 0.025.
  3. E = 1.96 × 0.025 = 0.049 (4.9 percentage points).

Assumptions and limits

  • Independent trials with the same chance of success.
  • n large enough that np and n(1 − p) are both above about 10.

Common mistakes

  • Quoting the margin in per cent when it is in fractions (0.049 is 4.9 points).
  • Using the formula with p near 0 or 1 and a small sample, where it fails.

Statistics and uncertainty

The margin of error is largest at p = 0.5 and shrinks as 1/√n. It covers sampling error only, not bias in how the sample was chosen.

Where it is used

  • Quoting a hit rate or pass rate from a limited number of trials.
  • Planning how many trials are needed to prove a reliability claim.

Maths you need

  • Proportions: a fraction of the total
  • Confidence intervals: z σ/√n

Related formulas

Practise this formula