Variance and standard deviation

Ask two students to report their last five test scores and both might quote the same average — yet one set could be tightly bunched near that average while the other swings wildly above and below it. The mean alone hides this difference. To capture how spread out a data set is, statisticians use the average of the squared deviations from the mean, called the variance, and its square root, the standard deviation. This topic sits at the culmination of the Statistics chapter in CBSE Class 11 Mathematics, right after range and mean deviation. You are expected to compute variance and standard deviation for ungrouped data, discrete frequency distributions, and grouped (continuous) frequency distributions — including the faster shortcut and step-deviation methods for grouped data — and to use the coefficient of variation to compare the relative variability of two different series. Squaring deviations instead of taking absolute values (as mean deviation does) turns out to be the key trick that makes the algebra tractable and the formulas so useful in the rest of statistics.

The core insight

Variance is the average of the squared deviations of data from their mean, σ2=1n∑(xi−xˉ)2\sigma^2 = \frac{1}{n}\sum(x_i-\bar x)^2, and standard deviation σ=σ2\sigma = \sqrt{\sigma^2} restores the original units, giving a single reliable number for how spread out a data set is.

The core idea

Ungrouped data. For nn observations x1,x2,…,xnx_1, x_2, \dots, x_n with mean xˉ\bar x, the variance is the mean of the squared deviations from xˉ\bar x:

σ2=1n∑i=1n(xi−xˉ)2\sigma^2 = \frac{1}{n}\sum_{i=1}^{n}(x_i - \bar x)^2

where: σ2\sigma^2 is the variance, xix_i are the individual observations, xˉ\bar x is their mean, and nn is the number of observations. Taking the square root gives the standard deviation σ=σ2\sigma = \sqrt{\sigma^2}, which is back in the same units as the raw data — unlike variance, which is in "squared units" and therefore harder to interpret directly.

Why squares, not absolute values? Mean deviation uses ∣xi−xˉ∣|x_i - \bar x| to avoid positive and negative deviations cancelling out, but the modulus function is not smooth to work with algebraically. Squaring achieves the same cancellation-avoidance while staying differentiable and algebraically friendly — which is exactly why variance, not mean deviation, is the measure that the rest of statistics (correlation, regression, probability distributions) is built on.

Frequency distributions. For discrete or grouped data (using class mid-points xix_i for grouped data) with frequencies fif_i and total frequency N=∑fiN = \sum f_i:

σ2=1N∑i=1nfi(xi−xˉ)2\sigma^2 = \frac{1}{N}\sum_{i=1}^{n} f_i(x_i - \bar x)^2

Shortcut (assumed-mean) formula. Computing xˉ\bar x first and then every deviation is slow by hand. Instead pick a convenient assumed value AA (often a mid-point near the centre of the data), let di=xi−Ad_i = x_i - A, and use:

σ2=1N∑fidi2−(1N∑fidi)2\sigma^2 = \frac{1}{N}\sum f_i d_i^2 - \left(\frac{1}{N}\sum f_i d_i\right)^2

where: did_i is the deviation of xix_i from the assumed mean AA. This avoids ever computing xˉ\bar x exactly before finding σ2\sigma^2.

Step-deviation method. When class widths are equal (width hh), scale the deviations further with ui=xi−Ahu_i = \dfrac{x_i - A}{h}, so uiu_i becomes small whole numbers:

σ2=h2[1N∑fiui2−(1N∑fiui)2]\sigma^2 = h^2\left[\frac{1}{N}\sum f_i u_i^2 - \left(\frac{1}{N}\sum f_i u_i\right)^2\right]

The h2h^2 outside the bracket rescales the answer back from the compressed uiu_i units to the original units — a step that is easy to forget.

Coefficient of variation (CV). To compare the relative spread of two series, especially when their means or units differ, use:

CV=σxˉ×100%\text{CV} = \frac{\sigma}{\bar x} \times 100\%

A smaller CV means the series is more consistent relative to its own mean, even if its raw standard deviation is numerically larger than another series' standard deviation.

Figure
Two dot plots on the same number line, one tightly clustered near the mean and one widely scattered, illustrating that equal means can hide very different spreads measured by standard deviation
Same mean, different spread Set A: small standard deviation mean Set B: large standard deviation mean
Derivation ASplitting variance into a shortcut correction term

Derive the shortcut formula σ2=1N∑fidi2−(1N∑fidi)2\sigma^2 = \frac{1}{N}\sum f_i d_i^2 - \left(\frac{1}{N}\sum f_i d_i\right)^2 starting only from the definition σ2=1N∑fi(xi−xˉ)2\sigma^2 = \frac{1}{N}\sum f_i(x_i-\bar x)^2 and the substitution di=xi−Ad_i = x_i - A, to see exactly where the correction term comes from and why it must be subtracted, not added.

Step 1. Write xi=A+dix_i = A + d_i, so the deviation from the true mean becomes xi−xˉ=(A+di)−xˉ=di−(xˉ−A)x_i - \bar x = (A + d_i) - \bar x = d_i - (\bar x - A). Let dˉ=xˉ−A\bar d = \bar x - A denote the mean of the deviations did_i; then xi−xˉ=di−dˉx_i - \bar x = d_i - \bar d.

Step 2. Substitute into the variance definition and expand the square:

σ2=1N∑fi(di−dˉ)2=1N∑fi(di2−2didˉ+dˉ2)\sigma^2 = \frac{1}{N}\sum f_i(d_i - \bar d)^2 = \frac{1}{N}\sum f_i\left(d_i^2 - 2 d_i \bar d + \bar d^2\right)

