Chapter 13 ยท Statistics and Probability

13.1 Measures of Dispersion

An average says where the data sit; a measure of dispersion says how widely they spread. We compute the mean, median and mode of raw and grouped data, then the mean deviation, variance $\sigma^2=\tfrac1n\sum x_i^2-\bar x^{\,2}$ and standard deviation โ€” with change of origin and scale, combined groups and corrected data, the three ideas JEE Main tests most.

Two batsmen each scored $360$ runs in eight innings. Batsman A made $42, 48, 45, 44, 46, 43, 47, 45$; batsman B made $0, 110, 5, 90, 2, 100, 48, 5$. Both average $45$ runs an innings, so the mean cannot tell them apart โ€” yet a selector who needs a steady $40$ every match would pick A without a second thought, and one who needs a match-winner might gamble on B. The difference is not in the centre of the data but in how far the scores spread about it: A's scores never stray more than $3$ runs from $45$, B's typically stray by about $42$. Numbers that measure that spread are called measures of dispersion.

In this section we first make the three averages precise โ€” the mean, the median and the mode โ€” for raw lists, for frequency tables and for data grouped into classes. Then we measure spread by the mean deviation, the variance and the standard deviation, prove the shortcut $\sigma^2=\tfrac1n\sum x_i^2-\bar x^{\,2}$, and learn how all of these change when every observation is shifted or scaled, when two groups are merged and when a wrongly copied observation is corrected. JEE Main asks one statistics question in almost every paper, and nearly all of them are one of these last three types.

Averages of Raw Data: Mean, Median and Mode

Raw (ungrouped) data are a list of $n$ numbers $x_1,x_2,\dots,x_n$, the observations. When values repeat it is quicker to record each distinct value $x_i$ with its frequency $f_i$ (how many times it occurs); this is a discrete frequency distribution, and $N=\sum f_i$ is the total number of observations.

๐Ÿ“˜ Definition 13.1 โ€” Arithmetic mean

The mean of the observations $x_1,\dots,x_n$, and of a frequency distribution ($x_i$ with frequency $f_i$, $i=1,\dots,k$), is

$$\bar x=\frac{1}{n}\sum_{i=1}^{n}x_i,\qquad\qquad \bar x=\frac{\sum_{i=1}^{k}f_ix_i}{N},\quad N=\sum_{i=1}^{k}f_i.$$
๐Ÿ“˜ Definition 13.2 โ€” Median and mode

Arrange the $n$ observations in increasing order. The median $M$ is the middle value: the $\left(\tfrac{n+1}{2}\right)$th observation if $n$ is odd, and the mean of the $\left(\tfrac n2\right)$th and $\left(\tfrac n2+1\right)$th observations if $n$ is even. Half of the data lie at or below $M$ and half at or above it.

The mode is the value that occurs most often. Data may have one mode, several (bimodal, โ€ฆ), or none worth naming (all values occur equally often).

For a discrete frequency distribution the median is found with the cumulative frequencies $c_1=f_1$, $c_2=f_1+f_2$, โ€ฆ: the observation in position $p$ is the first value $x_i$ whose cumulative frequency reaches $p$. The mean has two properties that we use constantly.

๐Ÿ“ Theorem 13.1 โ€” Deviations from the mean; change of origin and scale
  1. The deviations from the mean add up to zero: $\displaystyle\sum_{i=1}^{n}(x_i-\bar x)=0$ (and $\sum f_i(x_i-\bar x)=0$ for a frequency distribution).
  2. If every observation is transformed by $y_i=\dfrac{x_i-a}{h}$ (constants $a$ and $h\ne0$), then $\bar y=\dfrac{\bar x-a}{h}$, that is, $\bar x=a+h\,\bar y$. More generally, if $y_i=px_i+q$ then $\bar y=p\,\bar x+q$, and the median and mode transform in exactly the same way.

Proof. (1) $\sum(x_i-\bar x)=\sum x_i-n\bar x=n\bar x-n\bar x=0$. (2) $\sum y_i=\sum(px_i+q)=p\sum x_i+nq$; divide by $n$. A transformation $px+q$ with $p\gt0$ keeps the order of the observations, so the middle one stays in the middle and the most frequent value stays most frequent; with $p\lt0$ the order is reversed, which still leaves the middle in the middle. $\blacksquare$ Part (1) says the mean is the balance point of the data: put equal weights at $x_1,\dots,x_n$ on a light rod and it balances on a pivot at $\bar x$. Part (2) is the arithmetic shortcut: subtract a convenient number $a$ (the assumed mean), divide by a common factor $h$, work with the small numbers $y_i$, and convert back.

โœ๏ธ Example 1 โ€” Mean, median and mode
(a) Find the mean, median and mode of $7, 3, 9, 5, 3, 8, 10, 3, 6, 6$. (b) Find the mean, median and mode of the distribution: $x_i$: $1, 2, 3, 4, 5$ with frequencies $f_i$: $4, 7, 10, 6, 3$. (c) Find the mean of $1005, 1010, 1020, 1035, 1030$ by a change of origin and scale.
(a) The sum is $60$ and $n=10$, so $\bar x=6$. In order: $3,3,3,5,6,6,7,8,9,10$; $n$ is even, so $M=\tfrac{6+6}{2}=6$ (the 5th and 6th values). The value $3$ occurs three times, more than any other: mode $=3$.
(b) $N=30$ and $\sum f_ix_i=4+14+30+24+15=87$, so $\bar x=\tfrac{87}{30}=2.9$. Cumulative frequencies $4, 11, 21, 27, 30$: the 15th and 16th observations both lie in the group with cumulative frequency $21$, so $M=3$. The largest frequency is $10$, so the mode is $3$.
(c) Take $a=1020$, $h=5$: $y_i=\tfrac{x_i-1020}{5}=-3,-2,0,3,2$, with $\bar y=0$. Hence $\bar x=1020+5\cdot0=1020$.
Check (a) deviations from $6$: $1,-3,3,-1,-3,2,4,-3,0,0$ โ€” they add up to $0$ โœ“ (Theorem 13.1(1)).

