Math Lab
Home/Class XI/Ch 13/Variance for grouped data , short-cut and step-deviation methods

Variance for grouped data

For frequency data (xi,fi)(x_i, f_i) with N=fiN = \sum f_i: σ2=1Nfi(xixˉ)2=fixi2Nxˉ2.\sigma^2 = \frac{1}{N} \sum f_i (x_i - \bar{x})^2 = \frac{\sum f_i x_i^2}{N} - \bar{x}^2.

For grouped data, take xix_i as the midpoint of each class.

When the xix_i are large or awkward, two tricks reduce the arithmetic.

Short-cut method

Pick a convenient origin (assumed mean) aa. Let di=xiad_i = x_i - a. Then σ2=fidi2N(fidiN)2.\sigma^2 = \frac{\sum f_i d_i^2}{N} - \left(\frac{\sum f_i d_i}{N}\right)^2.

Reason: variance is shift-invariant; subtracting aa from every xix_i leaves σ2\sigma^2 unchanged.

The mean is xˉ=a+fidiN\bar{x} = a + \dfrac{\sum f_i d_i}{N}.

Step-deviation method

When the class widths are equal to some hh, define ui=(xia)/hu_i = (x_i - a)/h. Then σ2=h2[fiui2N(fiuiN)2].\sigma^2 = h^2 \left[\frac{\sum f_i u_i^2}{N} - \left(\frac{\sum f_i u_i}{N}\right)^2\right].

This makes the uiu_i small integers, which keeps the arithmetic clean. The mean is xˉ=a+hfiuiN.\bar{x} = a + h \cdot \frac{\sum f_i u_i}{N}.

Step-by-step procedure

  1. Tabulate classes, find midpoints xix_i.
  2. Choose assumed mean aa (often a central midpoint).
  3. Compute ui=(xia)/hu_i = (x_i - a)/h.
  4. Compute fiuif_i u_i and fiui2f_i u_i^2.
  5. Apply formulas above.

Worked examples

Example 1. Find variance and SD for:

Class00101010102020202030303030404040405050
fif_i558815157755

Midpoints xix_i: 5,15,25,35,455, 15, 25, 35, 45. N=40N = 40.

Use a=25,h=10a = 25, h = 10.

uiu_i: 2,1,0,1,2-2, -1, 0, 1, 2. fuf u: 10,8,0,7,10-10, -8, 0, 7, 10. fu2f u^2: 20,8,0,7,2020, 8, 0, 7, 20.

fu=1\sum f u = -1. fu2=55\sum f u^2 = 55.

σ2=h2[55/40(1/40)2]=100[1.3750.000625]=1001.374375=137.4375\sigma^2 = h^2 [55/40 - (-1/40)^2] = 100 [1.375 - 0.000625] = 100 \cdot 1.374375 = 137.4375.

σ=137.437511.72\sigma = \sqrt{137.4375} \approx 11.72.

Mean: xˉ=25+10(1/40)=250.25=24.75\bar{x} = 25 + 10 \cdot (-1/40) = 25 - 0.25 = 24.75.

Example 2. Find variance for:

xx10102020303040405050
ff448810105533

N=30N = 30. fx=40+160+300+200+150=850\sum f x = 40 + 160 + 300 + 200 + 150 = 850. xˉ=850/3028.33\bar{x} = 850/30 \approx 28.33.

fx2=400+3200+9000+8000+7500=28100\sum f x^2 = 400 + 3200 + 9000 + 8000 + 7500 = 28100.

σ2=28100/30(28.33)2936.67802.56134.11\sigma^2 = 28100/30 - (28.33)^2 \approx 936.67 - 802.56 \approx 134.11.

σ11.58\sigma \approx 11.58.

Example 3. Compute SD for the data with the same midpoints as Example 1 above using direct formula (no shortcut).

We already found xˉ=24.75\bar{x} = 24.75. Squared deviations (xixˉ)2(x_i - \bar{x})^2: (524.75)2=390.06(5 - 24.75)^2 = 390.06, (1524.75)2=95.06(15 - 24.75)^2 = 95.06, (2524.75)2=0.06(25 - 24.75)^2 = 0.06, (3524.75)2=105.06(35 - 24.75)^2 = 105.06, (4524.75)2=410.06(45 - 24.75)^2 = 410.06.

