Statistics
Summarising a mass of data in a few honest numbers — locating its centre with mean, median and mode, then measuring how widely it spreads with deviation, variance and standard deviation
- Data and frequency distributions, and the vocabulary of raw, ungrouped and grouped data.
- The three measures of central tendency — mean, median and mode — and when each is the right summary.
- Measures of dispersion: range and mean deviation.
- Variance and standard deviation, the standard measures of spread, with their short-cut formulas.
- The coefficient of variation for comparing variability across data sets.
- How a change of origin and scale affects these measures, and how to combine two data sets.
Data & Frequency Distributions
Statistics is the art of compressing a large collection of observations into a few meaningful numbers. The observations themselves are the data. When the values are simply listed they are raw data; when each distinct value is paired with the count of how often it occurs — its frequency \(f_i\) — we have a frequency distribution. For large ranges the values are gathered into class intervals of width \(h\), giving grouped data, and each class is represented by its mid-value \(x_i\).
Here \(N\) is the total frequency — the number of observations. For raw data every value has frequency one, so \(N=n\). Two families of summary numbers follow: measures of central tendency (where the data centre) and measures of dispersion (how far they scatter).
Arithmetic Mean
The arithmetic mean — the everyday "average" — is the balance point of the data: the total shared equally among all observations. For a frequency distribution each value is weighted by how often it occurs. When the numbers are large, an assumed mean \(A\) and a common step \(h\) turn heavy arithmetic into small ones.
The last is the step-deviation form, with \(u_i=\dfrac{x_i-A}{h}\). It gives exactly the same answer as the direct formula but with far smaller numbers. The mean uses every observation, which makes it sensitive to a single extreme value — its chief weakness.
Median
The median is the middle value once the data are arranged in order: half the observations lie below it and half above. Because it depends only on position and not on size, a few wild values cannot drag it about — it is a robust centre, ideal for skewed data such as incomes.
For ungrouped data of size \(n\), sort the values: the median is the \(\left(\tfrac{n+1}{2}\right)\)th term when \(n\) is odd, and the average of the two middle terms when \(n\) is even. For grouped data, \(\ell\) is the lower boundary of the median class, \(F\) the cumulative frequency before it, \(f\) its own frequency, and \(h\) the class width.
Mode
The mode is the value that occurs most often — the peak of the distribution. It is the natural "average" for categorical data (the most common shoe size, the best-selling colour) and the only one of the three that need not be unique.
For grouped data, \(f_1\) is the frequency of the modal class, with \(f_0\) and \(f_2\) the frequencies just before and after it. For a moderately skewed distribution the three measures obey the empirical relation on the right, which lets you recover any one from the other two.
Dispersion: Range & Mean Deviation
A centre alone hides too much: two classes can share a mean of \(50\) yet one be tightly bunched and the other wildly scattered. Dispersion measures that scatter. The crudest measure is the range; a better one is the mean deviation, the average distance of the data from a centre.
The centre \(c\) is usually the mean or the median; the mean deviation is in fact smallest when taken about the median. Both measures are easy to read, but the absolute value makes the mean deviation awkward to manipulate algebraically — which is exactly why the next measure squares instead.
Variance & Standard Deviation
Squaring the deviations rather than taking their absolute value gives a measure that is smooth, additive and central to all of statistics: the variance \(\sigma^2\), the mean of the squared deviations from the mean. Its square root, the standard deviation \(\sigma\), returns to the original units and is the headline measure of spread.
The second form — "mean of the squares minus the square of the mean" — is the practical one for computation. In step-deviation variables it becomes \(\sigma^2=h^2\!\left[\dfrac{\sum f_i u_i^2}{N}-\left(\dfrac{\sum f_i u_i}{N}\right)^2\right]\), keeping the arithmetic light.
Coefficient of Variation
Standard deviation carries units, so you cannot fairly compare the spread of heights in centimetres with that of weights in kilograms — nor two data sets with very different means. The coefficient of variation solves this by expressing the standard deviation as a percentage of the mean, giving a pure number.
It is dimensionless, so it compares variability across data sets of any units or scale. The series with the smaller C.V. is the more consistent (less variable); the one with the larger C.V. is more erratic. This is the usual basis for judging which of two batches, players or processes is steadier.
Change of Origin & Scale; Combining Data
Suppose every observation is transformed by \(y_i=a+bx_i\) — shifting the origin by \(a\) and rescaling by \(b\). The mean shifts and scales the same way, but the spread ignores the shift entirely: adding a constant to every value moves the whole data set without stretching it. This is precisely why the step-deviation shortcuts work.
Variance is independent of the change of origin (\(a\)) but scales with the square of \(b\): \(\sigma_y^2=b^2\sigma_x^2\).
If two groups of sizes \(n_1,n_2\) have means \(\bar{x}_1,\bar{x}_2\) and variances \(\sigma_1^2,\sigma_2^2\), the combined mean is the weighted average \(\bar{x}=\dfrac{n_1\bar{x}_1+n_2\bar{x}_2}{n_1+n_2}\). The combined variance is not a simple average — it also picks up how far each group mean sits from the overall mean: with \(d_1=\bar{x}_1-\bar{x}\) and \(d_2=\bar{x}_2-\bar{x}\), \(\sigma^2=\dfrac{n_1(\sigma_1^2+d_1^2)+n_2(\sigma_2^2+d_2^2)}{n_1+n_2}\).
Putting It to Work
Problem. Find the mean, median and mode of \(4,\ 6,\ 6,\ 7,\ 8,\ 9,\ 16\).
Solution. The sum is \(56\) over \(7\) values; the data are already sorted, so the \(4\)th term is the median and \(6\) repeats most:
Problem. For \(3,\ 6,\ 7,\ 8,\ 11\), find the range and the mean deviation about the mean.
Solution. The mean is \(\bar{x}=\tfrac{35}{5}=7\); the deviations are \(4,1,0,1,4\):
Problem. Find the variance and standard deviation of \(2,\ 4,\ 6,\ 8,\ 10\).
Solution. Here \(\bar{x}=6\) and \(\sum x_i^2=4+16+36+64+100=220\):
Problem. Batch A has mean \(50\) with \(\sigma=5\); batch B has mean \(40\) with \(\sigma=4.5\). Which is more consistent?
Solution. Compare relative spread, not raw \(\sigma\):
Batch A has the smaller C.V., so it is the more consistent.
Problem. A data set has mean \(20\) and standard deviation \(3\). Each value is replaced by \(y=2x+5\). Find the new mean and standard deviation.
Solution. Apply \(\bar{y}=a+b\bar{x}\) and \(\sigma_y=|b|\sigma_x\) with \(a=5,\ b=2\):
Problem. A class of \(30\) boys averages \(62\) marks and \(20\) girls average \(70\). Find the mean of the whole class.
Solution. Use the weighted average over all \(50\) students:
Chapter Summary
\(\bar{x}=\tfrac{\sum f_i x_i}{N}\); uses every value, sensitive to extremes.
Median is the middle value; mode is the most frequent. \(\text{Mode}\approx 3\,\text{Med}-2\,\text{Mean}\).
Range \(=x_{\max}-x_{\min}\); \(\text{MD}=\tfrac{\sum f_i|x_i-c|}{N}\).
\(\sigma^2=\tfrac{\sum f_i x_i^2}{N}-\bar{x}^2\); \(\sigma=\sqrt{\sigma^2}\).
\(\tfrac{\sigma}{\bar{x}}\times100\); smaller means more consistent.
\(y=a+bx\Rightarrow \sigma_y=|b|\sigma_x\); variance ignores the origin.
Problems
Decide first what is being asked — a centre or a spread — then pick the matching tool. Difficulty rises down the list.
- Find the mean of \(5,\ 8,\ 12,\ 15,\ 20\).
- Find the median of \(7,\ 3,\ 9,\ 5,\ 11,\ 1\).
- Find the mode of \(2,\ 3,\ 3,\ 4,\ 4,\ 4,\ 5\).
- Find the range of \(14,\ 9,\ 23,\ 6,\ 18\).
- Find the mean deviation about the mean of \(2,\ 4,\ 6,\ 8,\ 10\).
- Find the variance and standard deviation of \(3,\ 5,\ 7,\ 9,\ 11\).
- A series has mean \(40\) and standard deviation \(8\). Find its coefficient of variation.
- The mean and median of a moderately skewed distribution are \(35.4\) and \(36\). Estimate the mode.
- Each value of a data set with mean \(15\) and \(\sigma=4\) is replaced by \(y=3x-2\). Find the new mean and standard deviation.
- Find the standard deviation of the first \(n\) natural numbers, given \(\sigma^2=\tfrac{n^2-1}{12}\), for \(n=10\).
- Two samples of sizes \(40\) and \(60\) have means \(50\) and \(55\). Find the combined mean.
- For the two samples in Problem 11, the variances are \(16\) and \(25\). Find the combined variance.
- The mean of \(100\) observations is \(50\) and the variance is \(16\). If a wrong entry \(60\) should have been \(110\), find the corrected mean.