The mean of $10$ observations is $20$ and their median is $18$. Each observation is multiplied by $3$ and then $5$ is subtracted. The new mean and median are

Measuring Spread: Mean Deviation, Variance and Standard Deviation

The simplest measure of spread, the range (largest minus smallest observation), uses only two numbers and is wrecked by a single extreme value. A better measure looks at how far every observation is from a centre $a$. The raw deviations $x_i-a$ will not do โ€” about the mean they always add up to zero (Theorem 13.1) โ€” so we either take their absolute values or square them.

๐Ÿ“˜ Definition 13.3 โ€” Range and mean deviation

The range is $x_{\max}-x_{\min}$. The mean deviation about a number $a$ (usually the mean or the median) is the average distance of the observations from $a$:

$$\text{M.D.}(a)=\frac1n\sum_{i=1}^{n}|x_i-a|,\qquad\qquad \text{M.D.}(a)=\frac1N\sum_{i=1}^{k}f_i\,|x_i-a|.$$
๐Ÿ“ Theorem 13.2 โ€” The mean deviation is least about the median

For any observations $x_1,\dots,x_n$ and any real $a$, $\ \text{M.D.}(M)\le\text{M.D.}(a)$, where $M$ is the median. In particular $\text{M.D.}(M)\le\text{M.D.}(\bar x)$.

Proof. Let $S(a)=\sum|x_i-a|$. As $a$ moves to the right by a small amount $\delta$ (not passing any observation), each term with $x_i\lt a$ grows by $\delta$ and each term with $x_i\gt a$ shrinks by $\delta$. So $S$ decreases while more than half of the observations lie to the right of $a$, and increases once more than half lie to the left. The turning point โ€” where at most half lie on each side โ€” is exactly the median. $\blacksquare$ For example, for $1,2,3,4,20$ the mean is $6$ and the median $3$: $\text{M.D.}(6)=\tfrac{28}{5}=5.6$ but $\text{M.D.}(3)=\tfrac{21}{5}=4.2$.

๐Ÿ“˜ Definition 13.4 โ€” Variance and standard deviation

The variance is the mean of the squared deviations from the mean, and the standard deviation is its positive square root:

$$\sigma^2=\frac1n\sum_{i=1}^{n}(x_i-\bar x)^2,\qquad \sigma^2=\frac1N\sum_{i=1}^{k}f_i(x_i-\bar x)^2,\qquad \sigma=\sqrt{\sigma^2}.$$

$\sigma$ has the same units as the data (runs, cm, โ‚น), while $\sigma^2$ has squared units. In JEE Main, "variance" always means this definition, with $n$ (not $n-1$) in the denominator.

๐Ÿ“ Theorem 13.3 โ€” Computing and transforming the variance
  1. Shortcut: $\displaystyle\sigma^2=\frac1n\sum x_i^2-\bar x^{\,2}$ ("mean of the squares minus square of the mean"); for a distribution, $\sigma^2=\dfrac{\sum f_ix_i^2}{N}-\bar x^{\,2}$.
  2. About any point $a$: $\displaystyle\frac1n\sum(x_i-a)^2=\sigma^2+(\bar x-a)^2$, so the mean square deviation is least when $a=\bar x$.
  3. Change of origin and scale: if $y_i=px_i+q$, then $\sigma_y^2=p^2\sigma_x^2$, $\ \sigma_y=|p|\,\sigma_x$ and $\text{M.D.}_y=|p|\,\text{M.D.}_x$ (about the corresponding mean or median). Adding a constant changes no measure of spread.
  4. $\sigma=0$ if and only if all the observations are equal.

Proof. (2) Write $x_i-a=(x_i-\bar x)+(\bar x-a)$ and square:

$$\begin{aligned}\textstyle\sum(x_i-a)^2&=\textstyle\sum(x_i-\bar x)^2\\&\quad+\textstyle2(\bar x-a)\sum(x_i-\bar x)+n(\bar x-a)^2.\end{aligned}$$

The middle sum is $0$ by Theorem 13.1, which gives (2). Putting $a=0$ gives (1): $\tfrac1n\sum x_i^2=\sigma^2+\bar x^{\,2}$. (3) $y_i-\bar y=(px_i+q)-(p\bar x+q)=p(x_i-\bar x)$: every deviation is multiplied by $p$, so every squared deviation by $p^2$ and every absolute deviation by $|p|$. (4) A sum of squares is $0$ only when every term is $0$. $\blacksquare$

Use the shortcut (1) whenever $\bar x$ is not a whole number โ€” or whenever the question gives you $\sum x_i$ and $\sum x_i^2$, which is the usual JEE Main set-up. Two facts from Section 6.2 give the variance of the first $n$ natural numbers: $\bar x=\tfrac{n+1}{2}$ and $\tfrac1n\sum k^2=\tfrac{(n+1)(2n+1)}{6}$, so $\sigma^2=\tfrac{(n+1)(2n+1)}{6}-\tfrac{(n+1)^2}{4}=\tfrac{n^2-1}{12}$.

