Skip to content

Always label what error bars represent

baduncertaintymechanicalWilke 2019 p. 189Cleveland 1994 p. 214Miller 2013 p. 133

What kind of uncertainty interval do the horizontal whiskers represent?

Plotly Express Gapminder dataset, country life expectancy by continent in 2007.

“Always state explicitly what error bars represent, whether standard deviation, standard error, or a confidence interval”

Claus O. Wilke, "Fundamentals of Data Visualization", p. 188.

Also covered in Wilke 2019 (16 Visualizing Uncertainty, p. 189), Cleveland 1994 (3.14 Statistical Variation, p. 214), Miller 2013 (6 Creating Effective Charts, p. 133).

CVD preview

Before

Horizontal whiskers surround each continent mean without stating whether they represent standard deviation, standard error, or a confidence interval.

Download before Python code

After

The title, axis label, and direct annotations state the 95% confidence interval half-width and country count for every continent.

Download after Python code

Values

Africa averages 54.8 years while Europe averages 77.6 years and Oceania averages 80.7 years.

Africa averages 54.8 years (+/- 2.6, n=52) while Europe averages 77.6 years (+/- 1.1, n=30).

Values used in both charts
ContinentCountriesMean life expectancy (years)95% CI half-width
Africa5254.812.62
Asia3370.732.72
Americas2573.611.74
Europe3077.651.07
Oceania280.721.01