Σ
SDCalc
मध्यवर्तीFundamentals·9 min

Standard Deviation Formula Explained: Step-by-Step Guide

Master the standard deviation formula with our step-by-step guide. Learn the difference between population and sample formulas, calculations, and applications.

By Standard Deviation Calculator Team · Data Science Team·Published

What is the Standard Deviation Formula?

The standard deviation formula is the mathematical equation used to quantify the amount of variation or dispersion in a set of data values. A low standard deviation indicates that the data points tend to be close to the mean (μ or x̄), while a high standard deviation indicates that the data points are spread out over a wider range of values.

In statistics, the formula you use depends on whether you are working with an entire population or a sample drawn from that population. The core concept involves calculating the average of the squared deviations from the mean, known as the variance (σ²), and then taking the square root to return the measurement to the original units.

Population Standard Deviation

σ = √[ Σ (xi - μ)² / N ]
  • σ (sigma): Population standard deviation
  • Σ (sigma): Sum of...
  • xi: Each individual value in the dataset
  • μ (mu): Population mean
  • N: Total number of data points in the population

Population vs. Sample Standard Deviation

In real-world data analysis, it is rare to have data for an entire population. Most of the time, we collect a sample to make inferences about the larger population. Because a sample only estimates the population mean, calculating standard deviation using the population formula on a sample consistently underestimates the true variability. To correct this bias, we use the sample standard deviation formula.

Sample Standard Deviation

s = √[ Σ (xi - x̄)² / (n - 1) ]

Don't mix up your formulas!

Using 'N' for a sample or 'n-1' for a population will result in an incorrect measure of spread. The sample formula with n-1 is known as Bessel's correction and is strictly required for unbiased estimation of population variance.

Step-by-Step Calculation of the Formula

Calculating standard deviation by hand requires a systematic approach. By following these steps, you can accurately compute either the population or sample standard deviation for any dataset.

1

Calculate the Mean

Sum all the data points (Σxi) and divide by the total number of points (N or n) to find the mean (μ or x̄).
2

Find the Deviations

Subtract the mean from each individual data point to find the deviation: (xi - mean).
3

Square the Deviations

Square each of the deviations calculated in the previous step: (xi - mean)². This ensures all values are positive.
4

Sum the Squared Deviations

Add up all the squared deviations to find the sum of squares: Σ(xi - mean)².
5

Divide by N or n-1

For a population, divide by N. For a sample, divide by (n - 1). This gives you the variance (σ² or s²).
6

Take the Square Root

Take the square root of the variance to find the standard deviation (σ or s).

Why Does the Sample Formula Divide by n-1?

Dividing by n-1 instead of n is a concept known as Bessel's correction. Because the sample mean (x̄) is calculated from the sample data itself, the deviations (xi - x̄) are mathematically constrained to sum to zero. This means the data points are slightly closer to the sample mean than they are to the true population mean (μ).

By dividing by n-1 (the degrees of freedom), we inflate the variance just enough to compensate for this underestimation, providing an unbiased estimator of the population variance.

Further Reading

Sources

References and further authoritative reading used in preparing this article.

  1. NIST/SEMATECH e-Handbook of Statistical Methods
  2. Standard Deviation - Wikipedia
  3. Bessel's Correction