Data and statistics · cheat sheet

Confidence interval

A range that probably contains the true value for the whole population (for example the true average), worked out from a sample.

Common practice
5 steps
Used by Process Improvement Specialist

What it is

A confidence interval gives a range for the true value, worked out from a sample, with a stated level of confidence, usually 95%.

The central limit theorem explains why it works: averages of samples are close to normal, and their spread is s ÷ √n, even when single values are skewed.

When to use it

Whenever you report an average or a share from a sample, and when deciding whether a sample is big enough.

Why it works

A single number from a sample hides how uncertain it is. The interval shows it, and helps decide whether more data is needed.

Do

  • Quadrupling the sample halves the margin.
  • Report the interval, not just the average.

Don't

  • Reading a 95% interval as “95% of values fall in it”.
  • Ignoring how the sample was chosen.
  • Very small samples with skewed data.

Step by step

  1. Mean and s
  2. Standard error s ÷ √n.
  3. t value 95%, n − 1 degrees of freedom.
  4. Margin t × standard error.
  5. Interval Mean ± margin.
Also called: Margin of error, central limit theoremPrint the blank template ↗

Worked example

The situation. A call centre times 36 calls: mean 6.2 minutes, s 1.8.

  1. Standard error 1.8 ÷ 6 = 0.30; t = 2.03; margin 0.61.

The result. Staffing was planned on 6.8 minutes, the top of the interval, to be safe.

Confidence interval worksheet Print blank
PartValue
Standard error0.30
t (35 degrees of freedom)2.03
Margin±0.61
95% interval5.59 to 6.81 minutes

Filled in for: A call centre times 36 calls: mean 6.2 minutes, s 1.8.

ItemValue

Copy this structure, or print the blank version and fill it in by hand. n · mean · s · standard error = s ÷ √n · t · margin = t × SE · interval = mean ± margin

Before you use it: check these

CheckIf it fails
A random sample from a stable processWithout randomness the interval has no meaning
Roughly normal data, or a sample of 30 or moreUse a bootstrap or a transformation for small skewed samples

How to do it with real data

The full calculation, as it happens in the story: the data, every step, how to read the result, and the spreadsheet functions to do it yourself.

Worked example with real data

How sure are we about the average wait?

From Day 27: What can a sample tell us? of the Process Improvement Specialist story

The 60 waits are a sample. Amara works out the range in which the true average wait of all routine requests in weeks 12 to 20 probably lies.

Step by step

  1. Standard errors ÷ √n: 6.46 ÷ √60= 0.834 days
  2. t valuefor 95% and n − 1 = 59 degrees of freedom= 2.001
  3. Margin2.001 × 0.834= ±1.67 days
  4. Interval10.43 − 1.67 to 10.43 + 1.67= 8.8 to 12.1 days
InputValue
Sample size60
Sample mean10.43 days
Standard deviation6.46 days
Confidence95%

How to read the result

We can be 95% confident the true average wait is between about 8.8 and 12.1 days. Even the best case is well above 7.

What it led to

Report the average with its interval, not as a single number. A sample of 60 is precise enough for the decisions ahead.

Do it in a spreadsheet

Standard error=STDEV.S(B2:B61)/SQRT(COUNT(B2:B61))
Margin=CONFIDENCE.T(0.05,STDEV.S(B2:B61),COUNT(B2:B61))
Interval=AVERAGE(B2:B61)-D2 and =AVERAGE(B2:B61)+D2
Try it yourself: What would the 95% interval be with only 15 records, if the mean and standard deviation stayed the same?

Standard error 6.46 ÷ √15 = 1.67; t for 14 degrees of freedom = 2.145; margin 3.58. Interval 6.9 to 14.0 days: four times less precise.

Worked example with real data

The central limit theorem in action

From Day 27: What can a sample tell us? of the Process Improvement Specialist story

Augustin (Black Belt) draws 200 random samples of 5 waits from the 60 and records each sample's average. The waits are skewed; are the averages?

Averages of 200 samples of 5 waits010002000300040000 to 1.5: 01.5 to 3: 03 to 4.5: 04.5 to 6: 556 to 7.5: 26267.5 to 9: 28289 to 10.5: 525210.5 to 12: 343412 to 13.5: 222213.5 to 15: 151515 to 16.5: 161616.5 to 18: 1118 to 19.5: 019.5 to 21: 1101.534.567.5910.51213.51516.51819.521

Step by step

  1. Single waitsskewed right, standard deviation 6.46= skew 0.91
  2. Averages of 5much more symmetrical= skew 0.49
  3. Centrethe averages centre on the population mean= 10.39 against 10.43
  4. Spread of averagestheory: s ÷ √5 = 6.46 ÷ 2.24= 2.89; observed 2.87
