liveBook · Manning

Standard deviation

As explained in Modern C

Standard deviation is a measure of the dispersion of observations around their mean.

Repeated timings

Twenty timings range from 0.1 to 1.3 seconds. Their mean is 0.6 seconds, but their standard deviation is 0.31 seconds: the runs vary substantially. section 15.3

Standard deviation σ(S) measures how much observed timings depart from an ideal in which every run takes the same time. It has the same unit as the timings. Dividing it by the mean μ(S) gives the relative standard deviation; here, 0.31/0.6 is about 52%. section 15.3

TAKEAWAY: Relative standard deviation of run times should be in a low percentage range. A high value may signal a perturbed computation, unreliable measurement, or both; it does not identify which. section 15.3

Figure 15.1. Frequency histogram for our sample, showing the frequency with which each of the measured values was obtained

The frequency histogram makes the spread of the twenty measured timings visible. section 15.3

How Modern C covers it

How deep it goes
Defines standard deviation through timing variation and works a relative comparison; does not derive its formula.
Examples
Uses twenty timings, their frequency histogram, and a 52% relative standard deviation.
What you can do after
Evaluate/understand whether repeated runtime measurements vary too much to support a confident interpretation.
How it connects
Connects standard deviation to the mean, relative standard deviation, measurement bias, and runtime instrumentation.

Also explained in

Compare how 15 books explain standard deviation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Modern C. The section links point to the parts of the book it draws on.