What is the standard deviation?
In probability theory and statistical analysis, standard deviation is the primary metric used to quantify the amount of variation, dispersion, or spread of a set of numerical data values around their arithmetic mean.
Conceptually, standard deviation measures the "typical" or "average" distance that individual observations lie away from the center of the distribution:
- Low Standard Deviation: Indicates that the individual data points cluster closely around the mean. This reflects high consistency, minimal error, and reliable predictability (for example, a machine producing identical parts with minimal tolerance variation).
- High Standard Deviation: Signifies that the data values are widely dispersed across a broader spectrum. This indicates high volatility, diversity, or significant variation (such as highly volatile stock prices or fluctuating regional temperatures).
-
Standard Deviation of Zero (σ = 0 or s = 0): Occurs if and only if every single observation in the dataset has the exact same identical value (e.g.
[5, 5, 5, 5]), indicating zero dispersion.
$² or centimeters squared cm²), standard deviation takes the principal square root of the variance. This brings the dispersion metric back into the exact same physical units of measurement as the original dataset (e.g., dollars $, centimeters cm, or test points), making it immediately meaningful and practical to interpret.
Standard Deviation Formula
In quantitative statistics, there are two governing mathematical formulas for standard deviation depending on whether your dataset represents a sample drawn from a wider population or the entire population itself.
Sample Standard Deviation Formula
When your dataset represents a sample drawn from a larger target population, use the Sample Standard Deviation Formula:
Where:
- s refers to sample standard deviation
- N is the number of observations
- xi is the observed values of the sample item, and
- x̄ is the mean value of the sample
Notice the denominator N − 1 instead of N. This is known as Bessel's correction. When estimating population variability from a sample, sample observations are naturally closer to their own sample mean (x̄) than to the true, unknown population mean (μ). Dividing by N − 1 slightly increases the result, correcting for this downward estimation bias and yielding an unbiased estimator of true population variance.
Population Standard Deviation Formula
When your dataset contains every single member or observation in the entire population under investigation, use the Population Standard Deviation Formula:
Where:
- σ refers to population standard deviation
- N is the size of the population
- xi is the observed values from the population, and
- μ is the population mean
| Statistical Attribute | Sample Standard Deviation (s) | Population Standard Deviation (σ) |
|---|---|---|
| Data Scope | A subset / sample collected from a larger group | Every individual item in the entire population |
| Formula | s = √[ Σ(xᵢ − x̄)² / (N − 1) ] |
σ = √[ Σ(xᵢ − μ)² / N ] |
| Denominator | N − 1 (Bessel's correction for unbiased estimation) |
N (Exact population count) |
| Mean Notation | x̄ (Sample Mean) |
μ (Population Mean) |
| Common Application | Clinical trials, public polling, quality sampling | Complete census data, all students in one closed classroom |
How To Calculate Standard Deviation?
Whether calculating by hand or using our precision online calculator, the procedure for finding standard deviation involves a systematic 5-step algorithm:
-
Step 1: Calculate the Arithmetic Mean
Add all individual data points together and divide by the total count N:
x̄ = (Σ xᵢ) / N -
Step 2: Calculate Deviations from the Mean
Subtract the calculated mean from each individual data observation:
Deviation = xᵢ − x̄(Note: The algebraic sum of all deviations always equals zero:Σ(xᵢ − x̄) = 0). -
Step 3: Square Each Deviation
Multiply each individual deviation by itself to remove negative signs:
Squared Deviation = (xᵢ − x̄)² -
Step 4: Calculate the Sum of Squared Deviations (SS)
Add all squared deviations together to obtain the Sum of Squares:
SS = Σ (xᵢ − x̄)² -
Step 5: Divide to Find Variance, Then Take the Square Root
- For a sample: Divide SS byN − 1to get variance (s²), then take the square root:s = √(s²).
- For a population: Divide SS byNto get variance (σ²), then take the square root:σ = √(σ²).
Standard Deviation Calculation Examples (Step-by-Step)
Here are two complete, hand-calculated mathematical examples illustrating both sample and population calculations with full working:
Example 1: Calculating Sample Standard Deviation (s)
Problem: A coffee shop randomly samples the number of espresso drinks sold during 5 separate morning shifts: X = [10, 12, 14, 16, 18]. Calculate the sample standard deviation.
Step 1: Calculate the sample mean (x̄)
Step 2 & 3: Compute deviations and squared deviations table
| Observation (i) | Value (xᵢ) | Deviation (xᵢ − x̄) | Squared Deviation (xᵢ − x̄)² |
|---|---|---|---|
| 1 | 10 | 10 − 14 = −4 | (−4)² = 16 |
| 2 | 12 | 12 − 14 = −2 | (−2)² = 4 |
| 3 | 14 | 14 − 14 = 0 | (0)² = 0 |
| 4 | 16 | 16 − 14 = +2 | (2)² = 4 |
| 5 | 18 | 18 − 14 = +4 | (4)² = 16 |
| Total | Σx = 70 | Σ(xᵢ − x̄) = 0 | SS = 40 |
Step 4: Calculate the sample variance (s²) using Bessel's correction (N − 1)
Step 5: Take the square root to find sample standard deviation (s)
Result: The sample standard deviation is approximately 3.1623 drinks.
Example 2: Calculating Population Standard Deviation (σ)
Problem: In a sealed laboratory incubation experiment, temperature readings (°C) are monitored across all 6 thermal sensor locations: X = [20, 24, 22, 28, 26, 30]. Since these sensors represent the entire closed chamber, calculate the population standard deviation.
Step 1: Calculate the population mean (μ)
Step 2 & 3: Compute deviations and squared deviations table
| Sensor (i) | Value (xᵢ) | Deviation (xᵢ − μ) | Squared Deviation (xᵢ − μ)² |
|---|---|---|---|
| 1 | 20 | 20 − 25 = −5 | (−5)² = 25 |
| 2 | 24 | 24 − 25 = −1 | (−1)² = 1 |
| 3 | 22 | 22 − 25 = −3 | (−3)² = 9 |
| 4 | 28 | 28 − 25 = +3 | (3)² = 9 |
| 5 | 26 | 26 − 25 = +1 | (1)² = 1 |
| 6 | 30 | 30 − 25 = +5 | (5)² = 25 |
| Total | Σx = 150 | Σ(xᵢ − μ) = 0 | SS = 70 |
Step 4: Calculate the population variance (σ²) dividing by N
Step 5: Take the square root to find population standard deviation (σ)
Result: The population standard deviation is approximately 3.4157 °C.
The 68-95-99.7 Empirical Rule in Statistics
For datasets that follow a symmetric, bell-shaped Normal (Gaussian) Distribution, the Empirical Rule describes the precise percentage of observations that fall within integer standard deviations from the mean:
- μ ± 1σ (68.27%): Approximately 68.3% of all observed values lie within 1 standard deviation of the mean.
- μ ± 2σ (95.45%): Approximately 95.5% of all values lie within 2 standard deviations of the mean.
- μ ± 3σ (99.73%): Approximately 99.73% of all values fall within 3 standard deviations of the mean. Values falling beyond 3σ are generally treated as statistical outliers.
Frequently Asked Questions (FAQs)
What is standard deviation?
Standard deviation is a statistical metric that quantifies the amount of variation or dispersion in a set of numerical data values. A low standard deviation indicates that the values tend to be close to the mean (expected value), while a high standard deviation indicates that the values are spread out over a wider range.
What is the difference between sample and population standard deviation?
Population standard deviation (represented by the Greek letter σ) is calculated when your data includes every single member of the group you are studying, dividing by N. Sample standard deviation (represented by s) is used when your data represents a sample drawn from a larger population. It divides by (n - 1), known as Bessel's correction, which eliminates downward estimation bias and provides an accurate, unbiased estimate of the true population variance.
Why do we divide by (n - 1) instead of n in sample standard deviation?
Dividing by (n - 1) is known as Bessel's correction. When calculating standard deviation from a sample, using the sample mean instead of the unknown true population mean tends to underestimate the overall variability. Dividing by (n - 1) slightly increases the result, correcting for this bias and providing an unbiased estimator of the population variance.
How do you calculate standard deviation step by step?
To calculate standard deviation step by step: (1) Find the mean of the dataset by summing all values and dividing by the total count. (2) Subtract the mean from each individual data point to find its deviation. (3) Square each individual deviation to eliminate negative signs. (4) Sum all the squared deviations together to obtain the Sum of Squares (SS). (5) Divide the sum of squares by (n - 1) for a sample or N for a population to calculate variance. (6) Take the square root of the variance to arrive at the standard deviation.
What is the 68-95-99.7 Empirical Rule in statistics?
The Empirical Rule, also known as the three-sigma rule, applies to datasets with a normal (bell-shaped) distribution. It states that approximately 68.27% of all data values fall within 1 standard deviation of the mean (μ ± 1σ), approximately 95.45% fall within 2 standard deviations (μ ± 2σ), and approximately 99.73% fall within 3 standard deviations (μ ± 3σ).
What is the difference between standard deviation and variance?
Variance measures the average squared distance of data points from the mean, expressed in squared units (e.g., dollars squared, cm²). Standard deviation is simply the square root of variance, which brings the metric back into the original units of measurement (e.g., dollars, cm), making it far more intuitive and practical to interpret.
What does a standard deviation of 0 mean?
A standard deviation of 0 means there is zero variability in the dataset; every single observation has the exact same value. For example, the dataset [7, 7, 7, 7] has a mean of 7 and a standard deviation of 0.
What is the Standard Error of the Mean (SE)?
The Standard Error of the Mean (SE or SEM) estimates the variability between multiple sample means drawn from the same population. It is computed as the sample standard deviation divided by the square root of the sample size: SE = s / √n. As sample size increases, the standard error decreases, reflecting greater precision.
Academic References & Authoritative Statistical Literature
- NIST/SEMATECH (2012). e-Handbook of Statistical Methods. National Institute of Standards and Technology. Available at: https://www.itl.nist.gov/div898/handbook/
- Snedecor, G. W., & Cochran, W. G. (1989). Statistical Methods (8th ed.). Iowa State University Press, Ames, Iowa. ISBN: 978-0813815619.
- Bessel, F. W. (1815). Untersuchung des Theils der planetarischen Störungen, welcher aus der Bewegung der Sonne entsteht. Abhandlungen der Königlichen Akademie der Wissenschaften zu Berlin, 201–210. (Origin of Bessel's correction n − 1).
- Pearson, K. (1894). Contributions to the mathematical theory of evolution. Philosophical Transactions of the Royal Society of London, (A), 185, 71–110. (Coined the formal mathematical term "Standard Deviation").
- ISO 3534-1:2006. Statistics — Vocabulary and symbols — Part 1: General statistical terms and terms used in probability. International Organization for Standardization, Geneva, Switzerland.