SampleAverage of 5 waits (days)
Sample 16.6
Sample 28
Sample 37.2
Sample 410.8
Sample 513.6
Sample 610.8
Sample 76.2
Sample 815.8
Sample 94.8
Sample 1015.6
Sample 117.8
Sample 1214.2
Sample 139.2
Sample 149
Sample 159.2
Sample 169.8
Sample 178.4
Sample 186
Sample 198.4
Sample 2010.6
Sample 2115.8
Sample 2215
Sample 2310
Sample 2410.4
Sample 2512.6
Sample 268.8
Sample 2714.8
Sample 2814.4
Sample 299.8
Sample 309.8
Sample 319.8
Sample 3213.8
Sample 337.6
Sample 3415.2
Sample 3513.8
Sample 3612
Sample 376.4
Sample 386.2
Sample 3911.2
Sample 409.2
Sample 418.2
Sample 428
Sample 4310.2
Sample 446.4
Sample 4512.2
Sample 4615.6
Sample 479.8
Sample 4813.2
Sample 4912.4
Sample 509.4
Sample 5110.6
Sample 528.4
Sample 5311.4
Sample 545.8
Sample 559
Sample 568.2
Sample 5711
Sample 588
Sample 5912.4
Sample 607.8
Sample 618.2
Sample 627.4
Sample 636.2
Sample 6410.2
Sample 656
Sample 667
Sample 679
Sample 6811.6
Sample 699.6
Sample 706.6
Sample 716.6
Sample 728.6
Sample 7312
Sample 7410.8
Sample 754.6
Sample 7611.4
Sample 779.8
Sample 789.8
Sample 7910.8
Sample 8020.8
Sample 8112.6
Sample 829.4
Sample 8314
Sample 849.2
Sample 8510.4
Sample 8610.4
Sample 8714.8
Sample 889
Sample 899.2
Sample 909.4
Sample 9111
Sample 9211.2
Sample 9310.6
Sample 949.8
Sample 957
Sample 9613.6
Sample 9713.8
Sample 987.4
Sample 9912.4
Sample 10016
Sample 1018.6
Sample 1029
Sample 1038.2
Sample 10416.4
Sample 1059.4
Sample 1068.2
Sample 1079
Sample 10811.4
Sample 1098.8
Sample 11012
Sample 11111
Sample 1126.2
Sample 11310.8
Sample 1149
Sample 11512.8
Sample 11611
Sample 11710.8
Sample 1189.4
Sample 11915.8
Sample 12010.2
Sample 12115
Sample 12211.4
Sample 12310.8
Sample 1249.8
Sample 12510.6
Sample 12611.8
Sample 1276.6
Sample 12812.4
Sample 1296.4
Sample 1306.2
Sample 1319
Sample 1328.4
Sample 13314
Sample 13411.8
Sample 13511
Sample 1369
Sample 13710.8
Sample 13812.8
Sample 13912.6
Sample 1409.4
Sample 14114.2
Sample 14210.4
Sample 1437.4
Sample 1448.6
Sample 14510
Sample 14610.6
Sample 1479.8
Sample 1488.2
Sample 1498.6
Sample 1504.6
Sample 15111.4
Sample 15211
Sample 1537.8
Sample 1549
Sample 15516.4
Sample 1567.8
Sample 1576.2
Sample 15810
Sample 1597.6
Sample 16013.6
Sample 1619.2
Sample 1629.2
Sample 1636
Sample 16413
Sample 1659.6
Sample 1668
Sample 16713.4
Sample 16813.2
Sample 16911.4
Sample 17013.4
Sample 1715.6
Sample 17216.2
Sample 1739.2
Sample 17415
Sample 17515.6
Sample 17610
Sample 17711
Sample 17812.8
Sample 17911
Sample 1809
Sample 1817.4
Sample 18211.6
Sample 1839.6
Sample 18416.8
Sample 18512
Sample 1866.8
Sample 18712.4
Sample 18810.2
Sample 18914.2
Sample 19010
Sample 1919.6
Sample 1927.8
Sample 19316
Sample 19413
Sample 19515.6
Sample 19614.2
Sample 19711.2
Sample 1988.2
Sample 1996.6
Sample 2007

How to read the result

Averages of samples are closer to normal than the data itself, and their spread shrinks with the square root of the sample size. That's why tests on averages work even when single values are skewed, as long as samples aren't tiny.

What it led to

With 60 records, tests that compare averages can be used on the waiting times, checked against tests that don't assume normal data.

Do it in a spreadsheet

One random sample average=AVERAGE(INDEX(B2:B61,RANDARRAY(5,1,1,60,TRUE)))
Repeatcopy the formula down 200 rows, then draw a histogram
Spread of averages=STDEV.S(D2:D201)
Try it yourself: If samples of 20 were used instead of 5, what would the spread of the averages be?

6.46 ÷ √20 = 1.44 days: half the spread of samples of 5.

In the roles

How a Process Improvement Specialist uses it

Mean wait 10.43 days, standard error 0.834, 95% interval 8.8 to 12.1 days.

Questions people ask

Is 95% the only choice?

No: 90% gives a narrower range with less confidence; 99% a wider one.

Related techniques

← All techniques and tools