Standard Deviation Formula — Definition, Formula & Examples
The standard deviation formula calculates how spread out the values in a data set are from the mean. A small standard deviation means data points cluster near the average, while a large one means they are widely scattered.
Standard deviation is the positive square root of the variance. For a population of values, it is computed as . For a sample of values, the unbiased estimator uses in the denominator: .
Key Formula
Where:
- = Sample standard deviation
- = Each individual data value
- = Sample mean (average of all data values)
- = Number of data values in the sample
How It Works
To find standard deviation, start by computing the mean of your data. Then subtract the mean from each value and square the result — these are the squared deviations. Average those squared deviations (dividing by for a population or for a sample) to get the variance. Finally, take the square root of the variance to return to the original units of measurement. The result tells you, roughly, how far a typical data point sits from the mean.
Worked Example
Problem: Find the sample standard deviation of the data set: 4, 8, 6, 5, 7.
Find the mean: Add all values and divide by the number of values.
Compute squared deviations: Subtract the mean from each value and square the result.
Sum the squared deviations: Add all the squared deviations together.
Divide by n − 1 and take the square root: Since this is a sample, divide by 4 (not 5), then take the square root.
Answer: The sample standard deviation is approximately 1.58.
Another Example
Problem: A teacher records quiz scores for all 6 students in a class: 70, 80, 80, 90, 85, 75. Find the population standard deviation.
Find the population mean: Because the data covers every student in the class, this is a population.
Compute and sum squared deviations: Subtract 80 from each score, square, and add.
Divide by N and take the square root: For a population, divide by N = 6.
Answer: The population standard deviation is approximately 6.45 points.
Visualization
Why It Matters
Standard deviation is central to AP Statistics, introductory college statistics, and data science courses. Scientists use it to report measurement precision, financial analysts use it to quantify investment risk, and quality-control engineers use it to determine whether a manufacturing process stays within tolerance. Understanding this formula is also the foundation for z-scores, confidence intervals, and hypothesis testing.
Common Mistakes
Mistake: Dividing by n instead of n − 1 for a sample.
Correction: When working with a sample, always divide the sum of squared deviations by n − 1. Dividing by n underestimates the true variability of the population.
Mistake: Forgetting to take the square root after averaging the squared deviations.
Correction: Without the square root you have the variance, not the standard deviation. The square root converts the result back to the same units as the original data.
