MathsFrancais3 min de lectureMis a jour 2 avr. 2026

How to Calculate Standard Deviation and Variance

Master the formulas for variance and standard deviation. Learn how to measure data spread with worked examples, step-by-step calculations, and the Empirical Rule.

Points Cles

  • Standard deviation measures how much data points deviate from the mean.
  • Variance is the average of squared differences from the mean (useful for comparing data spread).
  • A low standard deviation (close to 0) means data is tightly clustered; a high one means data is widely dispersed.
  • The square root of variance gives you the standard deviation (bringing it back to original units).
  • For normal distributions, 99.7% of data usually falls within 3 standard deviations of the average.

What are Standard Deviation and Variance?

While calculations like mean and median identify the 'center' of your data, standard deviation and variance describe the 'spread.' Understanding variability is crucial in fields like finance (measuring risk), manufacturing (quality control), and scientific research (data reliability). Variance tells you how far each number is from the mean. Standard deviation is the square root of variance, providing a measure of spread in the same units as the original data. For example, if you are measuring Heights in inches, the variance will be in square inches, but the standard deviation will be in inches—making it much easier to interpret.

Standard Deviation: The Core Formula

The most common way to calculate the spread of a dataset is using the following formula: ``` Standard Deviation (σ) = √ [ Σ(x - μ)² / N ] ``` Where: - σ = Standard Deviation - Σ = Summation (add them up) - x = Each data point - μ = Mean (average) - N = Total number of data points

Step-by-Step Calculation: A Worked Example

Let's find the standard deviation for a simple dataset: 2, 4, 6 ``` 1. Find the mean: (2 + 4 + 6) / 3 = 4 2. Subtract mean from each: (2-4)=-2, (4-4)=0, (6-4)=2 3. Square the results: (-2)²=4, (0)²=0, (2)²=4 4. Sum of squares: 4 + 0 + 4 = 8 5. Divide by count (Variance): 8 / 3 ≈ 2.667 6. Square root (Std Dev): √2.667 ≈ 1.633 ``` The standard deviation is approximately 1.633, meaning most data points are within 1.633 units of the average.

Population vs. Sample: When to use N-1?

In statistics, we distinction between an entire 'Population' and a smaller 'Sample' of that group. When calculating sample variance, we divide by N-1 instead of N (Bessel's Correction) to account for potential bias. ``` | Context | Symbol | Formula Divisor | Best For | | --- | --- | --- | --- | | Population | σ | Divide by N | Analyzing every member of a group | | Sample | s | Divide by N - 1 | Estimating the whole from a small group | | Sensitivity | High | Lower variance | General descriptive statistics | | Bias | Neutral | Corrects bias | Scientific and inferential research | ```

The Empirical Rule (68-95-99.7)

One of the most powerful uses of standard deviation is the Empirical Rule. In a normal distribution (bell curve), the following thresholds apply: - 68% of data falls within 1 standard deviation (μ ± 1σ) - 95% of data falls within 2 standard deviations (μ ± 2σ) - 99.7% of data falls within 3 standard deviations (μ ± 3σ) This rule allows you to quickly identify outliers. Any data point more than 3 standard deviations away is usually considered an extreme outlier.
statisticsstandard-deviationvariancemathsdata-spread