Standard Deviation Equation- Statistical Measure
What Is the Standard Deviation Equation?
The standard deviation equation measures how spread out numbers are in a dataset. It's the square root of the variance. That's it. No fancy definitions needed.
If your data points cluster close to the mean, you get a low standard deviation. If they're scattered far apart, you get a high standard deviation. This tells you whether your data is consistent or all over the place.
The Standard Deviation Formula
There are actually two versions of this equation—one for a population and one for a sample. Most of the time, you're working with a sample.
Population Standard Deviation
σ = √[Σ(xi - μ)² / N]
- σ = population standard deviation
- xi = each value in the dataset
- μ = population mean
- N = total number of values
Sample Standard Deviation
s = √[Σ(xi - x̄)² / (n-1)]
- s = sample standard deviation
- xi = each value in the dataset
- x̄ = sample mean
- n = sample size (subtract 1 for degrees of freedom)
The difference? Sample standard deviation uses n-1 instead of n. This corrects for the fact that a sample usually underestimates the true spread of the population. Use n-1 unless you're working with every single member of a group.
How to Calculate Standard Deviation (Step by Step)
Let's work through an example. You have test scores: 70, 75, 80, 85, 90
Step 1: Find the Mean
Add all values and divide by how many you have.
(70 + 75 + 80 + 85 + 90) / 5 = 80
Your mean is 80.
Step 2: Subtract the Mean from Each Value
- 70 - 80 = -10
- 75 - 80 = -5
- 80 - 80 = 0
- 85 - 80 = 5
- 90 - 80 = 10
Step 3: Square Each Difference
- (-10)² = 100
- (-5)² = 25
- 0² = 0
- 5² = 25
- 10² = 100
Step 4: Add All Squared Differences
100 + 25 + 0 + 25 + 100 = 250
Step 5: Divide by N (or n-1)
For population: 250 / 5 = 50
For sample: 250 / 4 = 62.5
Step 6: Take the Square Root
Population: √50 = 7.07
Sample: √62.5 = 7.91
Your standard deviation is roughly 7.9 (sample). Most scores fall within 7.9 points of 80—meaning between 72.1 and 87.9.
Population vs Sample Standard Deviation
| Aspect | Population σ | Sample s |
|---|---|---|
| Formula denominator | N | n-1 |
| When to use | You have every data point | You're working with a subset |
| Bias | Unbiased | Corrected for sampling error |
| Common in | Government data, full census | Research, surveys, experiments |
Use population standard deviation only when your dataset includes the entire group you're studying. In most practical situations—surveys, experiments, business data—you're working with a sample. Use n-1.
What Does Standard Deviation Actually Tell You?
Standard deviation is measured in the same units as your data. If you're looking at heights in inches, your standard deviation is in inches. This makes it easy to interpret.
In a normal distribution:
- 68% of data falls within 1 standard deviation of the mean
- 95% falls within 2 standard deviations
- 99.7% falls within 3 standard deviations
So if exam scores average at 75 with a standard deviation of 10, most students scored between 65 and 85. Anyone below 55 or above 95 is an outlier.
Common Mistakes to Avoid
- Using population formula on a sample. This underestimates variability. Always use n-1 unless you're certain.
- Forgetting to square the differences. Without squaring, negative and positive deviations cancel out to zero.
- Confusing standard deviation with variance. Variance is the average of squared deviations. Standard deviation is the square root of that.
- Ignoring outliers. One extreme value can spike your standard deviation significantly.
When Standard Deviation Is Useless
Standard deviation assumes your data is roughly normally distributed. If your data is skewed or has heavy tails, standard deviation doesn't tell the whole story.
For highly skewed data, consider:
- Interquartile range (IQR) — measures spread of the middle 50%
- Median absolute deviation — robust alternative
- Range — max minus min, though it's sensitive to outliers
Standard Deviation in Excel, Python, and Calculators
You don't need to do this by hand. Every tool has built-in functions.
- Excel:
=STDEV.P()for population,=STDEV.S()for sample - Google Sheets:
=STDEVP()and=STDEV() - Python:
np.std(data, ddof=0)for population,ddof=1for sample - TI-84: Use the
1-Var-Statsfunction
The math stays the same. The tools just automate the steps.
Quick Reference: Standard Deviation Equation Checklist
- Calculate the mean of your dataset
- Subtract the mean from each value
- Square every result
- Sum all squared values
- Divide by n (population) or n-1 (sample)
- Take the square root
That's the entire process. Once you understand the logic, the formula makes sense. It's just quantifying how much your data bounces around the average.