Note 14
Confidence intervals
The treatment cut waiting times by 5 minutes, with a 95 percent confidence interval of 2 to 8.
This is the most useful sentence a report can give you, and most reports do not. It says both how big the effect looks and how sure the study is about that. The figure “5 minutes” is the best single guess. The interval says that values from about 2 to about 8 are consistent with the data. A headline writer would have stopped at 5. You can do better.
The idea
Any estimate from a sample will miss the true value by some amount, because a different sample would have given a different answer. A confidence interval takes the estimate and adds a margin on each side, sized according to how much that estimate could plausibly bounce around.
The recipe, for a mean from a fairly large sample:
- Find the standard error, which is the standard deviation of the data divided by the square root of the sample size.
- Multiply by about 2 (or 1.96 to be precise) for 95 percent confidence.
- Go that far either side of the estimate.
The margin of error in a poll is the half-width of exactly this kind of interval, for a percentage.
Three things control the width. More variable data widen it. A higher confidence level widens it: a 99 percent interval uses about 2.6 in place of 2. And more data narrow it, though slowly. Because the sample size sits under a square root, you need four times the data to halve the width.
What the 95 percent refers to
Here is the subtle part, and it has been arguing with students since Jerzy Neyman set out the theory in 1937.
The 95 percent describes the method, as opposed to your particular interval. If you repeated the study many times and calculated an interval each time, about 95 percent of those intervals would contain the true value.
Each horizontal line in that figure is one study’s interval. The true value does not move. The intervals move, and one of them has missed. It does not know it has missed, and neither would the researchers who produced it. Their report would look just as confident as all the others.
Strictly, then, it is incorrect to say “there is a 95 percent chance the true value is between 2 and 8”. In the framework that produces these intervals, the true value is a fixed number, so either it is in there or it is not. In a 2014 paper in Psychonomic Bulletin & Review, Rink Hoekstra and colleagues gave researchers and students a list of such statements, all of them false, and found that large majorities of both groups endorsed some. So if you were about to say that, you are in good company.
Does it matter? Sometimes less than purists claim. When there is little prior information, a Bayesian “credible interval” often comes out very close to the confidence interval, and it does carry the plain-English meaning. A working reading that does not go too far wrong is: these are the values reasonably compatible with the data, assuming the study was sound.
Reading an interval
The interval tells you more than a p-value does, because it shows the p-value’s answer and also the size.
| Estimate | 95% interval | What it says |
|---|---|---|
| −5 | −8 to −2 | Clear benefit, modest size |
| −5 | −22 to +12 | Could be anything; this study is too small |
| −0.3 | −0.5 to −0.1 | Real but tiny; “significant” and unimportant |
| 0 | −0.5 to +0.5 | Good evidence there is no effect worth caring about |
If a 95 percent interval for a difference excludes zero, the result is significant at the 0.05 level. These are two sides of one calculation.
Rows two and four both count as “not significant”, and they mean completely different things. The second row is a shrug. The fourth is a finding. A report that lumps the two together as “no effect” has thrown away the most useful part of the result.
It also makes sense to think about the ends of the interval. Would you act if the true value was at the low end? Would you worry if it was at the high end? If your decision is the same across the interval, the study has told you enough. If not, you need more data.
Comparing two intervals
Here is a common mistake. Two groups have overlapping intervals, so people conclude they are not significantly different. That test is too strict. Two 95 percent intervals can overlap a little while the difference between the groups is still clearly significant, because the difference has its own, smaller margin than the two margins added together.
If the intervals do not overlap at all, the difference is certainly significant at that level. If they overlap slightly, you cannot tell from the picture, so ask for the interval on the difference.
And error bars on a chart may not be 95 percent intervals. They can be standard errors, which are about half as long, or standard deviations, which describe something else (see spread). A chart that does not say which has not finished speaking.
About individuals
A confidence interval concerns an average or some other parameter, not you. An interval for the mean effect of 2 to 8 minutes does not mean each person gains 2 to 8 minutes. The individual variation can be far wider. To forecast one new observation you want a prediction interval, which is much broader, since it has to contain a person’s own randomness. Weather forecasts and house price estimates would do well to remember the difference.
What it leaves out
The interval’s confidence is conditional on everything else going right. It covers random sampling error and nothing else. Biased samples, leading questions, unblinded measurement and bad data are outside its range. A study can produce a narrow, confident interval around the wrong number. The 1936 Literary Digest poll would have had a splendidly tight interval, with the true result many points outside it.
What to ask
- What are the two ends of the interval, and would you decide differently at each?
- Does it include zero, or “no difference”?
- Is it narrow enough to be a finding, or just wide?
- Is it about an average, or about an individual?
- Which kinds of error does it not cover?
Goes with: What a p-value is and is not, What margin of error means and leaves out, Spread, range and standard deviation.