Lesson 9: Statistics & Probability

Cambridge O Level Mathematics 4024 / IGCSE Mathematics 0580 — Syllabus Reference: Statistics & Probability

Lesson 9 of 10
90% complete

1. Types of Data and Data Collection

Qualitative (Categorical) Data

Data described in words — categories with no numerical value.

Examples: colours, gender, favourite subject, brand names.

Displayed using: bar charts, pie charts, pictograms.

Quantitative (Numerical) Data

Data with numerical values. Divided into two types:

Discrete: Only specific values (usually whole numbers). e.g. number of children, shoe sizes, goals scored.

Continuous: Any value in a range — measured, not counted. e.g. height, mass, time, temperature.

Frequency Tables and Grouped Data

Class Interval: When data is grouped, each group is a class interval. The class width is the difference between the upper and lower class boundaries. The midpoint of a class is used to represent all values in that class when calculating the mean.
Class Boundaries vs Class Limits:
For the class "20 ≤ h < 30": lower boundary = 20, upper boundary = 30, midpoint = 25.
For the class "20–29" (discrete data): lower boundary = 19.5, upper boundary = 29.5, midpoint = 24.5.

2. Averages — Mean, Median, and Mode

AverageDefinitionWhen to UseAffected by Extremes?
Mean Sum of all values ÷ number of values When data is fairly symmetrical, no extreme outliers Yes — outliers pull the mean
Median Middle value when data is arranged in order. For n values: position = (n+1)/2 When data has outliers or is skewed No — resistant to extremes
Mode Value that appears most frequently. A dataset can have no mode, one mode, or multiple modes. Qualitative data; most popular category No
Range Largest value − Smallest value. Measures spread. Simple measure of spread Yes — very sensitive to extremes

Mean from a Frequency Table

Mean from Frequency Table

Mean = Σ(fx) / Σf

where f = frequency, x = value (or midpoint for grouped data)

📐 Worked Example 1 — Mean from Grouped Frequency Table

Find the estimated mean from this grouped frequency table:

Height h (cm)Frequency fMidpoint xfx
140 ≤ h < 1504145580
150 ≤ h < 160111551705
160 ≤ h < 17091651485
170 ≤ h < 18061751050
Total304820
1
Estimated mean = Σ(fx) ÷ Σf = 4820 ÷ 30 = 160.7 cm
2
This is an estimate because we assume all values in each class are at the midpoint — which is not exactly true.

Median and Quartiles for Ungrouped Data

📐 Worked Example 2 — Median, Quartiles, IQR

Data: 3, 7, 8, 12, 15, 18, 21, 24, 26. Find the median, lower quartile (Q1), upper quartile (Q3), and interquartile range (IQR).

1
n = 9 values (already ordered). Median position = (9+1)/2 = 5th value.
Median (Q2) = 15
2
Lower half: 3, 7, 8, 12 (values below median). Q1 = median of lower half = (7+8)/2 = 7.5
3
Upper half: 18, 21, 24, 26 (values above median). Q3 = (21+24)/2 = 22.5
4
IQR = Q3 − Q1 = 22.5 − 7.5 = 15
Range = 26 − 3 = 23

3. Statistical Diagrams

Bar Charts and Pie Charts

Bar Chart

Bars of equal width. Height represents frequency. Bars may be separated (discrete) or for comparison (grouped bars). Y-axis must start at zero and be evenly scaled.

Pie Chart

Circle divided into sectors. Angle for each sector = (frequency ÷ total) × 360°. Total of all angles = 360°. Used for showing proportions/percentages of a whole.

📐 Worked Example 3 — Pie Chart Angles

80 students chose their favourite subject: Maths 24, English 18, Science 20, Other 18. Calculate the angle for each sector.

1
Angle = (frequency/total) × 360°
Maths: (24/80) × 360 = 108°
English: (18/80) × 360 = 81°
Science: (20/80) × 360 = 90°
Other: (18/80) × 360 = 81°
Check: 108 + 81 + 90 + 81 = 360° ✓

Histograms

Histogram: Used for continuous grouped data. The area of each bar (not height) represents the frequency. When class widths are equal, height = frequency. When class widths are unequal, use frequency density.

Frequency Density

Frequency Density = Frequency ÷ Class Width
Frequency = Frequency Density × Class Width

📐 Worked Example 4 — Histogram with Unequal Class Widths