Multiply by fif_i: 1950.31,760.50,0.94,735.44,2050.311950.31, 760.50, 0.94, 735.44, 2050.31. Sum: 5497.55497.5. σ2=5497.5/40=137.44\sigma^2 = 5497.5/40 = 137.44. (Matches example 1.)

Example 4. Find variance of:

Marks0010101010202020203030303040404040505050506060
fif_i559917172929101066

Midpoints: 5,15,25,35,45,555, 15, 25, 35, 45, 55. N=76N = 76. a=35,h=10a = 35, h = 10, uiu_i: 3,2,1,0,1,2-3, -2, -1, 0, 1, 2.

fuf u: 15,18,17,0,10,12-15, -18, -17, 0, 10, 12. Sum: 28-28.

fu2f u^2: 45,36,17,0,10,2445, 36, 17, 0, 10, 24. Sum: 132132.

σ2=100[132/76(28/76)2]=100[1.73680.1356]=160.13\sigma^2 = 100 [132/76 - (-28/76)^2] = 100 [1.7368 - 0.1356] = 160.13.

σ12.65\sigma \approx 12.65.

Mean: 35+10(28/76)=353.68=31.3235 + 10 \cdot (-28/76) = 35 - 3.68 = 31.32.

Example 5. Without computing, what happens to the SD if every observation is multiplied by 55?

σy=5σx=5σx\sigma_y = |5| \sigma_x = 5 \sigma_x.

Try it yourself

  1. Find variance and SD of: | xx | 22 | 44 | 66 | 88 | 1010 | |---|---|---|---|---|---| | ff | 33 | 55 | 77 | 44 | 11 |

  2. Find SD of: | Class | 0055 | 551010 | 10101515 | 15152020 | |---|---|---|---|---| | ff | 44 | 66 | 55 | 33 |

  3. Compute mean and SD using step-deviation method for: | Class | 20203030 | 30304040 | 40405050 | 50506060 | 60607070 | |---|---|---|---|---|---| | ff | 55 | 88 | 1010 | 44 | 33 |

  4. The mean and SD of 2020 observations are 1010 and 22. Each observation is multiplied by 33. Find the new mean and SD.

  5. If the SD of xix_i is σ\sigma and each xix_i is replaced by a+bxia + b x_i, what is the new SD?

  6. Mean of 5050 observations is 4040 and SD is 66. Find xi\sum x_i and xi2\sum x_i^2.

  7. SD of the first 100100 natural numbers (Use σ=(n21)/12\sigma = \sqrt{(n^2 - 1)/12}).

  8. The variance of 55 numbers a,b,c,d,ea, b, c, d, e is 99. Find the variance of a+2,b+2,c+2,d+2,e+2a + 2, b + 2, c + 2, d + 2, e + 2.

  9. Find variance of xix_i: 2,1,0,1,2-2, -1, 0, 1, 2.

  10. The mean of 55 observations is 4.44.4 and variance 8.248.24. If 33 of them are 1,2,61, 2, 6, find the other two.

  11. SD of 2020 observations is 55. If three new observations 0,4,70, 4, 7 are added, find new SD.

  12. If (xi5)=30\sum (x_i - 5) = 30, (xi5)2=230\sum (x_i - 5)^2 = 230, n=10n = 10, find xˉ\bar{x} and σ\sigma.

Pitfalls / Tricks

  • Always use midpoints for grouped data.
  • Step-deviation: uiu_i should be small integers.
  • Remember σy=bσx\sigma_y = |b| \sigma_x when y=a+bxy = a + b x , shift contributes nothing.
  • Insight. Variance is a quadratic statistic , it cares about squared deviations. This both amplifies outliers and makes it mathematically tractable.

Practice quiz

Quick check on this topic.

Quiz
Quick check : Variance for grouped data
6 questions · pick the best answer
Q1

Q2

Q3

Q4

Q5

Q6