Skip to content
Tactiverge

School/□ Systems Engineer/Week 35

Figures that tell the truth, including the uncertainty

Two bars, one taller. Are those error bars standard deviations, standard errors or 95% intervals? Your reader can't tell, and it changes everything.

About 35 min · 3 goals · Checked by automated tests

1.Why should I care?

Most readers look at the figures first. A good figure lets them judge your claim in seconds; a careless one can make a 1% noise blip look like a breakthrough.

  • ◇ Choose a figure type that shows the data and its uncertainty honestly.
  • ◇ Write a caption that states what the error bars are, n and the conditions.
  • ◇ Avoid misleading axes, cherry-picked runs and hidden variability.

2.Predict

Two means with 95% confidence intervals that overlap slightly. Is the difference definitely not real?

Guess first. Being wrong here is how the surprise works.

3.Discover

Treat the 20 intervals as a figure. Change n and the confidence level and ask: what would a reader conclude from one interval alone? Then write the caption you would need for this exact figure (what the bars are, n, σ, the true value).

Loading the interactive…

Can't use the interactive? Read a description instead

The coverage simulator draws 20 confidence intervals as bars around a true value of 50, marking misses. It shows that any single interval may miss, that bars shrink as n grows and widen with confidence level, and therefore that a figure's caption must state what the bars are, the sample size and the method.

4.Checkpoint: guided practice

Check what you just discovered before going on. Hints appear after a wrong answer.

Practice 1

A figure shows error bars but the caption doesn't say what they are. Why is that a problem?

5.Watch

→ Notice how the video phrases what an interval means; borrow that precision for your captions.

A second angle on what a 95% interval does and does not promise, including the common wrong reading.

13 min 1 s · captions on YouTube · source

Nothing loads from YouTube until you press play.

The video is optional: everything you need is also in the lesson text and the interactive.

6.Understand

Show the data when you can

With fewer than about 30 points per group, plot every point (a dot or strip plot) with the mean or median and its interval on top. Bar charts hide the distribution and can hide outliers, two-hump shapes and tiny samples. For many runs, histograms, box plots or violin plots show the shape.

Say what the bars are

SD shows run-to-run spread; SE shows uncertainty of the mean; a 95% CI is about twice the SE. The same data can look decisive or hopeless depending on which you draw. The caption must say which, plus n, the conditions and the statistic (mean or median).

Axes and comparisons

Bar charts should start at zero, because bar length encodes value. Point plots may zoom in, but mark the axis clearly. Put compared conditions next to each other on the same axis. For ratios such as speed-ups, a log axis treats 2× faster and 2× slower symmetrically.

No cherry-picking

Show all runs or say exactly which were excluded and why (the rule set in advance). Don't choose the seed or the run that looks best. If you show an example time series, say how it was chosen ('first run' or 'median run'). A figure regenerated from a script with a fixed seed can be checked by anyone.

Explain it another way

A figure is a witness. It should tell the whole truth, including how unsure it is, in a way that even a hurried reader can't misread.

Worked example 1

Write a caption for a plot of energy per night for P, PI and thermostat controllers.

'Heater energy per simulated night (kWh) for three controllers; dots are individual nights (n = 5 each, noise seeds 1–5), horizontal lines are means, bars are 95% CIs (normal approximation). Same weather file and comfort limits throughout. Generated by plot_energy.py at commit a1b2c3d.'

Common mix-ups

  • Overlapping error bars mean there's no difference.
    ✓ It depends on what the bars are; slightly overlapping 95% CIs can still indicate a real difference. Compute the interval on the difference.
  • Showing the best run is fine as an illustration.
    ✓ Only if you say it was chosen as the best; otherwise show a typical or pre-chosen run, or all of them.

7.Practice on your own

Practice, not a test. Wrong answers get a hint and another try.

Practice 2

A plot shows SD bars of ±6 ms for n = 36 runs. What is the 95% CI half-width for the mean (z = 1.96), in ms?

ms

Practice 3

A bar chart of speed-up starts its y-axis at 0.95, making 1.02 look twice the height of 0.99. What's wrong?

Practice 4 · a fresh version every time

You repeat a measurement n = 25 times. The sample standard deviation is s = 3.5 W. Using the normal approximation (z = 2.576 for 99%), what is the half-width of the 99% confidence interval for the mean, in W? (3 significant figures.)

W

8.Apply it

Make the main figure for your term project from a script with a fixed seed. Write its full caption using the checklist. Ask a classmate what they conclude from the figure alone; if it differs from your conclusion, fix the figure.

9.Reflect

Concepts: Confidence intervals · Describing data · Reproducibility and documentation