โœ๏ธ Example 2 โ€” All the measures for one data set
For the data $3, 5, 6, 7, 9, 12, 14, 24$ find the range, the mean deviation about the mean, the mean deviation about the median, the variance and the standard deviation.
Centre Range $=24-3=21$. $\sum x_i=80$, $n=8$: $\bar x=10$. The data are already in order; $M=\tfrac{7+9}{2}=8$.
M.D. about $\bar x$ $|x_i-10|$: $7,5,4,3,1,2,4,14$, total $40$: $\text{M.D.}(\bar x)=\tfrac{40}{8}=5$.
M.D. about $M$ $|x_i-8|$: $5,3,2,1,1,4,6,16$, total $38$: $\text{M.D.}(M)=\tfrac{38}{8}=4.75$ โ€” smaller, as Theorem 13.2 promises.
Variance Squared deviations from $10$: $49,25,16,9,1,4,16,196$, total $316$: $\sigma^2=\tfrac{316}{8}=39.5$, $\ \sigma=\sqrt{39.5}\approx6.28$.
Check Shortcut: $\sum x_i^2=9+25+36+49+81+144+196+576=1116$; $\tfrac{1116}{8}-10^2=139.5-100=39.5$ โœ“.

The data $4, 6, 8, 10, 12$ have mean $8$, median $8$ and $\sigma\approx2.83$. Drag the $12$ out to $20$. Which statement describes what happens?

Choose the preset evenly spaced and drag the right-most point to $20$ (or press Play and watch it travel). The readouts change from $\bar x=8$, $M=8$, $\sigma=2.83$ to $\bar x=9.6$, $M=8$, $\sigma=5.57$, $\sigma^2=31.04$. The mean is the balance point, so one far weight drags it; the median only asks which point is in the middle, and the middle point is still $8$. The mean deviation about the median grows from $2.4$ to $4$, and the one about the mean from $2.4$ to $4.32$ โ€” still not smaller than the median one (Theorem 13.2).
Interactive 1 โ€” Data Line Lab: Centre and Spread

Drag the dots along the number line (they snap to whole numbers; equal values stack). The purple pivot is the mean โ€” the point where the data balance; the green diamond is the median. The horizontal bars above the line are the deviations from the chosen centre, red to the left and blue to the right, and the shaded band is $\bar x\pm\sigma$. Press Play: the last dot travels across the line โ€” watch the mean and $\sigma$ chase it while the median hardly moves.

mean $\bar x$โ€”
median $M$โ€”
modeโ€”
M.D. about $\bar x$โ€”
M.D. about $M$โ€”
variance $\sigma^2$โ€”
s.d. $\sigma$โ€”
โœ๏ธ Example 3 โ€” Recovering lost observations; transforming the data
The mean and variance of seven observations are $8$ and $16$. Five of the observations are $2, 4, 10, 12, 14$. (a) Find the other two. (b) Each of the seven observations is multiplied by $3$ and then $2$ is subtracted. Find the new mean, variance and standard deviation.
Find the product of the two missing observations before you open the solution:
Sum Call the missing values $a$, $b$. $\sum x_i=7\times8=56$ and the five known values add to $42$, so $a+b=14$.
Sum of squares By Theorem 13.3(1), $\sum x_i^2=n(\sigma^2+\bar x^{\,2})=7(16+64)=560$. The known squares add to $4+16+100+144+196=460$, so $a^2+b^2=100$.
Solve $2ab=(a+b)^2-(a^2+b^2)=196-100=96$, so $ab=48$; $a$ and $b$ are the roots of $t^2-14t+48=0$, i.e. $6$ and $8$.
(b) $y=3x-2$: $\bar y=3\cdot8-2=22$, $\ \sigma_y^2=3^2\cdot16=144$, $\ \sigma_y=12$. The $-2$ changes the mean only.
Check $2,4,6,8,10,12,14$: mean $8$; squared deviations $36,16,4,0,4,16,36$ add to $112$, and $\tfrac{112}{7}=16$ โœ“.

The variance of $x_1,\dots,x_n$ is $9$. The standard deviation of $4-2x_1,\ 4-2x_2,\ \dots,\ 4-2x_n$ is

Grouped Data: Mean, Median, Mode and Variance

Large data sets are summarised by sorting the observations into classes: for example, the marks of $50$ students in classes $0$โ€“$10$, $10$โ€“$20$, โ€ฆ. The individual values are lost; what remains is the frequency of each class.

๐Ÿ“˜ Definition 13.5 โ€” Classes, class marks and cumulative frequency

In a continuous (exclusive) grouping, the class $l$โ€“$u$ contains the observations $x$ with $l\le x\lt u$; $l$ and $u$ are its lower and upper limits and $h=u-l$ is the class width. The class mark is the mid-point $x_i=\tfrac{l+u}{2}$, which stands for every observation in the class. The cumulative frequency of a class is the total frequency of that class and all classes before it. Classes written inclusively (such as $10$โ€“$19$, $20$โ€“$29$) are first made continuous by moving each limit half a unit outwards: $9.5$โ€“$19.5$, $19.5$โ€“$29.5$, โ€ฆ.

๐Ÿ“ Theorem 13.4 โ€” Formulas for grouped data

Let the classes have equal width $h$, class marks $x_i$, frequencies $f_i$ and $N=\sum f_i$; let $a$ be a convenient class mark and $u_i=\tfrac{x_i-a}{h}$ (the step deviations). Then

$$\bar x=a+h\cdot\frac{\sum f_iu_i}{N},\qquad \sigma^2=h^2\left[\frac{\sum f_iu_i^2}{N}-\left(\frac{\sum f_iu_i}{N}\right)^2\right],$$ $$\text{median } M=l+\frac{\tfrac N2-C}{f}\,h,\qquad\qquad \text{mode}=l+\frac{f_1-f_0}{2f_1-f_0-f_2}\,h.$$

For the median, $l$ is the lower limit of the median class (the first class whose cumulative frequency is at least $\tfrac N2$), $f$ its frequency and $C$ the cumulative frequency of the class before it. For the mode, $l$ is the lower limit of the modal class (the class of largest frequency), $f_1$ its frequency and $f_0$, $f_2$ the frequencies of the classes just before and just after it ($0$ if there is none). The mean deviation is $\tfrac1N\sum f_i|x_i-a|$ with the class marks as the $x_i$.

