Confidence bandThe likely range around a line.
A line through the data and a shaded band around it. Where the true line most likely runs, sure in the middle, unsure at the edges.
- Answers How sure is this number?
- Your data an estimate with a low and a high end at each point
- Points about 10 to 1,000
- Band often 95%
- Excel and Power BI a trend line or two extra lines
- Estimate
- Likely range
- Seen
What is a confidence band?
A confidence band is a shaded area around a line where the true value most likely lies. The line is an estimate, such as a trend fitted through scattered points, and the band shows how sure that estimate is at every point. It is narrow where there is plenty of data around and wider at the edges, where the line has less to lean on.
Ice cream portions sold per day against the day's temperature. Sales rise by about 5 portions per degree; the band is narrowest around 20°.
Why use a confidence band?
Because a line looks more certain than it is.
- Doubt in one shape. One band instead of a bar at every point.
- Where it is sure. Narrow parts are trustworthy, wide parts less so.
- Calm. A soft shade does not crowd the line.
- Honest trends. A rise inside a wide band may be no rise at all.
How does a confidence band work?
Four steps build a confidence band.
- Step 1 of 4The dataOne dot per day: temperature and portions sold.
- Step 2 of 4Fit a lineThe best straight line through the dots: about 5 portions more per degree.
- Step 3 of 4Add the bandWhere the true line most likely runs, 95 times in 100.
- Estimate
- Likely range
- Step 4 of 4Back to the dotsDots outside the band are normal: it is about the line, not single days.
- Estimate
- Likely range
- Seen
What are the parts of a confidence band?
Four parts, and each one has a job.
- Estimate
- Likely range
- Seen
- Linethe estimate
- Bandwhere the true line likely runs
- Narrow partthe most data, the surest estimate
- Point outsidea single day off the line
How do you read a confidence band?
Three looks, in this order.
- Follow the lineFrom 40 portions at 10° to 140 at 30°.
- Read the widthAt 20°, 82 to 98 portions; at 30°, 126 to 154.
- Estimate
- Likely range
- Ask if the trend holdsEven the band's low edge rises: the trend is real.
- Estimate
- Likely range
- Seen
What kinds of confidence band are there?
The same days, three ways.
- Kind 1Band and dotsThe full picture.
- Estimate
- Likely range
- Seen
- Kind 2Band onlyThe estimate and its doubt.
- Estimate
- Likely range
- Kind 3Error barsA bar at every point instead of a band.
A prediction band is wider: it shows where single new days would fall, not the average line. Over time, a band that widens into the future is a fan chart.
When should you use a confidence band?
When a line is an estimate and readers should see its doubt.
- a trend or fitted line is the message
- points are many and in order
- the sureness changes along the line
- readers may over-trust the line
- there are a few separate groups (error bars)
- the future is the point (a fan chart)
- the values are exact (no band)
Confidence band or error bars?
One shape along the line, or a bar at every point.
Error bars at eleven points become a fence of lines, and the eye has to join their ends. The confidence band joins them into one soft shape, so the narrow middle and the wide ends are clear at once.
How do you make a confidence band?
An estimate and two bounds per point, in Excel or Power BI.
In Excel, add a trendline to a scatter chart, then plot the lower and upper bounds as two lines, or as a stacked area with a transparent bottom. In Power BI, the forecast in the Analytics pane of a line chart draws a band (the Analytics pane), and the line chart's error bars can be shown as a shaded band. In Python, seaborn.regplot draws a line with its band.
What goes wrong with confidence bands?
The most common mistake, and its fix: reading the band as where the data falls.
- the band is where the average line likely runs
- for single days, a wider prediction band
| Mistake | Why it hurts | Fix |
|---|---|---|
| Band read as range of data | Single days look surprising | Say what the band covers |
| Not saying the level | 80% and 95% bands differ a lot | Name it: 95% |
| A dark band | The line disappears | A light shade |
| Line beyond the data | Bands explode at the ends | Stop where the data stops |
| No band at all | The line looks certain | Show the doubt |
Every chart for “How sure is this number?”
Read on, step by step.
Does it fit your data? Try it.
Paste your table into Chart Compass, say what the chart should show, and see the charts that fit, drawn with your own numbers. It runs in your browser, so the data stays with you.