Skip to content
CoursesLog in
← Statistics glossary

standard deviation (SD)

The square root of the variance; spread expressed in the same units as the data.

The standard deviation (SD) measures how far values typically sit from the mean. A small SD means the values are packed tightly around the mean; a large one means they are scattered. Unlike the variance, it is in the same units as the data (hours, dollars, orders), which is why it is the spread measure people actually report: "delivery takes 24 ± 8 hours".

Step by step, for a sample of nn values:

  1. Compute the mean xˉ\bar{x}.
  2. Subtract it from every value to get the deviations xi−xˉx_i - \bar{x}. They always sum to zero, so you can't simply average them.
  3. Square each deviation and add the squares up.
  4. Divide by n−1n - 1. That is the sample variance s2s^2.
  5. Take the square root.

s=∑i=1n(xi−xˉ)2n−1s = \sqrt{\frac{\sum_{i=1}^{n}(x_i - \bar{x})^2}{n - 1}}

If your data is the whole population rather than a sample, divide by nn instead. In product analytics you almost always have a sample, so n−1n - 1 is the default: STDEV.S in Sheets or Excel, as opposed to STDEV.P.

For roughly bell-shaped data (see normal distribution) about 68% of values fall within one SD of the mean and about 95% within two. On skewed data that rule breaks down, and because deviations are squared, a few outliers can inflate the SD a lot. There the interquartile range is the safer partner of the median. To compare spread across metrics on different scales, divide the SD by the mean to get the coefficient of variation. And don't confuse the SD, the spread of individual values, with the standard error, the uncertainty of a mean.

Example

Daily orders from CatChow's paid social ads over five days: 32, 24, 34, 28, 32.

  1. Mean: xˉ=(32+24+34+28+32)/5=150/5=30\bar{x} = (32 + 24 + 34 + 28 + 32) / 5 = 150 / 5 = 30 orders.
  2. Deviations: +2,−6,+4,−2,+2+2, -6, +4, -2, +2 (sum: 0).
  3. Squares: 4,36,16,4,44, 36, 16, 4, 4; sum of squares =64= 64.
  4. Sample variance: s2=64/(5−1)=16s^2 = 64 / (5 - 1) = 16 orders².
  5. Standard deviation: s=16=4s = \sqrt{16} = 4 orders.

Report it as 30 ± 4 orders a day: a typical day lands about 4 orders away from 30. If these five days were the entire population you cared about, you would divide by 5 instead: 64/5=12.8≈3.58\sqrt{64 / 5} = \sqrt{12.8} \approx 3.58. With only five values the population version comes out about 11% smaller, which is why it matters which function your dashboard uses.

Common mistakes

  • Confusing SD with standard error. SD describes how individual days or orders vary; the standard error describes how precisely you know the mean, and it shrinks as nn grows.
  • Applying the 68/95 rule to skewed data. CatChow's 90-day spend per new customer has a mean of $50 and an SD of about $47.7, so "mean ± 2 SD" goes down to about −$45, a spend nobody can have.
  • Mixing STDEV.S and STDEV.P. On small samples the population version is noticeably smaller. Pick the sample version unless you really have every observation.
  • Reporting the mean without the SD. Two couriers can both average 24 hours while one ranges from 14 to 38. Show "24 ± 8 hours", not just "24".
  • Comparing raw SDs of metrics on different scales. An SD of $150 in ad spend and 9 in orders can't be compared directly; use the coefficient of variation.

Learn it in the course