Why these formulas? The mean and variance are Definitions 13.1 and 13.4 applied to the class marks, with the change of origin and scale of Theorems 13.1 and 13.3: $x_i=a+hu_i$ gives $\bar x=a+h\bar u$ and $\sigma_x^2=h^2\sigma_u^2$. For the median, imagine the $f$ observations of the median class spread evenly across its width $h$. Before the class there are $C$ observations, and we need $\tfrac N2-C$ more to reach the middle, so we go the fraction $\tfrac{N/2-C}{f}$ of the way across the class. This is linear interpolation on the cumulative-frequency graph (the ogive). For the mode, draw the histogram and join the top corners of the modal bar crosswise to the tops of its neighbours; the two lines cross at the height where the "pull" of the two neighbours balances, and its $x$-coordinate is exactly the mode formula โ€” Interactive 2 draws this construction for you. All three formulas assume equal class widths.

โœ๏ธ Example 4 โ€” A complete grouped table
The marks (out of $60$) of $50$ students are grouped below. Find the mean, the median, the mode, the variance and the standard deviation.
marks0โ€“1010โ€“2020โ€“3030โ€“4040โ€“5050โ€“60
students58151273
Find the median before you open the solution:
Table Class marks $5,15,25,35,45,55$; take $a=25$, $h=10$: $u_i=-2,-1,0,1,2,3$. Then $f_iu_i$: $-10,-8,0,12,14,9$, so $\sum f_iu_i=17$; $f_iu_i^2$: $20,8,0,12,28,27$, so $\sum f_iu_i^2=95$. Cumulative frequencies: $5,13,28,40,47,50$.
Mean $\bar x=25+10\cdot\tfrac{17}{50}=25+3.4=28.4$ marks.
Median $\tfrac N2=25$; the first cumulative frequency $\ge25$ is $28$, so the median class is $20$โ€“$30$ with $l=20$, $C=13$, $f=15$: $M=20+\tfrac{25-13}{15}\cdot10=28$ marks.
Mode Modal class $20$โ€“$30$: $f_1=15$, $f_0=8$, $f_2=12$: mode $=20+\tfrac{15-8}{30-8-12}\cdot10=20+7=27$ marks.
Variance $\sigma^2=10^2\left[\tfrac{95}{50}-\left(\tfrac{17}{50}\right)^2\right]=100(1.9-0.1156)=178.44$ marksยฒ, so $\sigma\approx13.36$ marks.
Check Directly, $\sum f_ix_i=1420$ gives $\bar x=28.4$ โœ“, and $\sum f_ix_i^2=49250$ gives $\tfrac{49250}{50}-28.4^2=985-806.56=178.44$ โœ“.

A histogram with a long tail to the right (a few very high values) is called right-skewed. For such data, how are the mean, median and mode usually ordered?

Choose the preset right-skewed (frequencies $4,12,14,9,5,3,1$, $N=48$). The readouts show mode $\approx22.86$, median $\approx25.71$ and mean $=27.5$. The mode sits under the peak; the median needs half of the area, which the tail pulls a little to the right; the mean, the balance point, is pulled furthest. Choose symmetric and all three coincide at $35$; choose left-skewed and the order reverses. The rough rule mode $\approx3M-2\bar x$ gives $3(25.71)-2(27.5)\approx22.1$ here.
Interactive 2 โ€” Grouped Data Lab: the Frequency Table Calculator

Seven classes $0$โ€“$10$, โ€ฆ, $60$โ€“$70$. Drag the top of any bar to change its frequency (or choose a preset); the step-deviation table below the graph recomputes with $a=35$, $h=10$. Choose what to construct: the median from the ogive (cumulative frequency curve) meeting the line $\tfrac N2$, the mode from the crossed lines in the modal bar, or the mean as the balance point with the band $\bar x\pm\sigma$. Press Play to cycle through the presets.

$N$โ€”
mean $\bar x$โ€”
median $M$โ€”
modeโ€”
variance $\sigma^2$โ€”
s.d. $\sigma$โ€”

In a grouped distribution with $N=60$ and class width $10$, the median class is $30$โ€“$40$, its frequency is $15$ and the cumulative frequency before it is $24$. The median is

Combined Groups, Corrected Data and the Coefficient of Variation

Three situations come up again and again: two groups are merged and we want the mean and variance of the whole; an observation was copied wrongly and the statistics must be corrected; and two data sets with different means must be compared for consistency. All three are handled by remembering what the mean and variance are made of โ€” $\sum x_i$ and $\sum x_i^2$.

๐Ÿ“ Theorem 13.5 โ€” Mean and variance of two combined groups

Group 1 has $n_1$ observations with mean $\bar x_1$ and variance $\sigma_1^2$; group 2 has $n_2$ observations with mean $\bar x_2$ and variance $\sigma_2^2$. The combined group of $n_1+n_2$ observations has

$$\bar x=\frac{n_1\bar x_1+n_2\bar x_2}{n_1+n_2},\qquad \sigma^2=\frac{n_1\left(\sigma_1^2+d_1^2\right)+n_2\left(\sigma_2^2+d_2^2\right)}{n_1+n_2},$$

where $d_1=\bar x_1-\bar x$ and $d_2=\bar x_2-\bar x$. Equivalently, $\sigma^2=\dfrac{n_1\sigma_1^2+n_2\sigma_2^2}{n_1+n_2}+\dfrac{n_1n_2(\bar x_1-\bar x_2)^2}{(n_1+n_2)^2}$.

Proof. The total of group 1 is $n_1\bar x_1$ and of group 2 is $n_2\bar x_2$, which gives $\bar x$. For the variance, apply Theorem 13.3(2) to each group with $a=\bar x$: the sum of the squared deviations of group 1 from $\bar x$ is $n_1\left(\sigma_1^2+(\bar x_1-\bar x)^2\right)$, and similarly for group 2. Add and divide by $n_1+n_2$. The second form follows by substituting $d_1=\tfrac{n_2(\bar x_1-\bar x_2)}{n_1+n_2}$ and $d_2=-\tfrac{n_1(\bar x_1-\bar x_2)}{n_1+n_2}$. $\blacksquare$ The combined variance is not the average of the two variances: if the group means differ, the gap between them adds spread of its own.