Calculate frequency densities for the following:

Time t (min)FrequencyClass WidthFreq. Density
0 ≤ t < 1012101.2
10 ≤ t < 2025102.5
20 ≤ t < 3030103.0
30 ≤ t < 5020201.0
50 ≤ t < 809300.3
1
For the bar 30 ≤ t < 50: frequency = FD × CW = 1.0 × 20 = 20 ✓
For the bar 50 ≤ t < 80: frequency = 0.3 × 30 = 9 ✓
⚠ Common Histogram Mistake: In histograms, bars have NO gaps (unlike bar charts). The y-axis is labelled Frequency Density, NOT frequency. When class widths differ, never plot raw frequency on the y-axis — always use frequency density.

Scatter Diagrams and Correlation

Types of Correlation

  • Positive correlation — as one variable increases, the other increases. Points slope upward left to right.
  • Negative correlation — as one increases, the other decreases. Points slope downward.
  • No correlation — no relationship between variables. Points scattered randomly.
  • Strong/Weak — how closely points follow the trend line.

Line of Best Fit

A straight line drawn through the scatter diagram that best represents the trend — approximately equal numbers of points on each side.

Must pass through the mean point (x̄, ȳ).

Used to interpolate (estimate within data range) or extrapolate (estimate outside range — less reliable).

Correlation ≠ Causation: Just because two variables are correlated does not mean one causes the other. For example, ice cream sales and drowning rates are both correlated with hot weather — but ice cream does not cause drowning.

4. Cumulative Frequency Diagrams

Cumulative Frequency: A running total of frequencies up to and including each class. Plot cumulative frequency against the upper class boundary of each interval. Join points with a smooth S-shaped curve (ogive).

📐 Worked Example 5 — Cumulative Frequency Table and Reading Values

60 students took a test scored out of 80. Build the cumulative frequency table and find the median, Q1, Q3, and IQR.

Score sFrequencyCumulative FrequencyPlot Point
0 ≤ s < 2055(20, 5)
20 ≤ s < 401217(40, 17)
40 ≤ s < 501835(50, 35)
50 ≤ s < 601550(60, 50)
60 ≤ s < 801060(80, 60)
1
Median = value at cf = n/2 = 60/2 = 30th value.
Read across from cf = 30 on the curve → Median ≈ 47
2
Lower Quartile (Q1) = value at cf = n/4 = 15th value.
Read from cf = 15 → Q1 ≈ 38
3
Upper Quartile (Q3) = value at cf = 3n/4 = 45th value.
Read from cf = 45 → Q3 ≈ 57
4
IQR = Q3 − Q1 = 57 − 38 = 19
Percentile: The 80th percentile = value at cf = 0.8 × 60 = 48th value → read from curve.
Cumulative Frequency Score 0 10 20 30 40 60 20 40 50 60 80 30 (median) 15 (Q1) 45 (Q3)

Box-and-Whisker Plot

Box-and-Whisker Plot: A diagram showing the five-number summary of a dataset:
Minimum | Q1 | Median (Q2) | Q3 | Maximum
The box spans from Q1 to Q3 (the IQR). Whiskers extend to the minimum and maximum values.
Min Q1 Median Q3 Max IQR

5. Probability

Probability: A measure of how likely an event is to occur. Probability is always between 0 (impossible) and 1 (certain).
P(event) = Number of favourable outcomes / Total number of equally likely outcomes

Basic Probability Rules

