- Suppose two classes both average 60% on a test, so on paper they look identical.
- In one class almost everyone scored near 60, but in the other, half scored 30 and half scored 90.
- To describe a data set honestly you need two kinds of number.
- A measure of central tendency says where the middle of the data sits.
- A measure of dispersion says how spread out the values are around that middle.
- Mean
- The mean is the arithmetic average: add every value and divide by how many there are.
- Median
- The median is the middle value once the data is placed in ascending order.
- With an even number of values, take the mean of the two middle values.
- Mode
- The mode is the value that occurs most often.
- A data set can have one mode, several modes, or no mode at all.
- For the small set $4, 7, 9, 10, 12$ the mean is $\dfrac{42}{5}=8.4$, the median is the middle value $9$, and there is no mode.
- An outlier is a value far from the rest of the data, and skew is a long tail stretching to one side.
- The mean adds the outlier's full size into the total, so a single extreme value drags it toward the tail.
- The median only cares about position in the ordered list, so one extreme value barely moves it.
The mean is pulled toward outliers; the median resists them.
| Measure | What it is | Best used when | Effect of outliers |
|---|
| Mean | Sum divided by count | Symmetric, no outliers | Pulled toward them |
| Median | Middle ordered value | Skewed data or outliers | Resistant |
| Mode | Most frequent value | Categorical or most common | Barely affected |
- Take $2, 4, 6, 8$ with mean $5$ and median $5$.
- Replace the $8$ with $80$: the mean jumps to $23$, but the median only shifts from $5$ to $\dfrac{4+6}{2}=5$.
- A common error is quoting the mean for badly skewed data such as salaries.
- One CEO's pay can lift the mean above almost everyone, so the median is the honest center.
- Always check for outliers before deciding which average to report.
- Data often arrives already sorted into class intervals, for example commute times grouped as $0$ to $10$ minutes, $10$ to $20$ minutes, and so on.
- To estimate the mean, treat every value in a class as sitting at the class mid-interval value, the midpoint of the interval.
The midpoint of the $0$ to $10$ class is $\dfrac{0+10}{2}=5$.
- The IB AA SL formula booklet (SL 4.3) gives the mean of a data set as: $$\bar{x}=\dfrac{\sum_{i=1}^{k} f_i x_i}{n}, \quad n=\sum_{i=1}^{k} f_i$$
- Here $x_i$ is the mid-interval value of class $i$, $f_i$ is its frequency, and $k$ is the number of classes.
- This is the one formula in the booklet for this whole subtopic, so quote it and cite SL 4.3 in the exam.
| Class (min) | Midpoint x | Frequency f | f x |
|---|
| 0 to 10 | 5 | 4 | 20 |
| 10 to 20 | 15 | 9 | 135 |
| 20 to 30 | 25 | 12 | 300 |
| 30 to 40 | 35 | 8 | 280 |
| 40 to 50 | 45 | 7 | 315 |
| Total | | 40 | 1050 |
- Take the frequency table of commute times above.
- So the estimated mean is: $$\bar{x}=\dfrac{1050}{40}=26.25 \text{ minutes}$$
- It is an estimate because we assumed every value sat exactly at its midpoint, which is only approximately true.
- Your GDC computes this for you: enter the midpoints as one list and the frequencies as a second list.
- Run 1-Var Stats with that frequency list and read off x̄, the mean.
- Doing it by hand once shows what the calculator is actually adding up.
- For grouped data you cannot give a single mode, so you give the modal class instead.
- The modal class is the class interval with the highest frequency.
- In the commute table the $20$ to $30$ class has frequency $12$, the largest, so it is the modal class.
- The modal class is only meaningful when all classes have equal width.
- If the widths differ, a wide class can collect more values just by being wider, which makes the raw frequency misleading.
The table shows the mass, in grams, of 25 apples: 100 to 120 (f = 6), 120 to 140 (f = 10), 140 to 160 (f = 7), 160 to 180 (f = 2).
Estimate the mean mass and state the modal class.
Solution
- Midpoints are 110, 130, 150, 170. $$\sum f_i x_i = 110(6)+130(10)+150(7)+170(2)=660+1300+1050+340=3350$$ $$n=\sum f_i = 25$$ $$\bar{x}=\dfrac{3350}{25}=134 \text{ grams}$$
- Modal class is 120 to 140 grams, since it has the highest frequency (10).
The two data sets $4,5,6,7,8$ and $1,3,6,9,11$ both have mean $6$, yet the second is clearly more spread out.
- The range is the largest value minus the smallest value.
- It is quick but fragile, since it depends only on the two most extreme values.
- Quartiles cut an ordered data set into four equal parts.
- $Q_1$, the lower quartile, sits a quarter of the way through the ordered data.
- $Q_3$, the upper quartile, sits three quarters of the way through.
- The interquartile range is $\text{IQR}=Q_3-Q_1$, the spread of the middle $50\%$ of the data.
- Take the ordered data set $4, 6, 7, 9, 10, 13, 15, 18, 20$, which has $9$ values.
- Step 1: the median $Q_2$ is the middle (fifth) value, so $Q_2=10$.
- Step 2: the lower half is $4, 6, 7, 9$, and its median gives $Q_1=\dfrac{6+7}{2}=6.5$.
- Step 3: the upper half is $13, 15, 18, 20$, and its median gives $Q_3=\dfrac{15+18}{2}=16.5$.
- So $\text{IQR}=Q_3-Q_1=16.5-6.5=10$.
- There is more than one accepted rule for placing quartiles.
- Your GDC may split the data differently from your hand method, so the two values can disagree slightly.
- In an exam either the hand value or the GDC value is accepted, but state which you used.
- The standard deviation $\sigma$ measures how far, on average, the values lie from the mean.
- A small $\sigma$ means the data huddles close to the mean.
- To see the idea, take $4,5,6,7,8$ with mean $6$: the distances from the mean are $2,1,0,1,2$.
- Squaring, averaging, then square-rooting gives $\sqrt{\dfrac{4+1+0+1+4}{5}}=\sqrt{2}\approx 1.41$.
- These hand steps are only to build intuition, not an exam method.
- The variance is simply $\sigma^2$, the square of the standard deviation.
- If the GDC gives $\sigma=3.69$, the variance is $\sigma^2\approx 13.6$.
| Measure | What it captures | Uses all data? | Effect of outliers |
|---|
| Range | Max minus min | No, two values only | Very sensitive |
| IQR | Spread of middle 50% | No, uses quartiles | Resistant |
| Std deviation | Typical distance from mean | Yes | Sensitive |
- Do not confuse variance with standard deviation: variance is the square of the standard deviation.
- If a question asks for standard deviation but you report $\sigma^2$, the value is wrong and in the wrong units.
- Always take the square root of the variance to get back to standard deviation.
Sometimes every value in a data set is changed by the same rule, for example converting marks or shifting a baseline.
- If you add a constant $c$ to every value, the new mean is the old mean plus $c$.
- Every value moves the same distance in the same direction, so the whole data set slides along without stretching.
- Because the gaps between values are unchanged, the standard deviation and variance stay exactly the same.
- Here is why: each distance from the mean is $(x_i+c)-(\bar{x}+c)=x_i-\bar{x}$, identical to before.
- Subtract $3$ from every value of $2,4,6,8,10$ (mean $6$, $\sigma\approx 2.83$).
- The new data is $-1,1,3,5,7$ with mean $6-3=3$, but $\sigma$ is still $\approx 2.83$.
- If you multiply every value by a constant $k$, the new mean is $k$ times the old mean.
- The standard deviation is multiplied by $|k|$, and the variance by $k^2$.
- Here is why: each distance becomes $k x_i - k\bar{x}=k(x_i-\bar{x})$, so every deviation is stretched by $k$.
- Standard deviation, built from those deviations, therefore scales by $|k|$.
- Double every value of $2,4,6,8,10$ to get $4,8,12,16,20$.
- The mean doubles from $6$ to $12$, the standard deviation doubles from $2.83$ to $5.66$, and the variance goes from $8$ to $32$, a factor of $2^2=4$.
- A general linear transform $y=kx+c$ combines both moves.
- The new mean is $k\bar{x}+c$, and the new standard deviation is $|k|\sigma$.
- The added constant $c$ shifts the center but never changes the spread.
A data set has mean $50$ and standard deviation $8$.
Every value is transformed using $y=3x-10$.
Find the new mean, new standard deviation, and new variance.
Solution
- New mean $=3(50)-10=140$.
- The $-10$ shifts the mean but does not affect spread.
- New standard deviation $=|3|\times 8=24$.
- New variance $=24^2=576$ (equivalently $3^2\times 8^2$).
- Why is the median a better summary than the mean for strongly skewed data?
- State the SL 4.3 booklet formula for the mean of grouped data and say what each symbol means.
- How do you find the population standard deviation of a data set on your GDC?
- If every value is multiplied by 4, what happens to the mean, the standard deviation, and the variance?
- Why can a hand-calculated quartile differ from your calculator's value?