Standard Deviation Explained: Formula, Uses & Examples
Standard Deviation measures how much data varies from the mean. Learn its formula, calculation, real-world uses, examples, and key differences from variance.
Standard deviation measures how far values in a dataset typically lie from the mean. A small standard deviation indicates that the values are relatively close together. A large standard deviation indicates greater variation.
An average describes the center of a dataset, but it does not show whether the observations are consistent or widely scattered. Standard deviation adds that missing information and is therefore one of the most widely used measures of variability in statistics.
What Is Standard Deviation?
Standard deviation is the square root of variance. It summarizes the spread of observations around their arithmetic mean and is reported in the same unit as the original data.
Consider two classes with an average examination score of 75. In the first class, nearly every student scores between 72 and 78. In the second, scores range from 40 to 100. The classes have the same mean, but the second class has a much larger standard deviation because its scores are more dispersed.
A low or high value is not automatically good or bad. The interpretation depends on the subject. Low variation may be desirable in manufacturing, while higher variation may be expected in investment returns or biological measurements.
Population and Sample Standard Deviation
The formula depends on whether the data represents the complete population of interest or only a sample from a larger population.
Population standard deviation
σ = √[ Σ(xᵢ − μ)² / N ]
Use this formula when every member of the population is included. Here, σ is the population standard deviation, xᵢ is an individual value, μ is the population mean, and N is the number of observations in the population.
Sample standard deviation
s = √[ Σ(xᵢ − x̄)² / (n − 1) ]
Use this formula when a sample is being used to estimate variability in a larger population. Here, s is the sample standard deviation, x̄ is the sample mean, and n is the sample size. Dividing by n − 1 reduces the tendency of a sample to underestimate population variability.
How to Calculate Standard Deviation
Suppose a sample contains the values 5, 7, 3, and 7. The calculation can be completed in six steps.
1. Find the mean. (5 + 7 + 3 + 7) ÷ 4 = 5.5
2. Find each deviation. Subtract 5.5 from each observation.
3. Square the deviations. This prevents positive and negative deviations from cancelling.
4. Add the squared deviations. The sum is 11.
5. Divide by n − 1. Because the values are a sample, 11 ÷ 3 = 3.6667.
6. Take the square root. √3.6667 ≈ 1.91.
| Value (xᵢ) | Deviation (xᵢ − 5.5) | Squared deviation |
|---|---|---|
| 5 | −0.5 | 0.25 |
| 7 | 1.5 | 2.25 |
| 3 | −2.5 | 6.25 |
| 7 | 1.5 | 2.25 |
| Total | 11.00 |
For this sample, the standard deviation is approximately 1.91. This means the observations are spread around the mean of 5.5 by roughly two units.
How to Interpret the Result
Standard deviation must be interpreted in the context of the measurement scale and the dataset. There is no universal threshold that defines a value as low or high.
- A small standard deviation means that observations are concentrated near the mean.
- A large standard deviation means that observations are more widely spread.
- A standard deviation of zero means that all observations are identical.
- Standard deviation cannot be negative.
For approximately normally distributed data, about 68% of observations fall within one standard deviation of the mean, about 95% fall within two, and about 99.7% fall within three. These percentages should not be applied automatically to strongly skewed or irregular distributions.
Standard Deviation and Variance
Variance and standard deviation measure the same underlying property: dispersion around the mean. Variance is the average squared deviation from the mean. Standard deviation is the square root of that variance.
The main practical difference is the unit. If the data is measured in kilograms, the variance is expressed in kilograms squared, while the standard deviation is expressed in kilograms. Standard deviation is therefore usually easier to communicate, while variance is often convenient in statistical formulas and models.
When Is Standard Deviation Useful?
Standard deviation is useful whenever the amount of variation matters. Common applications include:
- Research: describing variation in measurements or participant responses.
- Finance: summarizing the volatility of returns, while recognizing that volatility is not the only form of risk.
- Manufacturing: monitoring whether product dimensions or process outputs remain consistent.
- Education: comparing the spread of examination scores.
- Business analysis: assessing variation in sales, demand, delivery times, or operational performance.
- Data science: identifying unusual values, checking feature distributions, and supporting standardization.
Limitations and Common Mistakes
Standard deviation is informative, but it should not be interpreted in isolation.
- Outliers can increase it substantially because deviations are squared.
- For strongly skewed data, the median and interquartile range may describe the distribution more clearly.
- A lower value is not always preferable. The desired amount of variation depends on the purpose of the analysis.
- Standard deviations should not be compared casually across variables measured in different units or with very different means.
- Standard deviation does not show the shape of the distribution and does not prove that data is normally distributed.
A graph, such as a histogram or box plot, should usually be reviewed alongside the numerical summary. When relative variability is the main concern, the coefficient of variation may also be useful if the mean and measurement scale make that comparison meaningful.
Calculating Standard Deviation in Software
Most statistical and spreadsheet tools provide separate functions for population and sample standard deviation. Always check the function definition before reporting the result.
Excel or Google Sheets
Sample: =STDEV.S(A1:A10)
Population: =STDEV.P(A1:A10)
Python with NumPy
np.std(values, ddof=1) # sample standard deviation
np.std(values, ddof=0) # population standard deviation
Python with pandas
pd.Series(values).std() # sample standard deviation by default
Frequently Asked Questions
Can standard deviation be greater than the mean?
Yes. The mean and standard deviation measure different properties, so standard deviation is not required to be smaller than the mean.
Is standard deviation affected by outliers?
Yes. Extreme values receive substantial weight because deviations are squared.
What is the difference between standard deviation and standard error?
Standard deviation describes variation among observations. Standard error describes uncertainty in an estimated statistic, such as a sample mean.
Should standard deviation be used for skewed data?
It may still be reported, but it should be interpreted with a graph and robust measures such as the median and interquartile range.
Which formula should I use?
Use the population formula when the dataset includes the complete population of interest. Use the sample formula when the data is a sample used to estimate a larger population.
Summary
Standard deviation describes how widely observations are spread around their mean. Use the population formula for a complete population and the sample formula for a sample-based estimate. Interpret the value in the original measurement unit and within the context of the data. For reliable analysis, review distribution shape and outliers, and combine standard deviation with other summaries and appropriate graphs.
