MathMastery.Beta
Learning Resources

Ogives & Quartiles

Interactive curriculum lessons, worked examples, and geometric problem-solving techniques designed to help Kenyan students master CBC, KPSEA, KCSE, and IGCSE mathematics.

Form 4 Pathway: N/A

First Principles

Objective: Master the construction of cumulative frequency curves (ogives) and determine quartiles, percentiles, and the interquartile range (IQR).

The Running Total Concept: Imagine a farmer in Kericho delivering tea leaves every morning over 30 days. If we record how many days yielded at most 20 kg, at most 40 kg, up to 100 kg, we are accumulating totals. A cumulative frequency curve (or ogive) visualises this running total to show the proportion of data falling below any chosen benchmark.

1. Cumulative Frequency & Upper Class Boundaries

An ogive is always plotted by placing the Upper Class Boundary (UCB) on the horizontal (\(x\)) axis and the Cumulative Frequency (\(CF\)) on the vertical (\(y\)) axis. Because cumulative frequency never decreases, an ogive is an 'S-shaped' monotonically increasing curve that starts at the lower boundary of the first class with \(CF = 0\).

2. Locating Quartiles on an Ogive

Quartiles divide an ordered dataset into four equal quarters (25% each):

  • Lower Quartile (\(Q_1\)): The value at \(\frac{1}{4}N\) (or \(\frac{N+1}{4}\) for discrete data). 25% of observations fall below \(Q_1\).
  • Median (\(Q_2\)): The middle value at \(\frac{1}{2}N\) (or \(\frac{N+1}{2}\)). 50% of observations fall below \(Q_2\).
  • Upper Quartile (\(Q_3\)): The value at \(\frac{3}{4}N\) (or \(\frac{3(N+1)}{4}\)). 75% of observations fall below \(Q_3\).

Interquartile Range (IQR): \(\text{IQR} = Q_3 - Q_1\). It measures the spread of the central 50% of the distribution and is resistant to extreme outliers.

Interactive Ogive Explorer

Drag the slider to move along the cumulative frequency axis (\(CF\)) and observe how \(Q_1\), Median (\(Q_2\)), and \(Q_3\) are read horizontally and projected down to the \(x\)-axis.

20
Selected Percentile: Median (50%) → Value \(\approx 25.0\)

Key Formulas

1. Cumulative Frequency Definition

\[CF_{i} = \sum_{j=1}^{i} f_{j}\]

The cumulative frequency of class \(i\) is the sum of frequencies from the first class up to class \(i\).

2. Quartile Positions for Grouped Continuous Data

\[P_{Q1} = \frac{1}{4}N, \quad P_{Q2} = \frac{1}{2}N, \quad P_{Q3} = \frac{3}{4}N\]

For ogives and continuous data grouped into classes, quartiles are determined using fractions of the total frequency \(N\).

3. Linear Interpolation Formula for Quartiles

\[Q_{k} = L + \left(\frac{\frac{k}{4}N - CF_{\text{prev}}}{f_{k}}\right) \times c\]

Where:

  • \(L\) = Exact lower class boundary of the quartile class
  • \(N\) = Total cumulative frequency (\(\sum f\))
  • \(CF_{\text{prev}}\) = Cumulative frequency of the class preceding the quartile class
  • \(f_{k}\) = Frequency of the quartile class
  • \(c\) = Class width (interval size: \(c = \text{Upper Boundary} - \text{Lower Boundary}\))

4. Interquartile Range & Semi-Interquartile Range

\[\text{IQR} = Q_3 - Q_1\]\[\text{Semi-IQR} = \frac{Q_3 - Q_1}{2}\]

Worked Examples

Example 1 (Easy): Basic IQR from Direct Quartile Values

Problem: An agricultural officer in Nakuru evaluates the weekly milk yields of dairy cows. From an ogive, she reads the lower quartile as \(Q_1 = 18.5\text{ litres}\) and the upper quartile as \(Q_3 = 34.5\text{ litres}\). Calculate:

  1. The Interquartile Range (IQR).
  2. The Semi-Interquartile Range (Quartile Deviation).