0 ≤ P(A) ≤ 1 for any event A
P(A') = 1 − P(A)    (complementary events)
P(A or B) = P(A) + P(B) − P(A and B)    (addition rule)
P(A and B) = P(A) × P(B)    (multiplication rule — independent events only)

Mutually Exclusive and Independent Events

Mutually Exclusive Events

Events that cannot both occur at the same time. If A and B are mutually exclusive:

P(A and B) = 0

P(A or B) = P(A) + P(B)

Example: Rolling a 3 and rolling a 5 on one die.

Independent Events

Events where the outcome of one does not affect the probability of the other:

P(A and B) = P(A) × P(B)

Example: Tossing a coin and rolling a die — each outcome is unaffected by the other.

📐 Worked Example 6 — Basic Probability

A bag contains 5 red, 3 blue, and 2 green balls. A ball is drawn at random. Find: (a) P(red) (b) P(not blue) (c) P(red or green).

1
Total balls = 10.
(a) P(red) = 5/10 = 1/2
2
(b) P(not blue) = 1 − P(blue) = 1 − 3/10 = 7/10
3
(c) Red and green are mutually exclusive (can't pick both):
P(red or green) = 5/10 + 2/10 = 7/10

6. Combined Events — Tree Diagrams and Tables

Possibility Space (Sample Space) Diagrams

📐 Worked Example 7 — Two Dice Sample Space

Two fair dice are rolled. Find: (a) P(sum = 7) (b) P(sum ≥ 10) (c) P(both show same number).

1
Total outcomes = 6 × 6 = 36 equally likely outcomes.
2
(a) Pairs summing to 7: (1,6),(2,5),(3,4),(4,3),(5,2),(6,1) = 6 pairs.
P(sum=7) = 6/36 = 1/6
3
(b) Sum ≥ 10: (4,6),(5,5),(6,4),(5,6),(6,5),(6,6) = 6 pairs.
P(sum≥10) = 6/36 = 1/6
4
(c) Both same: (1,1),(2,2),(3,3),(4,4),(5,5),(6,6) = 6 pairs.
P(both same) = 6/36 = 1/6

Tree Diagrams

Tree Diagram Rules:
• Each branch shows a possible outcome and its probability.
• Probabilities on branches from the same point must sum to 1.
Multiply along branches to find the probability of a combined outcome.
Add across branches to find the probability of alternative outcomes.

📐 Worked Example 8 — Tree Diagram (Without Replacement)

A bag has 4 red and 3 blue balls. Two balls are drawn without replacement. Find: (a) P(both red) (b) P(one of each colour) (c) P(at least one blue).

1
Draw the tree:
First draw: P(R) = 4/7, P(B) = 3/7
Second draw (if first was R): P(R) = 3/6 = 1/2, P(B) = 3/6 = 1/2
Second draw (if first was B): P(R) = 4/6 = 2/3, P(B) = 2/6 = 1/3
2
(a) P(both red) = P(R then R) = (4/7) × (3/6) = 12/42 = 2/7
3
(b) P(one of each) = P(R then B) + P(B then R)
= (4/7×3/6) + (3/7×4/6) = 12/42 + 12/42 = 24/42 = 4/7
4
(c) P(at least one blue) = 1 − P(both red) = 1 − 2/7 = 5/7
4/7 R 3/7 B 3/6 R 3/6 B 4/6 R 2/6 B RR: 4/7×3/6=2/7 RB: 4/7×3/6=2/7 BR: 3/7×4/6=2/7 BB: 3/7×2/6=1/7 Check: 2/7+2/7+2/7+1/7 = 7/7 = 1 ✓

Conditional Probability

Conditional Probability: The probability of event A given that event B has already occurred.
P(A|B) = P(A and B) / P(B)
In tree diagrams: conditional probabilities appear on the second set of branches — the probabilities change based on what happened first (especially in without-replacement problems).

📐 Worked Example 9 — Conditional Probability

From the tree diagram above, find P(first ball was red | second ball is blue).

1
We want P(R first | B second). Use the conditional probability formula:
P(R first | B second) = P(R first AND B second) / P(B second)
2
P(R first AND B second) = 4/7 × 3/6 = 2/7
P(B second) = P(RB) + P(BB) = 2/7 + 1/7 = 3/7
3
P(R first | B second) = (2/7)/(3/7) = 2/3

7. Comparing Statistical Distributions

Cambridge frequently asks you to compare two distributions using averages and measures of spread. You must comment on BOTH the average AND the spread to earn full marks.

How to Compare Two Distributions — Always State TWO Things:
1. Compare averages (mean or median) — state which group scored higher/lower on average and by how much.
2. Compare spread (range or IQR) — state which group is more consistent (smaller IQR = more consistent results).

Example answer: "Group A has a higher median (58) than Group B (52), suggesting Group A performed better overall. However, Group A has a larger IQR (22 vs 14), suggesting Group B's results were more consistent."
MeasureWhat it tells youComparison phrase
Mean / MedianTypical/average value — the "centre" of the data"On average, Group A scored higher than Group B"
RangeOverall spread — difference between extremes"Group B has a smaller range, so results were less spread out"
IQRSpread of the middle 50% of data — not affected by outliers"Group A has a larger IQR, so the middle 50% were less consistent"

📝 Exam Practice Questions

Q1 [3 marks] — The ages of 7 people are: 14, 18, 22, 16, 14, 20, 31. Find the mean, median, mode, and range.

Ordered: 14, 14, 16, 18, 20, 22, 31
Mean: (14+14+16+18+20+22+31)/7 = 135/7 = 19.3
Median: 4th value = 18
Mode: 14 (appears twice)
Range: 31−14 = 17

Q2 [4 marks] — The table shows the heights of 40 plants. Calculate an estimate of the mean height. State why it is an estimate.

Height h (cm)Frequency
0 ≤ h < 56
5 ≤ h < 1014
10 ≤ h < 2012
20 ≤ h < 308
Midpoints: 2.5, 7.5, 15, 25
fx: 6×2.5=15, 14×7.5=105, 12×15=180, 8×25=200
Σfx = 15+105+180+200 = 500
Estimated mean = 500÷40 = 12.5 cm
It is an estimate because we assume all values within each class are at the midpoint, which is not necessarily true.

Q3 [3 marks] — A frequency density histogram has bars at: 0–4 (FD=3), 4–8 (FD=5), 8–16 (FD=2), 16–20 (FD=1). Find the total frequency and the modal class.

Frequencies = FD × class width:
0–4: 3×4=12   4–8: 5×4=20   8–16: 2×8=16   16–20: 1×4=4
Total frequency = 12+20+16+4 = 52
Modal class = class with highest frequency density = 4–8 (FD=5)
Exam Tip: The modal class of a histogram is the class with the highest FREQUENCY DENSITY (tallest bar) — NOT necessarily the highest frequency. This is a very common error.

Q4 [4 marks] — A spinner has sections numbered 1–5, each equally likely. It is spun twice. Find: (a) P(both show 4) (b) P(sum = 6) (c) P(at least one 5) (d) P(second shows 3 | first showed an odd number).

Total outcomes = 5×5 = 25

(a) P(4,4) = (1/5)×(1/5) = 1/25

(b) Pairs summing to 6: (1,5),(2,4),(3,3),(4,2),(5,1) = 5 pairs.
P(sum=6) = 5/25 = 1/5

(c) P(at least one 5) = 1 − P(no 5) = 1 − (4/5)×(4/5) = 1 − 16/25 = 9/25

(d) P(2nd=3 | 1st=odd). Odd numbers: 1,3,5 → P(1st=odd)=3/5.
P(1st=odd AND 2nd=3) = (3/5)×(1/5) = 3/25.
P(2nd=3|1st=odd) = (3/25)÷(3/5) = 1/5

Q5 [5 marks] — A box has 6 white and 4 black counters. Two counters are taken without replacement. Draw a tree diagram. Find: (a) P(both white) (b) P(both same colour) (c) P(at least one black).

Tree branches:
1st W (6/10): 2nd W=5/9, 2nd B=4/9
1st B (4/10): 2nd W=6/9, 2nd B=3/9

(a) P(WW) = (6/10)×(5/9) = 30/90 = 1/3

(b) P(same) = P(WW)+P(BB) = 30/90 + (4/10×3/9) = 30/90 + 12/90 = 42/90 = 7/15

(c) P(at least one black) = 1−P(both white) = 1−1/3 = 2/3
Exam Tip: "At least one" problems are almost always quickest using the complementary method: 1 − P(none of that colour). Draw the tree first — it prevents errors with conditional probabilities in without-replacement problems.

Q6 [3 marks] — Two groups of students sit the same test. Group A: median = 64, IQR = 18. Group B: median = 58, IQR = 9. Write two statistical comparisons between the groups.

Comparison 1 (average): Group A has a higher median (64) than Group B (58), suggesting that Group A performed better overall on the test — a typical Group A student scored 6 marks more than a typical Group B student.

Comparison 2 (spread): Group A has a larger IQR (18) than Group B (9), meaning the middle 50% of Group A's results were more spread out. Group B's results were more consistent — students in Group B performed more similarly to each other.
Exam Tip: Always compare in context (mention the subject). Say which group is higher AND by how much. For spread, say which is more/less consistent AND what that means. Two separate, clearly stated comparison sentences earn full marks.
← Lesson 8: Matrices, Vectors & Transformations Lesson 10: Revision & Exam Technique →