Corrected data. If an observation $p$ was recorded in place of the true value $q$, correct the totals and recompute: $\sum x_i\to\sum x_i-p+q$ and $\sum x_i^2\to\sum x_i^2-p^2+q^2$. Never "correct the variance" by adjusting the old mean only โ€” the sum of squares must be corrected too.

๐Ÿ“˜ Definition 13.6 โ€” Coefficient of variation

For data with mean $\bar x\ne0$, the coefficient of variation is $\ \text{C.V.}=\dfrac{\sigma}{\bar x}\times100$. It measures spread relative to the size of the data and has no units, so it can compare data sets with different means or units. The set with the smaller C.V. is the more consistent (less variable) one.

โœ๏ธ Example 5 โ€” Two sections merged; which is more consistent?
Section A of a class has $40$ students with mean mark $62$ and standard deviation $8$; Section B has $60$ students with mean $72$ and standard deviation $6$. (a) Find the mean and standard deviation of all $100$ students. (b) Which section is more consistent?
Mean $\bar x=\tfrac{40\cdot62+60\cdot72}{100}=\tfrac{2480+4320}{100}=68$.
Variance $d_1=62-68=-6$, $d_2=72-68=4$. $\sigma^2=\tfrac{40(64+36)+60(36+16)}{100}=\tfrac{4000+3120}{100}=71.2$, so $\sigma=\sqrt{71.2}\approx8.44$.
(b) $\text{C.V.}_A=\tfrac{8}{62}\times100\approx12.9$, $\ \text{C.V.}_B=\tfrac{6}{72}\times100\approx8.3$. Section B is more consistent.
Check Second form: $\tfrac{40\cdot64+60\cdot36}{100}+\tfrac{40\cdot60\cdot10^2}{100^2}=47.2+24=71.2$ โœ“. The combined $\sigma\approx8.44$ is larger than both $8$ and $6$, because the two section means are $10$ marks apart.
โœ๏ธ Example 6 โ€” Hard example: a corrected observation, and missing frequencies
(a) The mean and standard deviation of $20$ observations were found to be $10$ and $2$. Later it was found that one observation was copied as $8$ instead of $12$. Find the correct mean and variance. (b) The distribution below has $N=60$ and median $28$. Find $x$ and $y$.
class0โ€“1010โ€“2020โ€“3030โ€“4040โ€“50
frequency5$x$2015$y$
Find the correct variance in (a):
Old totals $\sum x_i=20\cdot10=200$; $\ \sum x_i^2=n(\sigma^2+\bar x^{\,2})=20(4+100)=2080$.
Correct them $\sum x_i=200-8+12=204$; $\ \sum x_i^2=2080-64+144=2160$.
(a) Mean $=\tfrac{204}{20}=10.2$; variance $=\tfrac{2160}{20}-10.2^2=108-104.04=3.96$ (so $\sigma\approx1.99$).
(b) Total $5+x+20+15+y=60$, so $x+y=20$.
(b) Median $M=28$ lies in $20$โ€“$30$, so that is the median class: $l=20$, $f=20$, $C=5+x$, $\tfrac N2=30$. Then $28=20+\tfrac{30-(5+x)}{20}\cdot10$, i.e. $\tfrac{25-x}{2}=8$, so $x=9$ and $y=11$.
Check Cumulative frequencies $5, 14, 34$: $30$ is first reached in $20$โ€“$30$ โœ“, and $20+\tfrac{30-14}{20}\cdot10=28$ โœ“.
โš ๏ธ JEE Main traps

1. Shift versus scale. Adding $q$ to every observation adds $q$ to the mean, median and mode but changes no measure of spread. Multiplying by $p$ multiplies the averages by $p$, the variance by $p^2$, and $\sigma$ and the mean deviation by $|p|$ โ€” never by $p$ when $p\lt0$.

2. "Mean of the squares minus the square of the mean." $\sigma^2=\tfrac{\sum x_i^2}{n}-\bar x^{\,2}$, not $\tfrac{\sum x_i^2-\bar x^{\,2}}{n}$ and not $\tfrac{(\sum x_i)^2}{n}$. And $\sigma^2$ uses $n$, not $n-1$.

3. Combining and correcting. The combined variance is not the average of the variances (Theorem 13.5 adds the $d^2$ terms). When an observation is corrected, correct both $\sum x_i$ and $\sum x_i^2$.

4. Grouped median and mode. The median class is located with $\tfrac N2$ (not $\tfrac{N+1}{2}$) on the cumulative frequencies; $C$ is the cumulative frequency before the median class. In the mode formula $f_0$ and $f_2$ are the ordinary frequencies of the neighbouring classes. Inclusive classes ($10$โ€“$19$) must first be made continuous ($9.5$โ€“$19.5$).

5. Mean deviation about which point? Read whether the question wants the M.D. about the mean or about the median; they are usually different, and the one about the median is never larger.

Group 1: $10$ observations, mean $12$, variance $4$. Group 2: $15$ observations, mean $17$, variance $9$. The variance of all $25$ observations is

Exercises

Variance means $\sigma^2=\tfrac1n\sum(x_i-\bar x)^2$ throughout. Give answers to two decimal places where they are not exact.

