Standard Deviation
Standard deviation is a measure of how widely data values are spread around their mean. It is the square root of variance and expresses variability in the same units as the original data.
What Is Standard Deviation?
Standard deviation describes the typical scale of variation in a dataset around its mean. A small standard deviation means observations tend to cluster relatively close to the mean, while a large standard deviation means observations are more widely dispersed.
Standard deviation is calculated from the deviations between individual observations and the mean. Because positive and negative deviations would otherwise cancel each other out, the deviations are squared before being averaged. The square root of that average returns the measure to the original units.
The basic calculation can therefore be understood as:
Deviation from the Mean → Square the Deviations → Average the Squared Deviations → Take the Square Root
Standard deviation is closely related to variance. Variance is measured in squared units, while standard deviation is measured in the same units as the observations, making standard deviation generally easier to interpret.
There are two important versions of standard deviation. Population standard deviation describes the variability of an entire population and uses the population size in its denominator. Sample standard deviation estimates population variability from a sample and uses n − 1 in the denominator.
Standard deviation is a measure of dispersion, not location. Two datasets can have the same mean but very different standard deviations, and therefore very different amounts of variability.
For approximately normally distributed data, standard deviation also provides a useful way to describe how observations are distributed around the mean. Approximately 68% of observations fall within one standard deviation, 95% within two, and 99.7% within three when the normal-distribution assumptions are appropriate. This is commonly called the empirical rule or 68–95–99.7 rule.
That rule does not apply automatically to every dataset. For strongly skewed, heavy-tailed, or otherwise non-normal data, standard deviation can still be calculated, but the normal-distribution interpretation should not be applied without justification.
How It Works
- Identify the dataset and determine whether it represents an entire population or a sample.
- Calculate the mean. For a population, use the population mean μ. For a sample, use the sample mean x̄.
- Subtract the mean from every observation to obtain each deviation from the mean.
- Square each deviation. Squaring prevents positive and negative deviations from canceling and gives greater weight to observations farther from the mean.
- Add the squared deviations to obtain the sum of squared deviations.
- For a population, divide the sum of squared deviations by the population size N.
- For a sample, divide the sum of squared deviations by n − 1. The n − 1 denominator accounts for estimating the population mean from the same sample and provides the conventional unbiased estimator of population variance under standard assumptions.
- The resulting value is the variance.
- Take the square root of the variance to obtain standard deviation.
- Interpret the result in the original units of the data.
- Consider the distribution shape before applying rules such as the 68–95–99.7 rule.
- Check for outliers because standard deviation is sensitive to extreme observations.
- When comparing variability across datasets with substantially different means or scales, consider whether the coefficient of variation is more informative.
- When analyzing a sample, distinguish sample standard deviation from population standard deviation and do not treat the two formulas as interchangeable.
- When reporting standard deviation in an analysis, provide enough context about the dataset, mean, sample or population status, and units for the result to be meaningful.
Formula & Calculation Method
For a population, the standard deviation is:
σ = √[Σ(xᵢ − μ)² / N]
where:
- σ = population standard deviation
- xᵢ = individual population observation
- μ = population mean
- N = number of observations in the population
- Σ = sum across all observations
For a sample, the standard deviation is:
s = √[Σ(xᵢ − x̄)² / (n − 1)]
where:
- s = sample standard deviation
- xᵢ = individual sample observation
- x̄ = sample mean
- n = number of observations in the sample
- n − 1 = degrees-of-freedom adjustment used in the conventional sample variance estimator
The relationship between variance and standard deviation is:
Standard Deviation = √Variance
Variance = Standard Deviation²
For a population:
σ² = Σ(xᵢ − μ)² / N
For a sample:
s² = Σ(xᵢ − x̄)² / (n − 1)
The standard deviation of a dataset containing identical values is zero because every observation has zero deviation from the mean.
If the same constant is added to every observation:
SD(X + c) = SD(X)
Adding or subtracting a constant changes the location of the data but does not change its spread.
If every observation is multiplied by a constant c:
SD(cX) = |c| × SD(X)
Multiplying the data by a positive factor therefore multiplies the standard deviation by that factor. A negative factor reverses the direction of the measurements but standard deviation remains nonnegative, so the absolute value is used.
For a sample mean, the standard error of the mean is:
SEM = s / √n
Standard deviation and standard error are different quantities. Standard deviation describes variability among observations, while standard error describes the sampling variability of a statistic such as the sample mean.
Coefficient of Variation:
CV = s / x̄
or, expressed as a percentage:
CV = (s / x̄) × 100%
The coefficient of variation expresses standard deviation relative to the mean. It is most meaningful for ratio-scale measurements with a meaningful zero and can become unstable when the mean is zero or close to zero.
For approximately normally distributed data, the empirical rule states approximately:
- 68% of observations lie within μ ± 1σ
- 95% of observations lie within μ ± 2σ
- 99.7% of observations lie within μ ± 3σ
These percentages are approximations for data following an appropriate normal-distribution model and are not universal guarantees for arbitrary datasets.
For arbitrary distributions, Chebyshev's inequality provides the bound:
At least 1 − 1/k² of observations lie within k standard deviations of the mean, where k > 1.
For example:
- k = 2 → at least 75% of observations
- k = 3 → at least 88.89% of observations
- k = 4 → at least 93.75% of observations
For weighted data, the calculation must account for the assigned weights rather than treating every observation as equally influential. The appropriate formula depends on what the weights represent and whether the data describe a population or a sample.
A pooled standard deviation can be used to combine variability information from multiple groups under appropriate statistical assumptions. For two independent groups with the conventional pooled-variance assumptions:
sₚ = √[((n₁ − 1)s₁² + (n₂ − 1)s₂²) / (n₁ + n₂ − 2)]
where sₚ is the pooled standard deviation, s₁ and s₂ are group standard deviations, and n₁ and n₂ are group sample sizes.
Worked Example
Consider the dataset:
4, 6, 8, 10, 12
Assume these five observations represent the entire population.
Step 1: Calculate the population mean.
μ = (4 + 6 + 8 + 10 + 12) / 5
μ = 40 / 5
μ = 8
Step 2: Calculate each deviation from the mean.
- 4 − 8 = −4
- 6 − 8 = −2
- 8 − 8 = 0
- 10 − 8 = 2
- 12 − 8 = 4
Step 3: Square each deviation.
- (−4)² = 16
- (−2)² = 4
- 0² = 0
- 2² = 4
- 4² = 16
Step 4: Add the squared deviations.
16 + 4 + 0 + 4 + 16 = 40
Step 5: Calculate population variance.
σ² = 40 / 5 = 8
Step 6: Take the square root.
σ = √8 ≈ 2.83
Therefore, the population standard deviation is approximately:
2.83
The result means the dataset has a spread of about 2.83 units around its mean of 8. The value should not be interpreted as saying that every observation is exactly 2.83 units from the mean.
If the same five values instead represent a sample from a larger population, use n − 1:
s² = 40 / (5 − 1)
s² = 40 / 4
s² = 10
s = √10 ≈ 3.16
The sample standard deviation is therefore approximately:
3.16
The two results differ because population standard deviation describes the observed population directly, while sample standard deviation uses the n − 1 adjustment when estimating population variability from a sample.
As a second interpretation example, suppose a normally distributed measurement has:
Mean = 100
Standard deviation = 10
Approximately 68% of observations would be expected to fall between:
100 − 10 = 90
and
100 + 10 = 110
Approximately 95% would be expected to fall between:
100 − 20 = 80
and
100 + 20 = 120
Approximately 99.7% would be expected to fall between:
100 − 30 = 70
and
100 + 30 = 130
These ranges rely on the approximate normal-distribution assumption. They should not be automatically applied to every dataset.
How to Interpret Results
A standard deviation of zero means every observation has the same value. There is no variation in the dataset.
A relatively small standard deviation means observations are concentrated more closely around the mean, while a relatively large standard deviation indicates greater dispersion. However, "small" and "large" are always relative to the scale and context of the data.
Standard deviation has the same units as the original observations. If the observations are measured in kilograms, standard deviation is measured in kilograms. If revenue is measured in dollars, standard deviation is measured in dollars. Variance, by contrast, is expressed in squared units.
Standard deviation is sensitive to outliers because deviations are squared. An observation far from the mean can therefore have a disproportionately large influence on the result.
A large standard deviation does not necessarily mean the data are wrong. It may reflect genuine variability in the underlying process.
A small standard deviation does not necessarily mean measurements are accurate. A measurement system can produce highly consistent but systematically biased results. Precision and accuracy are different concepts.
The mean and standard deviation should normally be interpreted together. Standard deviation alone does not describe where a dataset is centered.
The 68–95–99.7 rule is useful when the data are reasonably well modeled by a normal distribution. It should not be used as a universal rule for arbitrary datasets.
Chebyshev's inequality provides a distribution-independent lower bound under its mathematical conditions, but it is much less specific than the empirical rule.
Standard deviation can be greater than the mean. There is no general mathematical requirement that SD must be smaller than the mean.
Standard deviation cannot be negative. It is the square root of a nonnegative variance.
Adding the same constant to every observation changes the mean but leaves standard deviation unchanged.
Multiplying every observation by a constant changes the standard deviation by the absolute value of that constant.
Standard deviation is not the same as the average absolute distance from the mean. Mean absolute deviation uses absolute deviations, whereas standard deviation is based on squared deviations followed by a square root.
Standard deviation and standard error answer different questions. Standard deviation describes variation among observations; standard error describes the uncertainty or sampling variability of a statistic such as the sample mean.
Standard deviation and variance also answer related but different interpretive needs. Variance is mathematically convenient and appears throughout statistical formulas, while standard deviation returns the measure to the original units.
When distributions are strongly skewed or contain substantial outliers, the median and interquartile range can provide a more resistant summary of center and spread than the mean and standard deviation.
When comparing relative variability across measurements with different means, the coefficient of variation can be useful. It should not be used indiscriminately, especially when the mean is zero or close to zero or when the measurement scale does not have a meaningful zero.
In finance, standard deviation is commonly used as a measure of return volatility. A larger standard deviation of returns indicates greater historical dispersion of returns, but it does not by itself establish future risk or guarantee that returns will follow a particular distribution.
In quality control and measurement, a smaller standard deviation can indicate greater precision when the measurement conditions and statistical assumptions are appropriate.
In inventory planning, standard deviation can quantify demand variability and can therefore be used in statistical safety-stock calculations. The meaning of the standard deviation depends on the period, units, and demand data from which it was calculated.
In data science and machine learning, standard deviation can be used to describe feature variability, standardize variables, detect unusual observations, and evaluate model or measurement behavior. Its appropriateness depends on the distribution and analytical objective.
A standard deviation is meaningful only in relation to the data-generating process and measurement scale. It should not be interpreted independently of the mean, units, distribution shape, sample or population status, and purpose of the analysis.
Real-World Applications
- Data Analysis: Standard deviation summarizes the variability of numerical datasets and is commonly reported alongside the mean.
- Descriptive Statistics: It provides a standard measure of dispersion for quantitative observations.
- Probability: Standard deviation characterizes the spread of probability distributions and is a key parameter of the normal distribution.
- Statistical Inference: Standard deviation is used in standard errors, test statistics, confidence intervals, and other inferential procedures.
- Finance & Investing: Standard deviation is commonly used to describe the historical volatility of investment returns.
- Portfolio Analysis: Standard deviations of returns contribute to risk analysis alongside correlations and covariances between assets.
- Manufacturing: Standard deviation helps quantify variation in production measurements, dimensions, weights, cycle times, and other process characteristics.
- Quality Control: Standard deviation can help assess process variability and measurement precision.
- Metrology: Standard deviation is used to characterize repeatability and other components of measurement variability.
- Supply Chain: Demand standard deviation can be incorporated into safety-stock and inventory-risk calculations.
- E-commerce: Variation in daily orders, revenue, conversion-related measurements, and customer behavior can be summarized using standard deviation.
- Forecasting: Standard deviation can describe historical forecast errors or variability when the chosen statistical model calls for it.
- Healthcare: Standard deviation can summarize variability in measurements such as laboratory values, physiological measurements, or treatment-related observations, subject to appropriate statistical interpretation.
- Education: Standard deviation can describe how widely student scores are distributed around the average score.
- Survey Research: Standard deviation can summarize variability among quantitative responses.
- Experimental Science: Standard deviation can characterize variation among repeated observations or measurements.
- Engineering: Standard deviation can quantify variability in dimensions, tolerances, physical measurements, and experimental results.
- Environmental Science: Standard deviation can summarize variability in measurements such as temperature, rainfall, pollution levels, or other environmental variables.
- Machine Learning: Standard deviation can help describe feature distributions and is commonly used when standardizing numerical features.
- Data Preprocessing: Standardization commonly transforms a value using its deviation from the mean divided by the standard deviation.
- Anomaly Detection: Observations several standard deviations from an expected mean can be flagged as unusual when the underlying distribution and detection method justify that approach.
- Operations: Standard deviation can quantify variation in processing times, demand, defects, or other operational measurements.
- Business Analytics: Standard deviation can help compare the consistency or variability of sales, revenue, productivity, and other business metrics.
- Measurement Systems: Repeated measurements can be analyzed using standard deviation to evaluate precision and repeatability.
- Inventory Management: Demand standard deviation can be used with service-level assumptions and lead-time information to determine statistical safety-stock requirements.
- Research: Standard deviation is commonly reported to describe variability in sample data and is used throughout statistical analysis.
Common Mistakes & Misconceptions
- Treating standard deviation as the simple average of absolute distances from the mean.
- Confusing standard deviation with variance.
- Forgetting to take the square root after calculating variance.
- Using the population formula when estimating population variability from a sample without understanding the distinction.
- Using n instead of n − 1 for conventional sample variance estimation.
- Using n − 1 automatically when the data represent the entire population.
- Assuming a larger standard deviation is always bad.
- Assuming a smaller standard deviation automatically means the measurements are accurate.
- Confusing precision with accuracy.
- Assuming standard deviation can be negative.
- Assuming standard deviation must always be smaller than the mean.
- Assuming a standard deviation of zero means the mean is zero.
- Applying the 68–95–99.7 rule to strongly non-normal data without justification.
- Assuming approximately 95% of every dataset lies within two standard deviations of its mean.
- Ignoring outliers when interpreting standard deviation.
- Assuming standard deviation is resistant to extreme values.
- Confusing standard deviation with standard error.
- Treating coefficient of variation as universally appropriate.
- Using coefficient of variation when the mean is zero or very close to zero.
- Comparing standard deviations without considering the units or scale of the datasets.
- Assuming adding a constant changes standard deviation.
- Assuming multiplying all observations by a constant leaves standard deviation unchanged.
- Forgetting that multiplying data by a negative constant uses the absolute value of that constant when determining the new standard deviation.
- Reporting a standard deviation without specifying the relevant units.
- Reporting a standard deviation without clarifying whether it is a sample or population measure when that distinction matters.
- Assuming two datasets with the same standard deviation have the same distribution.
- Assuming two datasets with the same mean and standard deviation must have the same shape.
- Assuming standard deviation alone identifies outliers.
- Treating observations several standard deviations from the mean as automatically erroneous.
- Ignoring skewness when interpreting mean and standard deviation.
- Assuming standard deviation measures uncertainty in a sample mean. Standard error addresses that specific sampling concept.
- Assuming standard deviation proves that data follow a normal distribution.
- Treating a model-based standard deviation as a guaranteed prediction of future variability.
- Ignoring the time period or aggregation level when calculating standard deviation for demand or other time-series data.
- Mixing incompatible units or measurement scales when calculating variability.
- Assuming a lower standard deviation always means a better process without considering the target value or systematic bias.
- Using pooled standard deviation without checking whether the statistical assumptions for pooling are appropriate.
- Treating weighted and unweighted standard deviations as interchangeable when observations have different weights.
Frequently Asked Questions
What is standard deviation?
Standard deviation is a measure of how widely observations are spread around their mean. It is calculated as the square root of variance and is expressed in the original units of the data.
What does standard deviation measure?
Standard deviation measures the dispersion of observations around their mean. A larger standard deviation indicates greater spread, while a smaller standard deviation indicates greater concentration around the mean.
How do you calculate standard deviation?
Calculate the mean, find each observation's deviation from the mean, square the deviations, average the squared deviations using the appropriate population or sample denominator, and take the square root of the result.
What is the standard deviation formula?
For a population, σ = √[Σ(xᵢ − μ)² / N]. For a sample, s = √[Σ(xᵢ − x̄)² / (n − 1)]. The appropriate formula depends on whether the data represent a population or a sample.
What is the difference between population and sample standard deviation?
Population standard deviation describes the variability of an entire population and divides by N. Sample standard deviation estimates population variability from a sample and conventionally divides by n − 1.
Why does sample standard deviation use n − 1?
The n − 1 adjustment accounts for the fact that the population mean is unknown and is estimated from the same sample. Under standard assumptions, using n − 1 produces an unbiased estimator of the population variance.
What does a standard deviation of 0 mean?
A standard deviation of 0 means every observation in the dataset has exactly the same value. There is no variation around the mean.
What does a high standard deviation mean?
A high standard deviation means the observations are relatively dispersed around their mean. Whether that is considered high depends on the units, scale, context, and comparison being made.
What does a low standard deviation mean?
A low standard deviation means observations are relatively concentrated around their mean. It does not by itself mean that the measurements are accurate or desirable.
What is the relationship between variance and standard deviation?
Variance is the average squared deviation from the mean under the relevant population or sample formula. Standard deviation is the square root of variance, returning the measure to the original units.
Why is standard deviation in the original units?
The calculation squares deviations, producing squared units, and then takes the square root. The square root returns the result to the same units as the original observations.
What is the 68–95–99.7 rule?
For approximately normally distributed data, about 68% of observations fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three.
Does the 68–95–99.7 rule apply to every dataset?
No. The rule is based on an approximately normal distribution. Arbitrary or strongly skewed distributions do not necessarily follow those percentages.
What is Chebyshev's theorem?
Chebyshev's inequality states that at least 1 − 1/k² of observations lie within k standard deviations of the mean for k > 1, regardless of the distribution's specific shape, subject to the theorem's conditions.
What is the difference between standard deviation and variance?
Variance measures squared deviations from the mean, while standard deviation is the square root of variance. Variance uses squared units; standard deviation uses the original units.
What is the difference between standard deviation and standard error?
Standard deviation describes variability among individual observations. Standard error describes the sampling variability or uncertainty of a statistic, such as the sample mean.
What is the difference between standard deviation and IQR?
Standard deviation uses all observations and is sensitive to extreme values. The interquartile range measures the distance between the first and third quartiles and is more resistant to outliers.
How do outliers affect standard deviation?
Outliers can substantially increase standard deviation because the calculation squares deviations from the mean. An extreme observation can therefore have a disproportionately large influence on the result.
Does adding a constant change standard deviation?
No. Adding or subtracting the same constant from every observation changes the mean but leaves standard deviation unchanged.
Does multiplying by a constant change standard deviation?
Yes. Multiplying every observation by a constant c changes the standard deviation to |c| times the original standard deviation.
What is the coefficient of variation?
The coefficient of variation compares standard deviation with the mean. It is commonly calculated as CV = (s / x̄) × 100% and expresses relative variability as a percentage.
When should you use coefficient of variation instead of standard deviation?
Coefficient of variation can be useful when comparing relative variability across datasets with different means or scales, particularly for ratio-scale measurements with meaningful zeros. It is problematic when the mean is zero or close to zero.
Can standard deviation be negative?
No. Standard deviation is always zero or positive because it is the square root of a nonnegative variance.
Can standard deviation be larger than the mean?
Yes. There is no general mathematical rule requiring standard deviation to be smaller than the mean. The relationship depends on the distribution and scale of the data.
What units does standard deviation use?
Standard deviation uses the same units as the original observations. For example, if measurements are in kilograms, standard deviation is in kilograms.
What is pooled standard deviation?
Pooled standard deviation combines variability information from multiple groups into a common estimate under appropriate statistical assumptions. It is used in methods such as pooled-variance comparisons and some effect-size calculations.
What is weighted standard deviation?
Weighted standard deviation calculates variability while giving observations different levels of influence according to specified weights. The correct formula depends on what the weights represent and whether the calculation describes a population or estimates a sample quantity.
How is standard deviation used in finance?
Standard deviation is commonly used to describe the historical dispersion of investment returns and is therefore often used as a measure of volatility. It does not by itself establish future risk or guarantee a normal distribution of returns.
How is standard deviation used in quality control?
Standard deviation can quantify process or measurement variability. It can help assess consistency and precision and can be used in statistical process-control and measurement analyses when the relevant assumptions are satisfied.
How is standard deviation used in machine learning and data science?
Standard deviation is used to describe feature variability, standardize numerical variables, analyze distributions, identify unusual observations, and summarize model or measurement behavior.
How is standard deviation used in inventory management?
Standard deviation can quantify demand variability and can be incorporated into statistical safety-stock calculations. The calculation must use compatible units and an appropriate measure of demand variability.
What is the difference between standard deviation and mean absolute deviation?
Mean absolute deviation averages the absolute distances from a central value, while standard deviation is based on squared deviations followed by a square root. Standard deviation gives greater influence to observations with larger deviations.
What is the difference between standard deviation and range?
Range is the difference between the maximum and minimum observations. Standard deviation incorporates all observations and measures their dispersion around the mean, while range depends only on the two extremes.
Does a large standard deviation mean the data are inaccurate?
No. Standard deviation describes variability, not accuracy. A measurement system can be precise but inaccurate if its results consistently differ from the true value.
Does a small standard deviation mean the data are reliable?
Not necessarily. A small standard deviation indicates low dispersion, but the measurements can still be systematically biased, incorrectly collected, or unrepresentative of the target population.
Can two datasets have the same standard deviation but different distributions?
Yes. Standard deviation summarizes one aspect of dispersion and does not uniquely determine the shape of a distribution. Two datasets can have the same mean and standard deviation while differing substantially in skewness, tails, or other characteristics.
Can standard deviation identify outliers?
Standard deviation can help identify unusually distant observations when combined with an appropriate model or rule, but standard deviation alone does not define an outlier. Distribution shape and the chosen detection method must also be considered.
What happens to standard deviation when all values are shifted?
Adding the same constant to every value leaves standard deviation unchanged because all observations remain equally separated from one another.
What happens to standard deviation when all values are scaled?
Multiplying every value by c multiplies standard deviation by |c|. For example, converting measurements from meters to centimeters multiplies both the observations and their standard deviation by 100.
Why is standard deviation important?
Standard deviation provides a widely used quantitative measure of variability. It helps describe datasets, compare consistency, quantify uncertainty and volatility, analyze distributions, evaluate measurement precision, and support statistical methods across science, business, finance, engineering, and data analysis. ---