# Data representation: histograms, box plots, cumulative frequency

> IB Mathematics: Analysis and Approaches SL · Statistics & Probability
> Source: https://www.owlsprep.com/study/ib-math-aa-sl-u4-data-representation-histograms-box-plots/

This sub-topic covers core graphical methods for summarising univariate data. You will learn to construct and interpret histograms, box plots, and cumulative frequency graphs to identify key measures of centre and spread for exam questions.

**Prerequisites:** [Measures of centre and spread (mean, median, quartiles)](https://www.owlsprep.com/study/ib-math-aa-sl-u4-measures-centre-spread/)

## Learning objectives

- Construct accurate histograms for equal and unequal width grouped data
- Interpret box plots and identify outliers using the 1.5×IQR rule
- Draw cumulative frequency graphs and estimate quartiles/percentiles
- Compare distributions using these graphical representations

## Histograms for Grouped Data

Histograms are used to visualise grouped continuous (or grouped discrete) data. Unlike bar charts for categorical data, the **area** of each bar in a histogram is proportional to the frequency of the class, not the height. For bins of equal width, height equals frequency. For unequal bin widths, we calculate frequency density to get the correct bar height.

**Frequency Density** — The frequency per unit of class width, which gives the height of a histogram bar. This ensures the area of the bar equals the class frequency $f$, where $w$ is the class width.

*Notation:* $fd = \frac{f}{w}$

*Example:* For a class 0-10 with frequency 15, frequency density = $\frac{15}{10} = 1.5$

**Worked example:** A data set of 50 plant heights has these classes: 10-15 (f=8), 15-20 (f=12), 20-30 (f=20), 30-50 (f=10). Calculate the height of each histogram bar.

1. Calculate class width and frequency density for each class:
2. 10-15: width = 5, $fd = \frac{8}{5} = $

   $$1.6$$
3. 15-20: width = 5, $fd = \frac{12}{5} = $

   $$2.4$$
4. 20-30: width = 10, $fd = \frac{20}{10} = $

   $$2.0$$
5. 30-50: width = 20, $fd = \frac{10}{20} = $

   $$0.5$$
6. The heights of the bars are the frequency density values calculated above.

> **Exam tip:** Examiners regularly test unequal width bins. Always check class widths before drawing a histogram.

## Box Plots and Outliers

Box plots (box-and-whisker plots) summarise a distribution using its five-number summary, making it easy to identify spread, centre, and outliers. They are also commonly used to compare two or more distributions in exam questions.

**1.5×IQR Outlier Rule** — A value is classified as an outlier if it is less than $Q_1 - 1.5 \times IQR$ or greater than $Q_3 + 1.5 \times IQR$, where $IQR = Q_3 - Q_1$.

**Worked example:** A data set has five-number summary: min = 12, Q1 = 20, median = 25, Q3 = 30, max = 48. Identify outliers and describe the box plot.

1. Calculate the interquartile range:

   $$IQR = 30 - 20 = 10$$
2. Calculate outlier bounds:
3. Lower bound = $20 - 1.5(10) = 5$, Upper bound = $30 + 1.5(10) = 45$
4. Check for outliers: 48 > 45, so 48 is an outlier.
5. The box plot will have a box from Q1=20 to Q3=30, a line at median 25, a lower whisker to min=12, an upper whisker to the highest non-outlier 45, and 48 marked as a separate point.

> **Exam tip:** When comparing two box plots, always comment on both centre (difference in median) and spread (difference in IQR) for full marks.

## Cumulative Frequency Graphs

A cumulative frequency graph plots the running total (cumulative frequency) of observations against the upper boundary of each class. This graph can be used to estimate the median, quartiles, and any percentile for grouped data, where we cannot calculate these values exactly.

**Cumulative Frequency** — The total number of observations with a value less than or equal to the upper boundary of the current class. It ranges from 0 to the total number of observations $n$.

**Worked example:** Test scores out of 50 are grouped as: 0-10 (f=5), 10-20 (f=12), 20-30 (f=18), 30-40 (f=10), 40-50 (f=5). Estimate the median from a cumulative frequency graph.

1. Calculate cumulative frequency for each upper boundary:
2. Upper 10: cf=5, Upper 20: cf=17, Upper 30: cf=35, Upper 40: cf=45, Upper 50: cf=50
3. Total $n=50$, so the median is at $\frac{n}{2} = 25$ on the cumulative frequency axis.
4. Plot points $(\text{upper boundary}, cf)$ and connect with a smooth curve. Read across from $cf=25$ to the curve, then down to the x-axis.
5. The estimated median is approximately 24.

> **Exam tip:** Always plot cumulative frequency at the upper class boundary, not the midpoint of the class. This is a very common exam mistake.

## Common pitfalls

- **Wrong:** Using frequency as bar height for histograms with unequal bin widths
  - Why it fails: The area of each bar must equal frequency, so unadjusted heights for wider bins overrepresent their frequency
  - Correct: Calculate frequency density = frequency / class width, and use this as the bar height
- **Wrong:** Extending box plot whiskers to include outliers
  - Why it fails: Outliers are extreme values that do not represent the main distribution
  - Correct: Mark outliers as separate points, and draw whiskers only to the nearest non-outlier value
- **Wrong:** Plotting cumulative frequency at the midpoint of each class
  - Why it fails: Cumulative frequency counts all values below the upper boundary, so midpoint plotting shifts the curve left
  - Correct: Plot each cumulative frequency value at the upper boundary of its class
- **Wrong:** Using $(n+1)/2$ for the median on a cumulative frequency graph
  - Why it fails: This formula is for discrete ungrouped data, not estimated medians for grouped data
  - Correct: Use $n/2$ for the median, $n/4$ for Q1, and $3n/4$ for Q3 for cumulative frequency estimates

## Cheatsheet

| Graph Type | Key Purpose | Core Rule |
| --- | --- | --- |
| Histogram | Summarise grouped continuous data | Area = frequency; height = frequency/bin width for unequal bins |
| Box Plot | Show 5-number summary, find outliers, compare distributions | Outlier = outside $Q_1 - 1.5IQR$ to $Q_3 + 1.5IQR$ |
| Cumulative Frequency Graph | Estimate median, quartiles and percentiles | Plot cf against upper class boundary; median at $n/2$ |

## What's next

Mastering these data representation techniques is the foundation of all descriptive and inferential statistics in IB AA SL. These graphs regularly appear as the first part of multi-part statistical questions on both Paper 1 and Paper 2, and they are used to interpret results for more advanced topics like correlation, regression, and hypothesis testing. Being able to correctly construct and interpret these graphs will help you avoid losing easy method marks in the exam, and prepare you for university-level statistics if you choose to study quantitative subjects.

- [Measures of central tendency and dispersion](https://www.owlsprep.com/study/ib-math-aa-sl-u4-measures-of-central-tendency-and/)
- [Cumulative distributions and percentiles](https://www.owlsprep.com/study/ib-math-aa-sl-u4-cumulative-distributions-and-percentiles/)
- [Probability, conditional probability and independent events](https://www.owlsprep.com/study/ib-math-aa-sl-u4-probability-conditional-probability-and-independent/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-aa-sl-u4-data-representation-histograms-box-plots/