I
Averages of raw and discrete data.
  • 1 Find the mean, median and mode of $12, 15, 11, 15, 18, 20, 15, 13, 16$.
  • 2 Find the median of $23, 7, 18, 31, 12, 26, 9, 40$.
  • 3 Find the mean and median of the distribution $x_i$: $10, 20, 30, 40, 50$ with $f_i$: $3, 9, 14, 8, 6$.
  • 4 The mean of $10$ observations is $25$. Each observation is increased by $4$ and the result is multiplied by $3$. Find the new mean.
  • 5 The mean of six numbers is $14$; five of them are $8, 12, 15, 17, 20$. Find the sixth.
  • 6 The mean of $x,\ x+3,\ x+5,\ x+7,\ x+10$ is $9$. Find $x$ and the median.
  • 7 The deviations of five observations from their mean are $-3, 5, 2, -6$ and $k$. Find $k$.
  • 8 For a moderately skewed distribution the mean is $34.5$ and the median is $33$. Estimate the mode with the rule mode $\approx3M-2\bar x$.
1 Sum $135$, $n=9$: $\bar x=15$. Ordered: $11,12,13,15,15,15,16,18,20$; the 5th value is $M=15$; mode $15$.
2 Ordered: $7,9,12,18,23,26,31,40$; $M=\tfrac{18+23}{2}=20.5$.
3 $N=40$, $\sum f_ix_i=30+180+420+320+300=1250$: $\bar x=31.25$. Cumulative frequencies $3,12,26,\dots$: the 20th and 21st values are $30$, so $M=30$.
4 $y=3(x+4)$: $\bar y=3(25+4)=87$.
5 Total $6\cdot14=84$; the five add to $72$; the sixth is $12$.
6 $\tfrac{5x+25}{5}=9$ gives $x=4$; the data $4,7,9,11,14$ have median $9$.
7 Deviations from the mean add to $0$ (Theorem 13.1): $-3+5+2-6+k=0$, $k=2$.
8 $3(33)-2(34.5)=99-69=30$.
II
Mean deviation, variance and standard deviation of raw data.
  • 1 Find the range and the mean deviation about the mean of $6, 8, 10, 12, 14$.
  • 2 Find the mean deviation about the median of $13, 17, 16, 14, 11, 13, 10, 16, 11, 18, 12, 17$.
  • 3 Find the variance and standard deviation of $2, 4, 6, 8, 10$.
  • 4 Show that the variance of $1, 2, \dots, n$ is $\tfrac{n^2-1}{12}$, and evaluate it for $n=10$.
  • 5 Find the variance of the first ten odd natural numbers $1, 3, \dots, 19$.
  • 6 The mean and variance of five observations are $4.4$ and $8.24$. Three of them are $1, 2, 6$. Find the other two.
  • 7 Of $2n$ observations, half are equal to $a$ and half to $-a$ ($a\gt0$). If their standard deviation is $2$, find $a$.
  • 8 The variance of $x_1,\dots,x_n$ is $9$. Find the variance of $4-2x_1,\dots,4-2x_n$.
  • 9 For $1, 2, 3, 4, 20$, find the mean deviation about the mean and about the median, and say which theorem the comparison illustrates.
1 Range $14-6=8$; $\bar x=10$; $|x_i-10|$: $4,2,0,2,4$; M.D. $=\tfrac{12}{5}=2.4$.
2 Ordered: $10,11,11,12,13,13,14,16,16,17,17,18$; $M=\tfrac{13+14}{2}=13.5$. The distances add to $28$, so M.D. $=\tfrac{28}{12}\approx2.33$.
3 $\bar x=6$; squared deviations $16,4,0,4,16$; $\sigma^2=\tfrac{40}{5}=8$, $\sigma=2\sqrt2\approx2.83$.
4 $\bar x=\tfrac{n+1}{2}$ and $\tfrac1n\sum k^2=\tfrac{(n+1)(2n+1)}{6}$, so $\sigma^2=\tfrac{(n+1)(2n+1)}{6}-\tfrac{(n+1)^2}{4}=\tfrac{(n+1)(4n+2-3n-3)}{12}=\tfrac{n^2-1}{12}$. For $n=10$: $\tfrac{99}{12}=8.25$.
5 $2k-1$ is $2k$ shifted by $-1$, so by Theorem 13.3(3) the variance is $2^2\cdot\tfrac{10^2-1}{12}=4\cdot8.25=33$.
6 $a+b=22-9=13$; $\sum x_i^2=5(8.24+4.4^2)=5(27.6)=138$, so $a^2+b^2=138-41=97$. Then $ab=\tfrac{169-97}{2}=36$: the values are $4$ and $9$.
7 The mean is $0$ and every squared deviation is $a^2$, so $\sigma=a=2$.
8 $p=-2$: variance $(-2)^2\cdot9=36$ (s.d. $6$).
9 $\bar x=6$: distances $5,4,3,2,14$, M.D. $=5.6$. $M=3$: distances $2,1,0,1,17$, M.D. $=4.2$. The median gives the smaller value โ€” Theorem 13.2.
III
Grouped data. Parts 1โ€“5 use this distribution of $50$ waiting times (minutes):
time10โ€“2020โ€“3030โ€“4040โ€“5050โ€“6060โ€“70
frequency410161262
  • 1 Find the mean by the step-deviation method.
  • 2 Find the median.
  • 3 Find the mode.
  • 4 Find the variance and the standard deviation.
  • 5 Find the mean deviation about the mean.
  • 6 Find the median of the inclusive distribution: classes $1$โ€“$10$, $11$โ€“$20$, $21$โ€“$30$, $31$โ€“$40$ with frequencies $3, 7, 12, 8$.
  • 7 The distribution with classes $0$โ€“$10$, $10$โ€“$20$, $20$โ€“$30$, $30$โ€“$40$, $40$โ€“$50$ and frequencies $5, 8, p, 12, 5$ has mean $26$. Find $p$.
