liveBook · Manning

Standard deviation

As explained in Statistics Every Programmer Needs

Standard deviation is a measure of the typical distance of observations from their mean.

Standard deviation measures the typical distance of observations from their mean. It summarizes variability in the same units as the underlying data, making spread easier to interpret than variance. section 14.1.3 section 12.5.3

Use the appropriate interpretation and calculation for the data and decision:

  • For continuous measurements, calculate the square root of the average squared differences between observations and their mean. section 14.1.3
  • For proportions in a p-chart, use the proportion of defectives, its complement, and the sample size; larger samples reduce proportion variability. section 14.1.3
  • Interpret a larger value as greater spread or volatility, but compare values within the same measurement context. section 9.5.4 section 9.5.2

From historical returns to simulation

For GM daily log returns, Python calculates a mean of approximately −0.00061 and a standard deviation of 0.02005. The mean represents the average daily trend, while the standard deviation supplies the volatility parameter for generating simulated returns and potential future price paths. section 9.5.4

>>> mu = log_returns.mean()
>>> print(mu)
-0.000605520424324896

>>> sigma = log_returns.std()
>>> print(sigma)
0.020045660849343817

Inspect the concise Python calculation of the mean and standard deviation used as Monte Carlo inputs. section 9.5.4

In quality control, an s-chart tracks sample standard deviations over time. Their average forms the center line, while correction-factor-based control limits identify unusually high or low process variability. section 14.3.3

How Statistics Every Programmer Needs covers it

How deep it goes
Explains interpretation, continuous and proportion formulas, Python calculation, simulation use, and s-chart control limits.
Examples
Uses GM returns, GM closing prices, piston-ring diameters, defective proportions, and Benford-distribution leading digits.
What it assumes
Assumes familiarity with means and basic descriptive statistics while distinguishing continuous measurements from proportions.
What you can do after
Apply it via Python to quantify variability, parameterize simulations, compare datasets, and monitor process stability.
How it connects
Connects standard deviation with the mean, variance, Monte Carlo simulation, control charts, p-charts, s-charts, and z-statistics.

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 Statistics Every Programmer Needs. The section links point to the parts of the book it draws on.