2.7.3Statistics & Probability — Intermediate

Measures of dispersion — variance, standard deviation

1,815 words8 min readdifficulty · medium1 backlinks

WHAT are we measuring?

We already have crude spread measures: range (max − min) uses only two points, and mean absolute deviation uses xxˉ|x-\bar x|. Variance improves on both by squaring deviations.


Deriving variance from scratch

We want a single number for "average squared distance from the mean."

Step 1. Compute the mean: xˉ=1ni=1nxi\bar x = \frac{1}{n}\sum_{i=1}^{n} x_i Why? The mean is the balance point — the value from which we measure spread.

Step 2. Deviation of each point: di=xixˉd_i = x_i - \bar x. Why? This is the raw distance (with sign) of a value from the centre.

Step 3. Square each: di2d_i^2. Why? Removes sign; large deviations get amplified.

Step 4. Average them:

Step 5. Fix the units by taking the square root:


The computational shortcut formula

Computing every (xixˉ)(x_i-\bar x) is tedious. Let's derive the shortcut.

σ2=1n(xixˉ)2=1n(xi22xixˉ+xˉ2)\sigma^2 = \frac{1}{n}\sum (x_i-\bar x)^2 = \frac{1}{n}\sum\left(x_i^2 - 2x_i\bar x + \bar x^2\right)

Split the sum (Why? summation distributes over addition): =1nxi22xˉnxi+1nxˉ2= \frac{1}{n}\sum x_i^2 - \frac{2\bar x}{n}\sum x_i + \frac{1}{n}\sum \bar x^2

Now use 1nxi=xˉ\frac{1}{n}\sum x_i = \bar x and xˉ2=nxˉ2\sum \bar x^2 = n\bar x^2: =1nxi22xˉxˉ+xˉ2=1nxi2xˉ2= \frac{1}{n}\sum x_i^2 - 2\bar x\cdot\bar x + \bar x^2 = \frac{1}{n}\sum x_i^2 - \bar x^2

Figure — Measures of dispersion — variance, standard deviation

Sample variance: WHY divide by n1n-1?


Worked examples


Properties (know these cold)

  • Non-negativity: σ20\sigma^2 \ge 0; equals 0 iff all values are identical.
  • Shift invariance: adding constant cc to every value leaves variance unchanged (spread doesn't move). Var(x+c)=Var(x)\text{Var}(x+c)=\text{Var}(x).
  • Scaling: multiplying every value by cc multiplies variance by c2c^2 and SD by c|c|. Var(cx)=c2Var(x)\text{Var}(cx)=c^2\,\text{Var}(x).

Common mistakes


Active-recall flashcards

Why can't we just average (xixˉ)(x_i-\bar x) without squaring?
Because (xixˉ)=0\sum(x_i-\bar x)=0 always — positives and negatives cancel, giving 0 regardless of spread.
Population variance formula
σ2=1n(xixˉ)2\sigma^2=\frac1n\sum(x_i-\bar x)^2
Standard deviation in terms of variance
σ=σ2\sigma=\sqrt{\sigma^2}; it restores the original units.
Shortcut formula for variance
σ2=x2(xˉ)2\sigma^2=\overline{x^2}-(\bar x)^2 = mean of squares minus square of mean.
Why divide by n1n-1 for a sample?
Bessel's correction — the sample mean makes deviations too small, so n1n-1 corrects the downward bias.
Effect of adding constant cc to all data on variance?
No change; variance is shift-invariant.
Effect of multiplying all data by cc on variance and SD?
Variance ×c2c^2, SD ×c|c|.
When is variance exactly 0?
Only when every data value is identical.
Is x2(xˉ)2\overline{x^2}\ge(\bar x)^2?
Yes, always, since their difference is the variance 0\ge 0.
Units of variance vs SD if data is in cm?
Variance in cm², SD in cm.

Recall Feynman: explain to a 12-year-old

Imagine your class throws darts at a bullseye. The average tells you where the darts land on average. But two classes can have the same average landing spot — one with all darts tightly bunched, another with darts scattered all over the wall. Standard deviation is a number that says "how scattered are the darts?" To get it: measure how far each dart is from the middle, square those distances (so left and right don't cancel out), average them, and take the square root to get back to normal distance. Small number = neat shooters; big number = wild throws.

Connections

Concept Map

measured from

quantified by

cancel to zero so

averaged gives

square root fixes units

algebra gives

improved by

uses

corrects bias from

adjusted into

Mean - centre / balance point

Dispersion - spread around centre

Deviation x - mean

Squared deviations

Population variance sigma^2

Standard deviation sigma

Shortcut mean of squares minus square of mean

Range and mean abs deviation

Sample variance / n-1

Bessel's correction

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, sirf "average" (mean) se poori kahani samajh nahi aati. Do classes ka average marks 60 ho sakta hai, par ek class mein sab log 58–62 ke beech hain aur doosri mein aadhe log 30 par aur aadhe 90 par. Dono ka centre same, par spread bilkul alag. Yeh spread naapne ke liye hum variance aur standard deviation use karte hain.

Idea simple hai: har value ka mean se distance nikalo (xixˉx_i - \bar x). Ab agar seedhe add karein toh plus aur minus cancel hokar zero ho jaata hai — isliye hum har distance ko square karte hain (sign hata dega aur bade deviations ko zyada weight milega). In squares ka average = variance (σ2\sigma^2). Lekin variance ka unit square ho jaata hai (jaise marks²), toh usse samajhna mushkil. Isliye square root lete hain — wahi hai standard deviation (σ\sigma), jo original units mein hota hai.

Ek aur trick yaad rakho: "mean of squares minus square of mean" yaani σ2=x2(xˉ)2\sigma^2 = \overline{x^2} - (\bar x)^2. Yeh calculation fast karta hai. Aur haan, agar data ek sample hai (poori population nahi), toh nn ki jagah n1n-1 se divide karo — ise Bessel's correction kehte hain, kyunki sample mean deviations ko thoda chhota bana deta hai.

Kyu important hai? Kyunki real life mein consistency matter karti hai — ek batsman ka average 45 ho sakta hai, par kam SD wala batsman zyada reliable hai. Standard deviation risk, quality control, aur normal distribution (68-95-99.7 rule) sab mein base hai. Isliye yeh topic strong banao.

Go deeper — visual, from zero

Test yourself — Statistics & Probability — Intermediate

Connections