The two definitions
The NIST/SEMATECH e-Handbook defines the standard deviation as the square root of the average squared distance from the mean, with N − 1 rather than N in the denominator, which puts it back in the units of the data. Its glossary defines the standard error as the standard deviation of a statistic's sampling distribution: take many samples of the same size, compute the mean of each, and the standard error is how much those means spread. For the mean of N independent values that spread works out to s divided by the square root of N, which is the term in the handbook's confidence limits for the mean.
Same units, same data, two different questions. The standard deviation stays roughly where it is as you collect more values, because it describes the population. The standard error keeps falling, because every extra value sharpens the estimate of the mean.
One sample of 10, worked through
Ten packages from a filling line are weighed in grams: 498, 503, 497, 505, 501, 499, 502, 496, 504, 500. The mean is 5005 ÷ 10 = 500.5 g. Each value's distance from the mean, squared, is in the table.
| Value | x − mean | Squared |
|---|---|---|
| 498 | -2.5 | 6.25 |
| 503 | 2.5 | 6.25 |
| 497 | -3.5 | 12.25 |
| 505 | 4.5 | 20.25 |
| 501 | 0.5 | 0.25 |
| 499 | -1.5 | 2.25 |
| 502 | 1.5 | 2.25 |
| 496 | -4.5 | 20.25 |
| 504 | 3.5 | 12.25 |
| 500 | -0.5 | 0.25 |
| Sum | 82.50 |
Variance: 82.50 ÷ (10 − 1) = 9.17 g². Standard deviation: √9.17 = 3.03 g. Standard error: 3.03 ÷ √10 = 3.03 ÷ 3.16 = 0.96 g. The standard deviation calculator gives both from a pasted list, and the average calculator the mean, median and mode if that is all you need.
Read the two results as two sentences. Packages on this line typically differ from the mean by about 3.0 g: that is the standard deviation, and a customer who picks one package feels it. The mean of 500.5 g is uncertain by about 0.96 g: that is the standard error, and it is what matters when you ask whether the line is filling to the target.
The square-root law
Fix the standard deviation at 10 and let the sample grow. The standard error falls with the square root of n, so quadrupling the sample only halves it.
| n | √n | SE = 10 ÷ √n |
|---|---|---|
| 4 | 2 | 5.00 |
| 9 | 3 | 3.33 |
| 16 | 4 | 2.50 |
| 25 | 5 | 2.00 |
| 100 | 10 | 1.00 |
| 400 | 20 | 0.50 |
Going from n = 4 to n = 400 is 100 times the data for a standard error 10 times smaller. The practical rule: to halve the standard error, collect 4 times as many values. The sample size calculator turns a target margin into the n that reaches it.
From standard error to a 95 percent interval
The standard error becomes useful once it is multiplied into an interval. The NIST handbook gives the confidence limits for the mean as mean ± t × s ÷ √N, where t comes from the t distribution with N − 1 degrees of freedom. For the 10 packages that is 9 degrees of freedom and t = 2.262 at 95 percent:
With a large sample the t value settles at 1.960, which is where the rule of thumb of plus or minus two standard errors comes from; the handbook's glossary notes that two standard errors is usually an approximate 95 percent interval. Using 1.96 instead of 2.262 here would give ± 1.88 g, a little too narrow for a sample of 10. The confidence interval calculator picks the right value for your n and level, and the z-score calculator looks up the multiplier for any other level.
Which one to report
| You want to say | Report | Example |
|---|---|---|
| How much the values differ from each other | Mean and standard deviation | 500.5 g (SD 3.0) |
| How precisely the mean is known | Mean and standard error, or the interval | 500.5 g (SE 0.96), 95% CI 498.3 to 502.7 |
| Whether two groups differ | The difference of the means with its interval | Difference ± t × SE of the difference |
| What range a single new value will fall in | Mean and standard deviation | About 494.6 to 506.4 g |
The standard deviation is a description of the sample. The standard error is a statement about an estimate. If a reader could reasonably ask "how much do individual values vary", give the SD; if the question is "how sure are you about that average", give the SE or, clearer still, the interval, since an interval already has the multiplier built in and does not depend on the reader knowing the sample size.
Error bars
An error bar on a chart can show either quantity, and the chart means something different each time. Bars of ± 1 SD show the spread of the data; two groups with overlapping SD bars can still have clearly different means. Bars of ± 1 SE show the precision of each mean and are much shorter, by a factor of √n. Bars of a 95 percent interval are about twice the SE bars. A chart that does not say which one it shows cannot be read, so the caption has to state it: "error bars show ± 1 SE, n = 10 per group" or "bars show 95 percent confidence intervals".
The common mistake
The mistake that comes up most is reporting the standard error where the spread was the question, because it is the smaller number. For the packages, "500.5 ± 0.96 g" looks like a very consistent line, but a customer holding the lightest package, 496 g, has not seen a value 0.96 g from the mean; they have seen one 4.5 g below it, which the standard deviation of 3.0 g makes expected and the standard error hides. The reverse mistake, using the SD as if it measured the precision of the mean, makes differences between groups look less certain than they are. Three checks catch both:
- Name it. Write SD or SE after the ± sign every time. A bare ± is the root of most misreadings.
- Check the ratio. SE should equal SD ÷ √n. For n = 10 the SD is about 3.2 times the SE; if the two numbers in a report are closer than that, one of them is mislabeled.
- Ask which question the number answers. Spread of values: SD. Precision of the mean: SE or the interval. Range for one future value: mean ± about 2 SD, not 2 SE.
Frequently asked questions
What is the difference between standard deviation and standard error?
The standard deviation describes how spread out the individual values are around their mean. The standard error describes how far the sample mean is likely to sit from the true mean. The standard error is the standard deviation divided by the square root of the sample size, so it is always smaller and shrinks as the sample grows, while the standard deviation settles toward a fixed value.
Which one should I report?
Report the standard deviation when the point is the spread of the data: how much people, parts or measurements differ from each other. Report the standard error, or better a confidence interval, when the point is how precisely you have pinned down the mean. Giving both is fine, as long as each is labeled: mean (SD) for describing the sample, mean ± SE or a 95 percent interval for comparing groups.
Why is the standard error divided by the square root of n and not by n?
Averaging cancels out random variation, but slowly. Four independent values average to a mean with half the spread of one value, not a quarter, because the variance of a mean is the variance divided by n and the standard deviation is its square root. To halve the standard error you need four times as many values; to cut it to a tenth you need a hundred times as many.
How do I get a 95 percent confidence interval from the standard error?
Multiply the standard error by the critical value for your sample size and add and subtract the result from the mean. The NIST handbook uses the t distribution with n − 1 degrees of freedom: 2.262 for a sample of 10, 1.960 for very large samples. The rule of thumb of plus and minus two standard errors comes from that 1.960.
Does a bigger sample make the standard deviation smaller?
No. A bigger sample estimates the standard deviation more reliably, but the value itself settles toward the true spread of the population, which does not depend on how many values you took. Only the standard error, the precision of the mean, falls with the sample size.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.6 Measures of Scale (the standard deviation as the square root of the sum of squared deviations divided by N − 1, in the units of the data)
- NIST/SEMATECH e-Handbook, 1.3.5.2 Confidence Limits for the Mean (the interval mean ± t × s ÷ √N with N − 1 degrees of freedom; the width shrinks with √N)
- NIST/SEMATECH e-Handbook, Glossary (standard error: the standard deviation of a statistic's sampling distribution; plus and minus 2 standard errors as an approximate 95 percent interval)
- NIST Dataplot reference manual, Difference of SD of the Mean (the standard deviation of the mean is s ÷ √n)
- NIST/SEMATECH e-Handbook, 1.3.6.7.2 Critical Values of the Student's t Distribution (2.262 for 9 degrees of freedom and 1.960 for the normal case at 0.975)