Step-by-step Solution:

  1. Calculate IQR:\[\text{IQR} = Q_3 - Q_1 = 34.5 - 18.5 = 16\text{ litres}\]
  2. Calculate Semi-IQR:\[\text{Semi-IQR} = \frac{\text{IQR}}{2} = \frac{16}{2} = 8\text{ litres}\]

Answer: \(\text{IQR} = 16\text{ litres}\), \(\text{Semi-IQR} = 8\text{ litres}\).

Example 2 (Medium): Estimating the Median from a Grouped Frequency Table

Problem: The table below shows the distribution of marks scored by 40 students in a mathematics test in Machakos High School.

MarksClass BoundariesFrequency (\(f\))Cumulative Frequency (\(CF\))
10 - 199.5 - 19.566
20 - 2919.5 - 29.51016
30 - 3929.5 - 39.51430
40 - 4939.5 - 49.5838
50 - 5949.5 - 59.5240

Calculate the median mark using linear interpolation.

Step-by-step Solution:

  1. Identify median rank: \[\text{Rank} = \frac{1}{2}N = \frac{40}{2} = 20\]
  2. Identify median class: The 20th student falls into the class 30 - 39 (since \(CF\) before is 16 and ends at 30).
  3. Identify parameters: Lower boundary \(L = 29.5\), \(CF_{\text{prev}} = 16\), \(f = 14\), class width \(c = 39.5 - 29.5 = 10\).
  4. Apply interpolation:\[\text{Median} = L + \left(\frac{\frac{N}{2} - CF_{\text{prev}}}{f}\right) \times c = 29.5 + \left(\frac{20 - 16}{14}\right) \times 10\]\[\text{Median} = 29.5 + \left(\frac{4}{14}\right) \times 10 = 29.5 + 2.857 = 32.36\]

Answer: \(\text{Median} \approx 32.4\text{ marks}\).

Example 3 (Hard): Finding IQR via Interpolation on Grouped Continuous Data

Problem: A tea processing factory in Kericho weighs 50 bags of tea. The results are summarized below: Classes (kg): 20–29 (\(f=6\)), 30–39 (\(f=12\)), 40–49 (\(f=18\)), 50–59 (\(f=10\)), 60–69 (\(f=4\)). Total \(N=50\). Calculate the Interquartile Range (IQR) correct to 2 decimal places.

Step-by-step Solution:

  1. Compute Cumulative Frequencies:
    • 20–29 (19.5–29.5): \(CF = 6\)
    • 30–39 (29.5–39.5): \(CF = 6 + 12 = 18\)
    • 40–49 (39.5–49.5): \(CF = 18 + 18 = 36\)
    • 50–59 (49.5–59.5): \(CF = 36 + 10 = 46\)
    • 60–69 (59.5–69.5): \(CF = 46 + 4 = 50\)
  2. Find Lower Quartile (\(Q_1\)):\[\text{Position} = \frac{1}{4}(50) = 12.5\]Falls in class 30–39: \(L = 29.5\), \(CF_{\text{prev}} = 6\), \(f = 12\), \(c = 10\).\[Q_1 = 29.5 + \left(\frac{12.5 - 6}{12}\right) \times 10 = 29.5 + \left(\frac{6.5}{12}\right) \times 10 = 29.5 + 5.42 = 34.92\text{ kg}\]
  3. Find Upper Quartile (\(Q_3\)):\[\text{Position} = \frac{3}{4}(50) = 37.5\]Falls in class 50–59: \(L = 49.5\), \(CF_{\text{prev}} = 36\), \(f = 10\), \(c = 10\).\[Q_3 = 49.5 + \left(\frac{37.5 - 36}{10}\right) \times 10 = 49.5 + \left(\frac{1.5}{10}\right) \times 10 = 49.5 + 1.50 = 51.00\text{ kg}\]
  4. Compute IQR:\[\text{IQR} = Q_3 - Q_1 = 51.00 - 34.92 = 16.08\text{ kg}\]

