Visualizing uncertainty
What error bars mean, why overlap isn't a test, and how to show uncertainty so people notice it.
You will be able to
- Tell SD, SE and CI error bars apart
- Explain why overlapping intervals don't settle a comparison
- Choose a chart that keeps uncertainty visible
Read first
Three bars that look the same
ReadAn error bar can show three different things:
- SD: how individuals vary. It doesn't shrink with more data.
- SE: how precise the mean is. It shrinks with more data.
- 95% CI: a range of values compatible with the data, about twice the SE each way.
All look identical, so a chart must say which it shows. If it doesn't, you can't read it.
Do they overlap?
PredictPredict first
Two groups' 95% confidence intervals overlap a little. Does that mean the difference isn't statistically significant at the 0.05 level?
Reveal
The answer: No, overlap doesn't settle it
No. Two 95% intervals can overlap and the difference can still have p below 0.05. Non-overlap is a stricter check than the test of the difference. To compare two groups, show the interval for the difference itself.
Feel what 95% means
ExploreEach new sample gets a different interval. Run many studies and watch how far they jump, and how many miss.
AExplorable · The confidence-interval dance
What does it mean for an interval to be 95% confident?
Out of these studies' intervals, how many will miss the true mean?
Confidence level
Population
Interval
The z shortcut uses 1.96 with the sample SD — fine for large n only.
96 of 100 contain μ · 4 miss
Commit your prediction above to see the result
Make your prediction to see the result.
Then try the bet: how often does a new study's mean land inside today's interval? It's less often than 95%.
BExplorable · The confidence interval bet
If you repeat the study, how often does the new mean land inside today's 95% interval?
What share of replication means will fall inside this interval?
Confidence level
Commit your prediction above to see the result
Make your prediction to see the result.
Show the difference
ReadAn Estimation plot shows both groups and, on its own axis, the difference with its interval. Point-range does the same for many groups or models.
View data
| length | supplement | difference | diff low | diff high |
|---|---|---|---|---|
| 26.800 | VC | 2.123 | −2.152 | 6.398 |
| 4.900 | VC | 2.123 | −2.152 | 6.398 |
| 21.900 | VC | 2.123 | −2.152 | 6.398 |
| 30.500 | VC | 2.123 | −2.152 | 6.398 |
| 12.200 | VC | 2.123 | −2.152 | 6.398 |
| 30.700 | VC | 2.123 | −2.152 | 6.398 |
| 28.100 | VC | 2.123 | −2.152 | 6.398 |
| 7.600 | VC | 2.123 | −2.152 | 6.398 |
| 3.300 | VC | 2.123 | −2.152 | 6.398 |
| 19 | VC | 2.123 | −2.152 | 6.398 |
| 29.800 | VC | 2.123 | −2.152 | 6.398 |
| 33.500 | VC | 2.123 | −2.152 | 6.398 |
| 8 | VC | 2.123 | −2.152 | 6.398 |
| 12.700 | VC | 2.123 | −2.152 | 6.398 |
| 33.100 | VC | 2.123 | −2.152 | 6.398 |
| 20.200 | VC | 2.123 | −2.152 | 6.398 |
| 18.200 | VC | 2.123 | −2.152 | 6.398 |
| 20.300 | VC | 2.123 | −2.152 | 6.398 |
| 23.400 | VC | 2.123 | −2.152 | 6.398 |
| 26.800 | VC | 2.123 | −2.152 | 6.398 |
| 29.700 | VC | 2.123 | −2.152 | 6.398 |
| 18.800 | VC | 2.123 | −2.152 | 6.398 |
| 27 | VC | 2.123 | −2.152 | 6.398 |
| 11.300 | VC | 2.123 | −2.152 | 6.398 |
| 17.200 | VC | 2.123 | −2.152 | 6.398 |
| 14.500 | VC | 2.123 | −2.152 | 6.398 |
| 9.700 | VC | 2.123 | −2.152 | 6.398 |
| 17.200 | VC | 2.123 | −2.152 | 6.398 |
| 14.100 | VC | 2.123 | −2.152 | 6.398 |
| 14.100 | VC | 2.123 | −2.152 | 6.398 |
| 16.300 | OJ | 2.123 | −2.152 | 6.398 |
| 14.400 | OJ | 2.123 | −2.152 | 6.398 |
| 31.600 | OJ | 2.123 | −2.152 | 6.398 |
| 25.300 | OJ | 2.123 | −2.152 | 6.398 |
| 17.600 | OJ | 2.123 | −2.152 | 6.398 |
| 21.300 | OJ | 2.123 | −2.152 | 6.398 |
| 17.400 | OJ | 2.123 | −2.152 | 6.398 |
| 10.200 | OJ | 2.123 | −2.152 | 6.398 |
| 38.500 | OJ | 2.123 | −2.152 | 6.398 |
| 12.100 | OJ | 2.123 | −2.152 | 6.398 |
| 5.400 | OJ | 2.123 | −2.152 | 6.398 |
| 21.600 | OJ | 2.123 | −2.152 | 6.398 |
| 20.700 | OJ | 2.123 | −2.152 | 6.398 |
| 22.700 | OJ | 2.123 | −2.152 | 6.398 |
| 22.200 | OJ | 2.123 | −2.152 | 6.398 |
| 16.300 | OJ | 2.123 | −2.152 | 6.398 |
| 27.200 | OJ | 2.123 | −2.152 | 6.398 |
| 17.800 | OJ | 2.123 | −2.152 | 6.398 |
| 20.300 | OJ | 2.123 | −2.152 | 6.398 |
| 24.500 | OJ | 2.123 | −2.152 | 6.398 |
| 32.900 | OJ | 2.123 | −2.152 | 6.398 |
| 24.300 | OJ | 2.123 | −2.152 | 6.398 |
| 4.400 | OJ | 2.123 | −2.152 | 6.398 |
| 19.500 | OJ | 2.123 | −2.152 | 6.398 |
| 29 | OJ | 2.123 | −2.152 | 6.398 |
| 19 | OJ | 2.123 | −2.152 | 6.398 |
| 22.500 | OJ | 2.123 | −2.152 | 6.398 |
| 38.500 | OJ | 2.123 | −2.152 | 6.398 |
| 26.400 | OJ | 2.123 | −2.152 | 6.398 |
| 28.400 | OJ | 2.123 | −2.152 | 6.398 |
A Forest plot puts many estimates on a common scale, each with its interval, and makes it easy to scan for the ones that exclude no effect.
Uncertainty in forecasts
In the appA forecast line alone looks like a promise. A fan chart shows how uncertainty widens as you look further ahead.
View data
| month | passengers (thousands) | kind | lo 80 | hi 80 | lo 95 | hi 95 |
|---|---|---|---|---|---|---|
| −662,688,000,000 | 110 | actual | — | — | — | — |
| −660,009,600,000 | 105 | actual | — | — | — | — |
| −657,590,400,000 | 120 | actual | — | — | — | — |
| −654,912,000,000 | 135 | actual | — | — | — | — |
| −652,320,000,000 | 136 | actual | — | — | — | — |
| −649,641,600,000 | 153 | actual | — | — | — | — |
| −647,049,600,000 | 154 | actual | — | — | — | — |
| −644,371,200,000 | 140 | actual | — | — | — | — |
| −641,692,800,000 | 131 | actual | — | — | — | — |
| −639,100,800,000 | 131 | actual | — | — | — | — |
| −636,422,400,000 | 129 | actual | — | — | — | — |
| −633,830,400,000 | 126 | actual | — | — | — | — |
| −631,152,000,000 | 116 | actual | — | — | — | — |
| −628,473,600,000 | 122 | actual | — | — | — | — |
| −626,054,400,000 | 141 | actual | — | — | — | — |
| −623,376,000,000 | 146 | actual | — | — | — | — |
| −620,784,000,000 | 157 | actual | — | — | — | — |
| −618,105,600,000 | 166 | actual | — | — | — | — |
| −615,513,600,000 | 171 | actual | — | — | — | — |
| −612,835,200,000 | 170 | actual | — | — | — | — |
| −610,156,800,000 | 163 | actual | — | — | — | — |
| −607,564,800,000 | 147 | actual | — | — | — | — |
| −604,886,400,000 | 144 | actual | — | — | — | — |
| −602,294,400,000 | 131 | actual | — | — | — | — |
| −599,616,000,000 | 135 | actual | — | — | — | — |
| −596,937,600,000 | 139 | actual | — | — | — | — |
| −594,518,400,000 | 146 | actual | — | — | — | — |
| −591,840,000,000 | 163 | actual | — | — | — | — |
| −589,248,000,000 | 174 | actual | — | — | — | — |
| −586,569,600,000 | 183 | actual | — | — | — | — |
| −583,977,600,000 | 185 | actual | — | — | — | — |
| −581,299,200,000 | 179 | actual | — | — | — | — |
| −578,620,800,000 | 185 | actual | — | — | — | — |
| −576,028,800,000 | 169 | actual | — | — | — | — |
| −573,350,400,000 | 154 | actual | — | — | — | — |
| −570,758,400,000 | 152 | actual | — | — | — | — |
| −568,080,000,000 | 149 | actual | — | — | — | — |
| −565,401,600,000 | 151 | actual | — | — | — | — |
| −562,896,000,000 | 184 | actual | — | — | — | — |
| −560,217,600,000 | 177 | actual | — | — | — | — |
| −557,625,600,000 | 185 | actual | — | — | — | — |
| −554,947,200,000 | 210 | actual | — | — | — | — |
| −552,355,200,000 | 212 | actual | — | — | — | — |
| −549,676,800,000 | 210 | actual | — | — | — | — |
| −546,998,400,000 | 199 | actual | — | — | — | — |
| −544,406,400,000 | 182 | actual | — | — | — | — |
| −541,728,000,000 | 181 | actual | — | — | — | — |
| −539,136,000,000 | 168 | actual | — | — | — | — |
| −536,457,600,000 | 171 | actual | — | — | — | — |
| −533,779,200,000 | 181 | actual | — | — | — | — |
| −531,360,000,000 | 202 | actual | — | — | — | — |
| −528,681,600,000 | 211 | actual | — | — | — | — |
| −526,089,600,000 | 208 | actual | — | — | — | — |
| −523,411,200,000 | 234 | actual | — | — | — | — |
| −520,819,200,000 | 249 | actual | — | — | — | — |
| −518,140,800,000 | 233 | actual | — | — | — | — |
| −515,462,400,000 | 225 | actual | — | — | — | — |
| −512,870,400,000 | 228 | actual | — | — | — | — |
| −510,192,000,000 | 204 | actual | — | — | — | — |
| −507,600,000,000 | 199 | actual | — | — | — | — |
First 60 of 156 rows.
Open it in Charts and read its How to read tab. Then look at a result card in Analyze: each estimate comes with its interval for the same reason.
Check your understanding
CheckpointCheck yourself
You want to show how much individual patients varied around a group's mean. Which bars?
Show the answer
Answer: a
SE and CI describe the precision of the mean, and shrink with more data. Only the SD describes individuals.
Check yourself
Bars on a chart get narrower when you collect more data. Which can't they be?
Show the answer
Answer: a
The SD settles near the population's spread, however much data you add.
Check yourself
A published bar chart has error bars and no note about them. What should you do?
Show the answer
Answer: b
SD bars are often about twice as wide as 95% CI bars or more, depending on the sample size. Unlabeled bars can't be interpreted.
Recap
Recap- SD, SE and CI answer different questions, so always say which you show.
- Overlap doesn't settle a comparison. Show the interval for the difference.
- Fan charts and estimation plots keep uncertainty in view.
Concepts in this lesson