1 Class marks $15,\dots,65$; $a=35$, $h=10$: $u_i=-2,-1,0,1,2,3$; $\sum f_iu_i=-8-10+0+12+12+6=12$. $\bar x=35+10\cdot\tfrac{12}{50}=37.4$ min.
2 Cumulative frequencies $4,14,30,\dots$; $\tfrac N2=25$ is reached in $30$โ€“$40$: $M=30+\tfrac{25-14}{16}\cdot10=36.875$ min.
3 Modal class $30$โ€“$40$, $f_1=16$, $f_0=10$, $f_2=12$: mode $=30+\tfrac{6}{32-22}\cdot10=36$ min.
4 $\sum f_iu_i^2=16+10+0+12+24+18=80$: $\sigma^2=100\left[\tfrac{80}{50}-(0.24)^2\right]=100(1.6-0.0576)=154.24$ minยฒ, $\sigma\approx12.42$ min.
5 $|x_i-37.4|$: $22.4,12.4,2.4,7.6,17.6,27.6$; $\sum f_i|x_i-37.4|=89.6+124+38.4+91.2+105.6+55.2=504$; M.D. $=\tfrac{504}{50}=10.08$ min.
6 Continuous classes $0.5$โ€“$10.5$, $10.5$โ€“$20.5$, $20.5$โ€“$30.5$, $30.5$โ€“$40.5$; $N=30$, $\tfrac N2=15$, cumulative $3,10,22$: $M=20.5+\tfrac{15-10}{12}\cdot10\approx24.67$.
7 Class marks $5,15,25,35,45$: $\sum f_ix_i=790+25p$ and $N=30+p$. $26(30+p)=790+25p$ gives $p=10$.
IV
Combined groups, corrected data and consistency.
  • 1 $30$ boys have mean height $160$ cm and $20$ girls have mean height $150$ cm. Find the mean height of all $50$ children.
  • 2 Group 1: $10$ observations, mean $12$, variance $4$; group 2: $15$ observations, mean $17$, variance $9$. Find the combined mean and variance.
  • 3 The mean of $25$ observations was $36$, but one observation $40$ had been copied as $25$. Find the correct mean.
  • 4 The mean and variance of $10$ observations were $12$ and $9$, but one observation $20$ had been recorded as $2$. Find the correct mean and variance.
  • 5 Plant A's daily output has mean $50$ t and s.d. $10$ t; plant B's has mean $80$ t and s.d. $12$ t. Compare their coefficients of variation. Which is more consistent?
  • 6 The observations $x_i$ have mean $20$ and s.d. $5$. Find the mean and s.d. of $y_i=\tfrac{x_i-20}{5}$.
  • 7 $100$ observations have mean $50$ and s.d. $10$. Five is added to each and the results are doubled. Find the new mean and variance.
  • 8 Modelling. Two machines fill $500$ g packets. Five packets from machine A weigh $498, 502, 499, 501, 500$ g; five from B weigh $495, 505, 500, 497, 503$ g. Find each machine's standard deviation and say which should be serviced.
1 $\tfrac{30\cdot160+20\cdot150}{50}=\tfrac{7800}{50}=156$ cm.
2 $\bar x=\tfrac{120+255}{25}=15$; $d_1=-3$, $d_2=2$: $\sigma^2=\tfrac{10(4+9)+15(9+4)}{25}=13$.
3 $\sum x_i=900-25+40=915$; mean $=\tfrac{915}{25}=36.6$.
4 $\sum x_i=120-2+20=138$, mean $13.8$. $\sum x_i^2=10(9+144)=1530\to1530-4+400=1926$; variance $=192.6-13.8^2=192.6-190.44=2.16$.
5 $\text{C.V.}_A=\tfrac{10}{50}\times100=20$, $\ \text{C.V.}_B=\tfrac{12}{80}\times100=15$. B is more consistent, although its s.d. is larger.
6 $\bar y=\tfrac{20-20}{5}=0$ and $\sigma_y=\tfrac{5}{5}=1$ โ€” "standardised" data.
7 $y=2(x+5)$: mean $2(55)=110$; s.d. $2\cdot10=20$, variance $400$.
8 Both means are $500$ g. A: squared deviations $4,4,1,1,0$, $\sigma_A^2=2$, $\sigma_A\approx1.41$ g. B: $25,25,0,9,9$, $\sigma_B^2=13.6$, $\sigma_B\approx3.69$ g. Both fill $500$ g on average, but B is far less consistent โ€” service B.
๐ŸŽฏ Exam corner JEE Main ยท MCQJEE Main ยท Numerical

E1. JEE Main ยท MCQ The mean and variance of five observations are $7$ and $10$. Three of the observations are $3, 5, 9$, and the other two are $a$ and $b$. Then $|a-b|$ equals (A) $6$ (B) $4$ (C) $8$ (D) $2$

Sums $a+b=35-17=18$. $\sum x_i^2=5(10+49)=295$, and $9+25+81=115$, so $a^2+b^2=180$.
Difference $2ab=18^2-180=144$, so $(a-b)^2=(a^2+b^2)-2ab=180-144=36$.
Answer (A) $|a-b|=6$ (the values are $12$ and $6$).
โฑ Shortcut $(a-b)^2=2(a^2+b^2)-(a+b)^2=360-324=36$ โ€” no need to find $a$ and $b$.

E2. JEE Main ยท Numerical A batch of $30$ components has mean length $50$ mm and standard deviation $6$ mm; a second batch of $20$ has mean $45$ mm and standard deviation $4$ mm. Find the variance (in mmยฒ) of the lengths of all $50$ components. Give the answer to the nearest integer.

Mean $\bar x=\tfrac{1500+900}{50}=48$; $d_1=2$, $d_2=-3$.
Theorem 13.5 $\sigma^2=\tfrac{30(36+4)+20(16+9)}{50}=\tfrac{1200+500}{50}$.
Answer $34$.
โฑ Shortcut $\tfrac{n_1\sigma_1^2+n_2\sigma_2^2}{n}+\tfrac{n_1n_2(\bar x_1-\bar x_2)^2}{n^2}=\tfrac{1080+320}{50}+\tfrac{600\cdot25}{2500}=28+6=34$.