Step 3. Split the sum into three separate sums, using ∑fi=N\sum f_i = N and pulling the constant dˉ\bar d out of sums where it does not depend on ii:

σ2=1N∑fidi2−2dˉ⋅1N∑fidi+dˉ2⋅1N∑fi\sigma^2 = \frac{1}{N}\sum f_i d_i^2 - 2\bar d \cdot \frac{1}{N}\sum f_i d_i + \bar d^2 \cdot \frac{1}{N}\sum f_i

Step 4. By definition dˉ=1N∑fidi\bar d = \frac{1}{N}\sum f_i d_i, so the middle term becomes −2dˉ⋅dˉ=−2dˉ2-2\bar d \cdot \bar d = -2\bar d^2, and the last term becomes dˉ2⋅1=dˉ2\bar d^2 \cdot 1 = \bar d^2 (since 1N∑fi=1\frac{1}{N}\sum f_i = 1). Combining −2dˉ2+dˉ2-2\bar d^2 + \bar d^2 gives −dˉ2-\bar d^2.

Step 5. The result is σ2=1N∑fidi2−dˉ2\sigma^2 = \frac{1}{N}\sum f_i d_i^2 - \bar d^2, and since dˉ=1N∑fidi\bar d = \frac{1}{N}\sum f_i d_i, this is exactly σ2=1N∑fidi2−(1N∑fidi)2\sigma^2 = \frac{1}{N}\sum f_i d_i^2 - \left(\frac{1}{N}\sum f_i d_i\right)^2. The correction term is always subtracted because it came from completing the square on (di−dˉ)2(d_i - \bar d)^2, which is why skipping it — as students often do — always gives an answer that is too large.

Worked example

Find the variance and standard deviation of the data set 4,8,5,3,2,6,10,44, 8, 5, 3, 2, 6, 10, 4.

Step 1 — Find the mean.

xˉ=4+8+5+3+2+6+10+48=428=5.25\bar x = \frac{4+8+5+3+2+6+10+4}{8} = \frac{42}{8} = 5.25

Step 2 — Find each squared deviation (xi−xˉ)2(x_i-\bar x)^2. The deviations are −1.25,2.75,−0.25,−2.25,−3.25,0.75,4.75,−1.25-1.25, 2.75, -0.25, -2.25, -3.25, 0.75, 4.75, -1.25, so the squared deviations are 1.5625,7.5625,0.0625,5.0625,10.5625,0.5625,22.5625,1.56251.5625, 7.5625, 0.0625, 5.0625, 10.5625, 0.5625, 22.5625, 1.5625.

Step 3 — Sum the squared deviations and divide by n=8n = 8.

∑(xi−xˉ)2=49.5,σ2=49.58=6.1875\sum (x_i-\bar x)^2 = 49.5, \qquad \sigma^2 = \frac{49.5}{8} = 6.1875

Step 4 — Take the square root for standard deviation.

σ=6.1875≈2.49\sigma = \sqrt{6.1875} \approx 2.49

So the variance is 6.1875 and the standard deviation is about 2.49, in the same units as the original data.

Competitive stretch

Now compare two series using CV: Series A has xˉA=40\bar x_A = 40, σA=8\sigma_A = 8; Series B has xˉB=60\bar x_B = 60, σB=10\sigma_B = 10. Then CVA=840×100%=20%\text{CV}_A = \frac{8}{40}\times 100\% = 20\% and CVB=1060×100%≈16.67%\text{CV}_B = \frac{10}{60}\times 100\% \approx 16.67\%. Even though Series B's raw standard deviation (10) is larger than Series A's (8), Series B is actually more consistent, since its CV is smaller — comparing raw σ\sigma values alone would have given the wrong conclusion.

Common traps

  • Confusing variance (σ2\sigma^2, squared units) with standard deviation (σ\sigma, original units) — always check which one the question asks for and remember the final square root.
  • In the shortcut or step-deviation method, forgetting to subtract the correction term (1N∑fidi)2\left(\frac{1}{N}\sum f_i d_i\right)^2 and computing only 1N∑fidi2\frac{1}{N}\sum f_i d_i^2, which overstates the variance.
  • In the step-deviation method, forgetting to multiply the bracketed result by h2h^2 to rescale from the compressed uiu_i units back to the original units.
  • Comparing raw standard deviations (instead of CV) to decide which of two series with different means is "more consistent" — only CV gives a valid relative comparison.

Ask the tutor: Want to work through a grouped-frequency variance problem using the step-deviation method, or check a coefficient-of-variation comparison of your own?

Why do we square the deviations instead of just adding them up directly?

If you add up the plain deviations (xi−xˉ)(x_i - \bar x) without squaring or taking absolute values, positive and negative deviations cancel exactly, and the sum is always zero — no matter how spread out the data is. Squaring makes every term positive, so spread accumulates instead of cancelling, giving a number that genuinely reflects variability.

Is the step-deviation method giving a different variance from the direct formula?

No — it should give the same numerical answer as the direct method (up to rounding), just reached with smaller, easier arithmetic. The ui=(xi−A)/hu_i = (x_i-A)/h substitution shrinks the numbers you square and sum, and multiplying by h2h^2 at the end exactly undoes that shrinking, restoring the true variance in original units.

When should I use coefficient of variation instead of just comparing standard deviations?

Use CV whenever the two series you are comparing have different means or different units — for example, comparing the variability of marks (out of 100) with the variability of heights (in cm). Raw standard deviations are not comparable across different scales, but CV expresses spread as a percentage of the mean, making the comparison meaningful.

Before this