Answer: \(Q_1 = 34.92\text{ kg}\), \(Q_3 = 51.00\text{ kg}\), \(\text{IQR} = 16.08\text{ kg}\).

Common Mistakes

Mistake 1: Plotting Midpoints instead of Upper Class Boundaries (UCB)
Why students do it: For frequency polygons, midpoints are plotted against frequency. Students confuse polygons with ogives.
Correction An ogive represents cumulative totals up to the highest possible value of a class. Therefore, always plot Upper Class Boundaries (UCB) on the \(x\)-axis against Cumulative Frequency on the \(y\)-axis.
Mistake 2: Reading Quartiles from the X-Axis First
Why students do it: Students are used to looking up \(x\) to find \(y = f(x)\).
Correction Quartile ranks are counts (frequencies). You must locate \(\frac{1}{4}N\), \(\frac{1}{2}N\), or \(\frac{3}{4}N\) on the vertical (cumulative frequency) axis first, draw a horizontal line to the curve, and project vertically downward to read the value on the \(x\)-axis.
Mistake 3: Using Lower Class Limit instead of Lower Class Boundary (\(L\)) in Interpolation
Why students do it: In a class like \(20 - 29\), students take \(L = 20\) instead of \(19.5\).
Correction For continuous data with gaps between integer classes, continuous boundaries must be used (\(19.5\) to \(29.5\)). Taking \(L = 20\) causes a systematic shift of \(0.5\).

Real World

Top 10% (90th Percentile / \(P_{90}\)): Awarded grade 'A'.
Median (\(Q_2\)): Divides the top 50% from the bottom 50% to assess national performance.
Interquartile Range (IQR): Measures the spread of middle achievers. A narrow IQR shows that most candidates clustered around similar scores, while a wide IQR indicates broad disparity between schools.

Practice

From an ogive representing the weekly earnings (in thousands of KSh) of small business owners in Eldoret, the first quartile \(Q_1\) is read as 22 and the third quartile \(Q_3\) is read as 38. What is the interquartile range (IQR)? (Type only the number, e.g., 16)
Review the concepts above.
A sample of 80 maize cobs has a lower quartile \(Q_1 = 14\text{ cm}\) and an upper quartile \(Q_3 = 26\text{ cm}\). What is the semi-interquartile range (quartile deviation) of the cobs? (Type only the number, e.g., 6)
Review the concepts above.
The cumulative frequencies for a set of test scores at the upper class boundaries are given below: Upper Boundary: 15, 25, 35, 45, 55 Cumulative Frequency: 4, 10, 18, 27, 30 Using linear interpolation on the ogive data, estimate the 75th percentile (upper quartile, \(Q_3\)) of the scores. (Type only the number, e.g., 40)
Review the concepts above.
A set of 30 test scores is grouped into continuous intervals 0–10, 10–20, 20–30, and 30–40 with frequencies 5, 12, 8, and 5 respectively. Using linear interpolation, calculate the median score correct to 1 decimal place. (Type only the number, e.g., 18.3)
Review the concepts above.
Test scores are grouped as follows: 0–9 (frequency = 5), 10–19 (frequency = 8), 20–29 (frequency = 12), 30–39 (frequency = 7), 40–49 (frequency = 3). Total \(N = 35\). Using the continuous class boundaries (9.5, 19.5, 29.5, etc.), calculate the median score correct to 2 decimal places. (Type only the number, e.g., 23.25)
Review the concepts above.
A dataset of 50 student test marks has the distribution: 30–39 (\(f=5\)), 40–49 (\(f=15\)), 50–59 (\(f=20\)), 60–69 (\(f=10\)). Using linear interpolation with class boundaries (29.5, 39.5, 49.5, 59.5, 69.5), calculate the Interquartile Range (IQR) of the scores. (Type only the number, e.g., 13.75)
Review the concepts above.