E3. JEE Main ยท MCQ Ten observations $x_1,\dots,x_{10}$ have mean $8$ and variance $4$. Let $y_i=2x_i-6$. The mean and variance of the twenty numbers $x_1,\dots,x_{10},y_1,\dots,y_{10}$ are (A) $9$ and $10$ (B) $9$ and $11$ (C) $10$ and $11$ (D) $9$ and $20$

The $y$'s By Theorems 13.1 and 13.3: $\bar y=2\cdot8-6=10$, $\sigma_y^2=4\cdot4=16$.
Combine $\bar z=\tfrac{80+100}{20}=9$; $d_1=-1$, $d_2=1$: $\sigma^2=\tfrac{10(4+1)+10(16+1)}{20}=\tfrac{220}{20}=11$.
Answer (B) $9$ and $11$.
โฑ Shortcut (D) adds the variances, (A) averages them as $\tfrac{4+16}{2}$; only the combined formula with the $d^2$ terms gives $11$.

E4. JEE Main ยท Numerical The frequencies of the classes $0$โ€“$10$, $10$โ€“$20$, $20$โ€“$30$, $30$โ€“$40$, $40$โ€“$50$, $50$โ€“$60$ are $4, 10, x, 12, 6, 2$, and the total frequency is $50$. Find the mode of the distribution. Give the answer to the nearest integer.

Find $x$ $4+10+x+12+6+2=50$ gives $x=16$, the largest frequency: the modal class is $20$โ€“$30$.
Formula $f_1=16$, $f_0=10$, $f_2=12$: mode $=20+\tfrac{16-10}{32-10-12}\cdot10=20+6$.
Answer $26$.

E5. JEE Main ยท MCQ The mean deviation about the mean of the twenty numbers $3, 6, 9, \dots, 60$ is (A) $30$ (B) $10$ (C) $17.5$ (D) $15$

Scale The numbers are $3k$ for $k=1,\dots,20$, so (Theorem 13.3(3)) the M.D. is $3$ times that of $1,\dots,20$.
M.D. of $1,\dots,20$ Mean $10.5$; distances $9.5, 8.5, \dots, 0.5$ twice: $2(0.5+1.5+\dots+9.5)=2\cdot50=100$, so M.D. $=\tfrac{100}{20}=5$.
Answer (D) $3\times5=15$.
โฑ Shortcut For $1,2,\dots,2m$ the M.D. about the mean is $\tfrac m2$; here $m=10$.

E6. JEE Main ยท Numerical The mean and variance of $10$ observations were found to be $10$ and $5$. Later it was found that two observations recorded as $8$ and $12$ were actually $2$ and $18$. Find the correct variance. Give the answer to the nearest integer.

Totals $\sum x_i=100$ (unchanged, since $8+12=2+18$); $\sum x_i^2=10(5+100)=1050$.
Correct $\sum x_i^2=1050-64-144+4+324=1170$; mean still $10$.
Answer $\tfrac{1170}{10}-100=17$.
โฑ Shortcut The mean did not change, so the variance changes by $\tfrac{(2-10)^2+(18-10)^2-(8-10)^2-(12-10)^2}{10}=\tfrac{64+64-4-4}{10}=12$: $5+12=17$.
๐Ÿ”ฌ Researchโ€“Teaching NexusResearch-tutored ยท optional, about 45 minutes

Research question. Which is the better summary of a city's daily air quality โ€” the mean or the median โ€” and how much does the answer depend on a few extreme days?

Why it matters. Pollution agencies in Delhi, Beijing, London and Mexico City publish air-quality index (AQI) or PM2.5 figures every day. Health advice depends on typical exposure, but a handful of crop-burning or festival days can be several times higher than an ordinary day. A summary that is dragged by those days can mislead in either direction: it may overstate an ordinary day's risk, or hide how variable the air is.

What to do.

  1. Collect daily PM2.5 values for one month for a city of your choice from a public air-quality data portal (or use any 30 consecutive values you can find).
  2. Compute the mean, the median, the standard deviation and the mean deviation about the median. Mark them on a dot plot, as in Interactive 1.
  3. Group the data into classes of width $25$ and compute the grouped mean, median and mode (Theorem 13.4). How close are they to the raw-data values?
  4. Remove the three highest days and recompute everything. Which measures changed most? Compute the coefficient of variation before and after.

Tools: A spreadsheet (AVERAGE, MEDIAN and a variance function that divides by $n$), or a few lines of Python.

Hand in: Your table of statistics before and after removing the extremes, the dot plot, and a short paragraph recommending one "headline number" and one "spread number" for a public health notice, with reasons.

Going further. Many agencies report the 90th or 98th percentile as well. Why might a regulator care more about the high end of the distribution than about its centre?

Instructor note: spreadsheet variance functions differ (some divide by $n-1$); make students check which one matches Definition 13.4. Typical monthly PM2.5 data are strongly right-skewed, so students should find mean $\gt$ median and a large drop in $\sigma$ when the extremes are removed โ€” a concrete version of the Predict-first question before Interactive 1.

๐Ÿงช Self-check quiz

0/5 correct

Q1. The number $5$ is added to each of $20$ observations whose variance is $16$. The new variance is

Q2. For any data, the mean deviation is smallest when it is taken about the

Q3. Five observations have $\sum x_i=30$ and $\sum x_i^2=220$. Their variance is

Q4. A grouped distribution has modal class $40$โ€“$50$ with frequency $20$; the classes before and after it have frequencies $12$ and $16$. The mode is

Q5. Data set P has mean $40$ and s.d. $8$; data set Q has mean $120$ and s.d. $18$. Which statement is correct?