Math Lab
Home/Class XI/Ch 13/Variance and standard deviation: raw data

Variance and standard deviation: raw data

The variance is the average of the squared deviations from the mean. The standard deviation is its square root. Why squared deviations? They:

  1. Treat positive and negative deviations symmetrically.
  2. Are differentiable (no absolute values) , convenient for algebra.
  3. Amplify large deviations, which is often what we want to detect.

Definitions

For raw data x1,x2,,xnx_1, x_2, \dots, x_n with mean xˉ\bar{x}: σ2=1ni=1n(xixˉ)2.\boxed{\sigma^2 = \frac{1}{n} \sum_{i=1}^n (x_i - \bar{x})^2.}

This is the variance. The standard deviation is σ=σ2.\boxed{\sigma = \sqrt{\sigma^2}.}

The standard deviation has the same units as the data. Variance has units squared.

Alternative formula

Expanding the square: σ2=1n(xi22xˉxi+xˉ2)=xi2n2xˉxˉ+xˉ2=xi2nxˉ2.\sigma^2 = \frac{1}{n} \sum (x_i^2 - 2 \bar{x} x_i + \bar{x}^2) = \frac{\sum x_i^2}{n} - 2 \bar{x} \cdot \bar{x} + \bar{x}^2 = \frac{\sum x_i^2}{n} - \bar{x}^2.

So σ2=xi2nxˉ2=xi2n(xin)2.\boxed{\sigma^2 = \frac{\sum x_i^2}{n} - \bar{x}^2 = \frac{\sum x_i^2}{n} - \left(\frac{\sum x_i}{n}\right)^2.}

This is often easier to compute , you only need xi\sum x_i and xi2\sum x_i^2, no pre-computed xˉ\bar{x} needed inside the sum.

Properties

Non-negativity. σ20\sigma^2 \ge 0, with equality iff all xix_i are equal.

Shift invariance. If yi=xi+ay_i = x_i + a, then σy=σx\sigma_y = \sigma_x.

Scale. If yi=bxiy_i = b x_i, then σy=bσx\sigma_y = |b| \sigma_x, and σy2=b2σx2\sigma_y^2 = b^2 \sigma_x^2.

Combining: if yi=a+bxiy_i = a + b x_i, then σy=bσx\sigma_y = |b| \sigma_x.

Worked examples

Example 1. Variance and SD of 4,6,8,10,124, 6, 8, 10, 12.

xˉ=40/5=8\bar{x} = 40/5 = 8. Deviations: 4,2,0,2,4-4, -2, 0, 2, 4. Squared: 16,4,0,4,1616, 4, 0, 4, 16. Sum: 4040. σ2=40/5=8\sigma^2 = 40/5 = 8. σ=8=222.83\sigma = \sqrt{8} = 2\sqrt{2} \approx 2.83.

Example 2. Variance of 2,4,6,8,102, 4, 6, 8, 10 using alternative formula.

x=30xˉ=6\sum x = 30 \Rightarrow \bar{x} = 6. x2=4+16+36+64+100=220\sum x^2 = 4 + 16 + 36 + 64 + 100 = 220. σ2=220/536=4436=8\sigma^2 = 220/5 - 36 = 44 - 36 = 8. σ=22\sigma = 2\sqrt{2}.

Example 3. SD of 1,3,5,7,9,111, 3, 5, 7, 9, 11.

xˉ=36/6=6\bar{x} = 36/6 = 6. x2=1+9+25+49+81+121=286\sum x^2 = 1 + 9 + 25 + 49 + 81 + 121 = 286. σ2=286/636=47.636=11.6\sigma^2 = 286/6 - 36 = 47.\overline{6} - 36 = 11.\overline{6}. σ3.42\sigma \approx 3.42.

(Or directly: deviations 5,3,1,1,3,5-5, -3, -1, 1, 3, 5; squares 25,9,1,1,9,2525, 9, 1, 1, 9, 25; sum 7070; σ2=70/611.67\sigma^2 = 70/6 \approx 11.67.)

Example 4. Find the SD of the first nn natural numbers.

xˉ=(n+1)/2\bar{x} = (n+1)/2. xi2=n(n+1)(2n+1)/6\sum x_i^2 = n(n+1)(2n+1)/6.

σ2=n(n+1)(2n+1)/6n(n+12)2=(n+1)(2n+1)6(n+1)24\sigma^2 = \dfrac{n(n+1)(2n+1)/6}{n} - \left(\dfrac{n+1}{2}\right)^2 = \dfrac{(n+1)(2n+1)}{6} - \dfrac{(n+1)^2}{4}.

Common denominator 1212: 2(n+1)(2n+1)3(n+1)212=(n+1)[2(2n+1)3(n+1)]12=(n+1)(n1)12=n2112\dfrac{2(n+1)(2n+1) - 3(n+1)^2}{12} = \dfrac{(n+1)[2(2n+1) - 3(n+1)]}{12} = \dfrac{(n+1)(n - 1)}{12} = \dfrac{n^2 - 1}{12}.

So σ=n2112\sigma = \sqrt{\dfrac{n^2 - 1}{12}}.

Example 5. If σx=5\sigma_x = 5 and y=3x+7y = 3 x + 7, find σy\sigma_y.

σy=3σx=15\sigma_y = |3| \cdot \sigma_x = 15.

Try it yourself

  1. SD of 2,4,4,4,5,5,7,92, 4, 4, 4, 5, 5, 7, 9.
  2. Variance of 7,7,7,77, 7, 7, 7.
  3. SD of 1,2,3,4,5,6,71, 2, 3, 4, 5, 6, 7.
  4. Variance and SD of 10,12,14,16,1810, 12, 14, 16, 18.
  5. If xi=50\sum x_i = 50, xi2=500\sum x_i^2 = 500, n=10n = 10, find σ\sigma.
  6. Find SD of first 2020 natural numbers.
  7. If y=2x5y = 2 x - 5 and σx=4\sigma_x = 4, find σy\sigma_y.
  8. The mean of 55 numbers is 2020 and the variance is 44. Add a number equal to the mean. What is the new variance?
  9. Show that if all xix_i are equal, σ=0\sigma = 0.
  10. SD of 3,5,7,9,11,13,153, 5, 7, 9, 11, 13, 15.
  11. The variance of 2525 observations is 44. If each is multiplied by 22, find the new variance.
  12. The mean of 1010 numbers is 2424, SD is 66. If 33 is added to each, what are the new mean and SD?

Pitfalls / Tricks

  • Variance has units squared (e.g., cm²); standard deviation has the same units as data.
  • Use the alternative formula when raw sums are easy to compute.
  • Shifting data does not change SD; scaling multiplies it.
  • Insight. Variance is the square of standard deviation. They contain the same information; choose the one that's algebraically convenient.

Practice quiz

Quick check on this topic.

Quiz
Quick check : Variance and SD (raw)
6 questions · pick the best answer
Q1

Q2

Q3

Q4

Q5

Q6