When values repeat, weight every deviation by its frequency:
Key Point (Discrete frequency distribution): with N = ∑ f i N = \sum f_i N = ∑ f i ,
x ˉ = 1 N ∑ f i x i , σ = 1 N ∑ f i ( x i − x ˉ ) 2 \bar{x} = \frac{1}{N}\sum f_ix_i, \qquad \sigma = \sqrt{\frac{1}{N}\sum f_i(x_i - \bar{x})^2} x ˉ = N 1 ∑ f i x i , σ = N 1 ∑ f i ( x i − x ˉ ) 2
Worked check: x i = 4 , 8 , 11 , 17 , 20 , 24 , 32 x_i = 4, 8, 11, 17, 20, 24, 32 x i = 4 , 8 , 11 , 17 , 20 , 24 , 32 with f i = 3 , 5 , 9 , 5 , 4 , 3 , 1 f_i = 3, 5, 9, 5, 4, 3, 1 f i = 3 , 5 , 9 , 5 , 4 , 3 , 1 : N = 30 N = 30 N = 30 , ∑ f i x i = 420 \sum f_ix_i = 420 ∑ f i x i = 420 so x ˉ = 14 \bar{x} = 14 x ˉ = 14 ; ∑ f i ( x i − x ˉ ) 2 = 1374 \sum f_i(x_i - \bar{x})^2 = 1374 ∑ f i ( x i − x ˉ ) 2 = 1374 so σ 2 = 45.8 \sigma^2 = 45.8 σ 2 = 45.8 and σ ≈ 6.77 \sigma \approx 6.77 σ ≈ 6.77 .
Continuous frequency distributions: replace each class by its midpoint and proceed exactly as in the discrete case. (Gapped classes get the half-unit continuity correction first.)
There is also a frequency version of the computing identity:
σ 2 = 1 N ∑ f i x i 2 − ( 1 N ∑ f i x i ) 2 = 1 N 2 [ N ∑ f i x i 2 − ( ∑ f i x i ) 2 ] \sigma^2 = \frac{1}{N}\sum f_ix_i^2 - \left(\frac{1}{N}\sum f_ix_i\right)^2 = \frac{1}{N^2}\left[N\sum f_ix_i^2 - \left(\sum f_ix_i\right)^2\right] σ 2 = N 1 ∑ f i x i 2 − ( N 1 ∑ f i x i ) 2 = N 2 1 [ N ∑ f i x i 2 − ( ∑ f i x i ) 2 ]
useful when the x i x_i x i are small; when they are large, the shortcut method below is faster still.
The Shortcut (Step-Deviation) Method
Large midpoints make direct computation tedious. Shift by an assumed mean A A A (usually a middle midpoint) and shrink by the class width h h h :
Key Point (Step deviations): with y i = x i − A h y_i = \frac{x_i - A}{h} y i = h x i − A ,
x ˉ = A + h y ˉ σ x = h σ y σ 2 = h 2 N 2 [ N ∑ f i y i 2 − ( ∑ f i y i ) 2 ] \bar{x} = A + h\bar{y} \qquad \sigma_x = h\,\sigma_y \qquad \sigma^2 = \frac{h^2}{N^2}\left[N\sum f_iy_i^2 - \left(\sum f_iy_i\right)^2\right] x ˉ = A + h y ˉ σ x = h σ y σ 2 = N 2 h 2 [ N ∑ f i y i 2 − ( ∑ f i y i ) 2 ]
Why it works: shifting every observation by A A A moves the mean but leaves the spread untouched; dividing by h h h scales the spread down by exactly h h h . So the tiny y i y_i y i (typically − 3 , − 2 , − 1 , 0 , 1 , 2 , 3 -3, -2, -1, 0, 1, 2, 3 − 3 , − 2 , − 1 , 0 , 1 , 2 , 3 ) carry all the information, and one multiplication at the end converts back.
Worked example (classes 30-40 to 90-100 with frequencies 3, 7, 12, 15, 8, 3, 2; A = 65 A = 65 A = 65 , h = 10 h = 10 h = 10 ): the table gives ∑ f i y i = − 15 \sum f_iy_i = -15 ∑ f i y i = − 15 and ∑ f i y i 2 = 105 \sum f_iy_i^2 = 105 ∑ f i y i 2 = 105 , so
x ˉ = 65 − 15 50 × 10 = 62 , σ 2 = 100 2500 [ 50 ( 105 ) − ( − 15 ) 2 ] = 201 , σ ≈ 14.18 \bar{x} = 65 - \frac{15}{50} \times 10 = 62, \qquad \sigma^2 = \frac{100}{2500}\left[50(105) - (-15)^2\right] = 201, \qquad \sigma \approx 14.18 x ˉ = 65 − 50 15 × 10 = 62 , σ 2 = 2500 100 [ 50 ( 105 ) − ( − 15 ) 2 ] = 201 , σ ≈ 14.18
[Board Tip] Choose A A A as the midpoint of a central class so the y i y_i y i straddle zero — the sums stay small and sign errors stay visible. And remember the final multiply by h h h for σ \sigma σ (or h 2 h^2 h 2 for σ 2 \sigma^2 σ 2 ): forgetting it is the single most common shortcut-method error.
Solved Examples
Example 1: Discrete frequency distribution
Find the variance and SD for x i x_i x i : 4, 8, 11, 17, 20, 24, 32 with f i f_i f i : 3, 5, 9, 5, 4, 3, 1.
Solution:
Step 1 — Weighted mean. N = 30 N = 30 N = 30 , ∑ f i x i = 420 \sum f_ix_i = 420 ∑ f i x i = 420 : x ˉ = 14 \bar{x} = 14 x ˉ = 14 .
Step 2 — Weighted squared deviations. ∑ f i ( x i − 14 ) 2 = 1374 \sum f_i(x_i - 14)^2 = 1374 ∑ f i ( x i − 14 ) 2 = 1374 .
Step 3 — Divide and root. σ 2 = 1374 30 = 45.8 \sigma^2 = \frac{1374}{30} = 45.8 σ 2 = 30 1374 = 45.8 ; σ ≈ 6.77 \sigma \approx 6.77 σ ≈ 6.77 .
Takeaway: The frequency column multiplies EVERY squared deviation — a five-column table (x i x_i x i , f i f_i f i , f i x i f_ix_i f i x i , x i − x ˉ x_i - \bar{x} x i − x ˉ , f i ( x i − x ˉ ) 2 f_i(x_i-\bar{x})^2 f i ( x i − x ˉ ) 2 ) keeps it honest.
Example 2: Mean and variance, discrete data
x i x_i x i : 6, 10, 14, 18, 24, 28, 30 with f i f_i f i : 2, 4, 7, 12, 8, 4, 3.
Solution:
Step 1 — Mean. N = 40 N = 40 N = 40 , ∑ f i x i = 760 \sum f_ix_i = 760 ∑ f i x i = 760 : x ˉ = 19 \bar{x} = 19 x ˉ = 19 .
Step 2 — Weighted squares. ∑ f i ( x i − 19 ) 2 = 1736 \sum f_i(x_i - 19)^2 = 1736 ∑ f i ( x i − 19 ) 2 = 1736 .
Step 3 — Divide. σ 2 = 1736 40 = 43.4 \sigma^2 = \frac{1736}{40} = 43.4 σ 2 = 40 1736 = 43.4 .
Takeaway: A round mean (19 here) is the designer's gift — deviations stay integer and the table stays clean.
Example 3: Decimals welcome
x i x_i x i : 92, 93, 97, 98, 102, 104, 109 with f i f_i f i : 3, 2, 3, 2, 6, 3, 3.
Solution:
Step 1 — Mean. N = 22 N = 22 N = 22 , ∑ f i x i = 2200 \sum f_ix_i = 2200 ∑ f i x i = 2200 : x ˉ = 100 \bar{x} = 100 x ˉ = 100 .
Step 2 — Weighted squares. ∑ f i ( x i − 100 ) 2 = 3 ( 64 ) + 2 ( 49 ) + 3 ( 9 ) + 2 ( 4 ) + 6 ( 4 ) + 3 ( 16 ) + 3 ( 81 ) = 640 \sum f_i(x_i - 100)^2 = 3(64) + 2(49) + 3(9) + 2(4) + 6(4) + 3(16) + 3(81) = 640 ∑ f i ( x i − 100 ) 2 = 3 ( 64 ) + 2 ( 49 ) + 3 ( 9 ) + 2 ( 4 ) + 6 ( 4 ) + 3 ( 16 ) + 3 ( 81 ) = 640 .
Step 3 — Divide. σ 2 = 640 22 ≈ 29.09 \sigma^2 = \frac{640}{22} \approx 29.09 σ 2 = 22 640 ≈ 29.09 .
Takeaway: Large x i x_i x i values with a round mean still compute quickly — deviations, not raw values, do the work.
Example 4: Shortcut with h = 1 h = 1 h = 1
x i x_i x i : 60 to 68 with f i f_i f i : 2, 1, 12, 29, 25, 12, 10, 4, 5. Find the mean and SD by the shortcut method.
Solution:
Step 1 — Shift by A = 64 A = 64 A = 64 . Deviations d i = x i − 64 d_i = x_i - 64 d i = x i − 64 run − 4 -4 − 4 to 4 4 4 ; N = 100 N = 100 N = 100 .
Step 2 — The lucky sum. ∑ f i d i = 0 \sum f_id_i = 0 ∑ f i d i = 0 : x ˉ = 64 + 0 = 64 \bar{x} = 64 + 0 = 64 x ˉ = 64 + 0 = 64 exactly.
Step 3 — Spread. ∑ f i d i 2 = 286 \sum f_id_i^2 = 286 ∑ f i d i 2 = 286 : σ 2 = 286 100 − 0 = 2.86 \sigma^2 = \frac{286}{100} - 0 = 2.86 σ 2 = 100 286 − 0 = 2.86 , σ ≈ 1.69 \sigma \approx 1.69 σ ≈ 1.69 .
Takeaway: With h = 1 h = 1 h = 1 the shortcut is a pure shift — and when ∑ f i d i = 0 \sum f_id_i = 0 ∑ f i d i = 0 , the assumed mean IS the mean.
Example 5: Wide classes
Classes 0-30 up to 180-210 with frequencies 2, 3, 5, 10, 3, 5, 2. Find the mean and variance.
Solution:
Step 1 — Set up steps. Midpoints 15, 45, up to 195; A = 105 A = 105 A = 105 , h = 30 h = 30 h = 30 , N = 30 N = 30 N = 30 .
Step 2 — Small sums. ∑ f i y i = 2 \sum f_iy_i = 2 ∑ f i y i = 2 , ∑ f i y i 2 = 76 \sum f_iy_i^2 = 76 ∑ f i y i 2 = 76 : x ˉ = 105 + 2 30 × 30 = 107 \bar{x} = 105 + \frac{2}{30} \times 30 = 107 x ˉ = 105 + 30 2 × 30 = 107 .
Step 3 — Variance. σ 2 = 30 2 30 2 [ 30 ( 76 ) − 2 2 ] = 2280 − 4 = 2276 \sigma^2 = \frac{30^2}{30^2}\left[30(76) - 2^2\right] = 2280 - 4 = 2276 σ 2 = 3 0 2 3 0 2 [ 30 ( 76 ) − 2 2 ] = 2280 − 4 = 2276 .
Takeaway: With h = 30 h = 30 h = 30 the raw numbers would be enormous — the shortcut trades them for single digits and one rescale.
Example 6: A compact continuous table
Classes 0-10 up to 40-50 with frequencies 5, 8, 15, 16, 6. Find the mean and variance.
Solution:
Step 1 — Midpoints. 5 , 15 , 25 , 35 , 45 5, 15, 25, 35, 45 5 , 15 , 25 , 35 , 45 ; N = 50 N = 50 N = 50 .
Step 2 — Mean. ∑ f i x i = 1350 \sum f_ix_i = 1350 ∑ f i x i = 1350 : x ˉ = 27 \bar{x} = 27 x ˉ = 27 .
Step 3 — Weighted squares. ∑ f i ( x i − 27 ) 2 = 5 ( 484 ) + 8 ( 144 ) + 15 ( 4 ) + 16 ( 64 ) + 6 ( 324 ) = 6600 \sum f_i(x_i - 27)^2 = 5(484) + 8(144) + 15(4) + 16(64) + 6(324) = 6600 ∑ f i ( x i − 27 ) 2 = 5 ( 484 ) + 8 ( 144 ) + 15 ( 4 ) + 16 ( 64 ) + 6 ( 324 ) = 6600 : σ 2 = 132 \sigma^2 = 132 σ 2 = 132 .
Takeaway: Direct computation stays feasible when midpoints are small — the shortcut is a choice, not a ritual.
Example 7: The full shortcut
Classes 30-40 up to 90-100 with frequencies 3, 7, 12, 15, 8, 3, 2. Find the mean, variance and SD.
Solution:
Step 1 — Steps about the middle. A = 65 A = 65 A = 65 , h = 10 h = 10 h = 10 , N = 50 N = 50 N = 50 : the y i y_i y i run − 3 -3 − 3 to 3 3 3 .
Step 2 — Sums. ∑ f i y i = − 15 \sum f_iy_i = -15 ∑ f i y i = − 15 , ∑ f i y i 2 = 105 \sum f_iy_i^2 = 105 ∑ f i y i 2 = 105 : x ˉ = 65 + − 15 50 × 10 = 62 \bar{x} = 65 + \frac{-15}{50} \times 10 = 62 x ˉ = 65 + 50 − 15 × 10 = 62 .
Step 3 — Variance and SD. σ 2 = 10 2 50 2 [ 50 ( 105 ) − ( − 15 ) 2 ] = 100 2500 ( 5250 − 225 ) = 201 \sigma^2 = \frac{10^2}{50^2}\left[50(105) - (-15)^2\right] = \frac{100}{2500}(5250 - 225) = 201 σ 2 = 5 0 2 1 0 2 [ 50 ( 105 ) − ( − 15 ) 2 ] = 2500 100 ( 5250 − 225 ) = 201 : σ = 201 ≈ 14.18 \sigma = \sqrt{201} \approx 14.18 σ = 201 ≈ 14.18 .
Takeaway: Note ( − 15 ) 2 = + 225 (-15)^2 = +225 ( − 15 ) 2 = + 225 is SUBTRACTED — squaring the negative sum then subtracting it is where sign discipline pays.
Example 8: Heights by shortcut
Heights (cm): classes 70-75 up to 110-115 with frequencies 3, 4, 7, 7, 15, 9, 6, 6, 3.
Solution:
Step 1 — Steps. Midpoints 72.5 up to 112.5; A = 92.5 A = 92.5 A = 92.5 , h = 5 h = 5 h = 5 , N = 60 N = 60 N = 60 .
Step 2 — Mean. ∑ f i y i = 6 \sum f_iy_i = 6 ∑ f i y i = 6 : x ˉ = 92.5 + 6 60 × 5 = 93 \bar{x} = 92.5 + \frac{6}{60} \times 5 = 93 x ˉ = 92.5 + 60 6 × 5 = 93 cm.
Step 3 — Variance. ∑ f i y i 2 = 254 \sum f_iy_i^2 = 254 ∑ f i y i 2 = 254 : σ 2 = 25 3600 [ 60 ( 254 ) − 36 ] = 25 × 15204 3600 ≈ 105.58 \sigma^2 = \frac{25}{3600}\left[60(254) - 36\right] = \frac{25 \times 15204}{3600} \approx 105.58 σ 2 = 3600 25 [ 60 ( 254 ) − 36 ] = 3600 25 × 15204 ≈ 105.58 : σ ≈ 10.27 \sigma \approx 10.27 σ ≈ 10.27 cm.
Takeaway: Half-unit midpoints (72.5, 77.5) vanish into clean integers under the step substitution — exactly what it is for.
Example 9: Continuity correction first
Diameters (mm): 33-36, 37-40, 41-44, 45-48, 49-52 with frequencies 15, 17, 21, 22, 25.
Solution:
Step 1 — Close the gaps. Classes become 32.5-36.5 and so on; midpoints 34.5 , 38.5 , 42.5 , 46.5 , 50.5 34.5, 38.5, 42.5, 46.5, 50.5 34.5 , 38.5 , 42.5 , 46.5 , 50.5 ; N = 100 N = 100 N = 100 .
Step 2 — Steps. A = 42.5 A = 42.5 A = 42.5 , h = 4 h = 4 h = 4 : ∑ f i y i = 25 \sum f_iy_i = 25 ∑ f i y i = 25 , ∑ f i y i 2 = 199 \sum f_iy_i^2 = 199 ∑ f i y i 2 = 199 ; x ˉ = 42.5 + 25 100 × 4 = 43.5 \bar{x} = 42.5 + \frac{25}{100} \times 4 = 43.5 x ˉ = 42.5 + 100 25 × 4 = 43.5 mm.
Step 3 — Variance. σ 2 = 16 10000 [ 100 ( 199 ) − 625 ] = 16 × 19275 10000 ≈ 30.84 \sigma^2 = \frac{16}{10000}\left[100(199) - 625\right] = \frac{16 \times 19275}{10000} \approx 30.84 σ 2 = 10000 16 [ 100 ( 199 ) − 625 ] = 10000 16 × 19275 ≈ 30.84 : σ ≈ 5.55 \sigma \approx 5.55 σ ≈ 5.55 mm.
Takeaway: Gapped classes get the half-unit correction BEFORE anything else — midpoints shift with it, and so does every downstream number.
Example 10: Reading the shortcut backwards
A distribution has h = 10 h = 10 h = 10 , N = 40 N = 40 N = 40 , ∑ f i y i = 8 \sum f_iy_i = 8 ∑ f i y i = 8 , ∑ f i y i 2 = 50 \sum f_iy_i^2 = 50 ∑ f i y i 2 = 50 about A = 55 A = 55 A = 55 . Find the mean and variance.
Solution:
Step 1 — Mean. x ˉ = 55 + 8 40 × 10 = 57 \bar{x} = 55 + \frac{8}{40} \times 10 = 57 x ˉ = 55 + 40 8 × 10 = 57 .
Step 2 — Variance. σ 2 = 100 1600 [ 40 ( 50 ) − 8 2 ] = 100 × 1936 1600 = 121 \sigma^2 = \frac{100}{1600}\left[40(50) - 8^2\right] = \frac{100 \times 1936}{1600} = 121 σ 2 = 1600 100 [ 40 ( 50 ) − 8 2 ] = 1600 100 × 1936 = 121 .
Step 3 — SD. σ = 11 \sigma = 11 σ = 11 .
Takeaway: The four summary numbers ( A , h , ∑ f i y i , ∑ f i y i 2 ) (A, h, \sum f_iy_i, \sum f_iy_i^2) ( A , h , ∑ f i y i , ∑ f i y i 2 ) carry the whole distribution's mean and spread — JEE often hands you exactly these.