Skip to content

Actuarial Statistics · Exploratory data analysis

Graphical Data Presentation: Histograms, Box Plots and Stem-and-Leaf

Updated 11 October 2026 · Fact-checked

Graphical data presentation turns raw data into pictures that show shape, centre, spread and outliers. Choose a histogram for grouped continuous data, a stem-and-leaf plot for small samples, a box plot to compare spread, a bar chart for categories and a cumulative frequency plot for quantiles. For unequal class widths, plot frequency density, not frequency.

Understand Graphical Data Presentation

A graph is the first check you make on data, before any formula. It shows the shape (symmetric or skewed), the centre, the spread and any outliers. These features decide which model or summary measure you use next.

The right graph depends on the data type. A bar chart is for discrete or categorical data. The bars are separate, and height shows frequency. A histogram is for grouped continuous data. The bars touch, and area shows frequency. This is the key difference between the two. In a histogram the horizontal axis is a continuous scale.

With unequal class widths, bar height alone misleads. A wide class collects more observations simply because it is wide. So you plot frequency density = frequency ÷ class width. Then area = frequency, and the picture is fair.

A stem-and-leaf plot keeps every data value. The stem is the leading digits and the leaf is the last digit. It suits small data sets, and it gives a histogram on its side. A box plot shows the median, the quartiles and the extremes. Points far from the quartiles are marked as outliers. It is best for comparing groups.

A cumulative frequency plot (ogive) plots cumulative frequency against the upper class boundary. You read the median and quartiles from it. The steepest part of the curve is where the data is most dense.

Key rules to remember

Frequency density
frequency density = class frequency ÷ class width
Use this as bar height in a histogram with unequal class widths. Area of bar = class frequency.
Histogram area rule
bar area = frequency density × class width = frequency
Total area = total frequency. Relative frequency density divides by n as well, so total area = 1.
Quartile positions
median at (n + 1) ÷ 2; Q1 at (n + 1) ÷ 4; Q3 at 3(n + 1) ÷ 4
Interpolate between ordered values if the position is not a whole number. R's default quantile() uses a different rule (position 1 + (n − 1)p), so answers can differ slightly. State your method.
Interquartile range
IQR = Q3 − Q1
A measure of spread that is not affected by extreme values.
Outlier fences (common convention)
lower fence = Q1 − 1.5 × IQR; upper fence = Q3 + 1.5 × IQR
Points outside the fences are plotted individually as outliers. This is a convention, not a law. State the rule you use.
Cumulative frequency plotting
plot cumulative frequency against the upper class boundary
Join the points with a smooth curve or straight lines. Start at the lower boundary of the first class with cumulative frequency 0.

How to solve Graphical Data Presentation questions

Use this method for any question that asks you to draw, choose or interpret a graph.

  1. 1Identify the data type: categorical, discrete, or continuous grouped. This fixes the graph family.
  2. 2Check the class boundaries. Note whether widths are equal. Close gaps such as 10–19 and 20–29 to real boundaries 9.5–19.5 and 19.5–29.5 if the data is continuous and rounded.
  3. 3Compute what you plot. For a histogram, work out frequency density. For an ogive, work out cumulative frequencies. For a box plot, order the data and find the median and quartiles.
  4. 4Draw axes with a clear scale and labels. Put the variable with units on the horizontal axis. Put frequency density, frequency or cumulative frequency on the vertical axis.
  5. 5Draw the graph. Bars of a histogram touch. A stem-and-leaf plot needs a key. A box plot needs the fences worked out before you draw whiskers.
  6. 6Interpret in words. Comment on shape (skew, modes), centre, spread and outliers. Link the comment to the context, such as claim sizes.
  7. 7Say what you would do next, for example suggest a skewed distribution or investigate the outlier before removing it.

Quickest way: Table-first method for histograms and box plots

When to use it: Use it when time is short and the question gives grouped data or a list of 10 to 30 values.

  1. Write a small table with columns: class, width, frequency, density. Fill the density column first.
  2. For a box plot, sort the data once. Write the positions (n + 1) ÷ 4, (n + 1) ÷ 2 and 3(n + 1) ÷ 4 beside it.
  3. Compute the IQR and both fences straight away. Test only the smallest and largest values against them.
  4. Whisker ends are the smallest and largest values inside the fences, not the fences themselves.
  5. Sketch first, label last. Marks go to correct heights, correct scale and a one-line comment.

Common mistakes in Graphical Data Presentation

  • Plotting frequency instead of frequency density when class widths are unequal.

    Students copy the habit from equal-width charts.

    Fix: Check the widths first. If any differ, divide each frequency by its width. Test your graph: bar area should equal frequency.

  • Leaving gaps between histogram bars or treating a histogram like a bar chart.

    The two charts look alike and the names are mixed up.

    Fix: Continuous data means a continuous scale, so bars touch. Use separate bars only for categories or discrete values.

  • Drawing box plot whiskers to the fences.

    Students confuse the fence with the data limit.

    Fix: Extend each whisker to the most extreme observation that lies inside the fence. Plot outliers as separate points.

  • Plotting an ogive at class midpoints or lower boundaries.

    Midpoints are used for means, so students reuse them.

    Fix: Cumulative frequency counts everything up to the class end. Plot it at the upper class boundary.

  • Using the wrong quartile position, or not saying which method was used.

    Different books and R use different rules.

    Fix: Use (n + 1) ÷ 4 for hand calculations and state it. If the question uses R output, quote the R values.

  • Writing a stem-and-leaf plot without ordering the leaves, or without a key.

    Students rush the first pass.

    Fix: Draw a first pass, then rewrite with leaves in order. Always add a key such as 3 | 4 means 34.

Worked examples

Example 1

The sizes of 90 claims (₹ thousand) are grouped as: 0–10: 20 claims; 10–20: 30 claims; 20–40: 24 claims; 40–80: 16 claims. Find the bar heights for a histogram and comment on the shape.

Show the solution
  1. The widths are 10, 10, 20 and 40, so they are unequal. Use frequency density.
  2. 0–10: 20 ÷ 10 = 2.0.
  3. 10–20: 30 ÷ 10 = 3.0.
  4. 20–40: 24 ÷ 20 = 1.2.
  5. 40–80: 16 ÷ 40 = 0.4.
  6. Check the areas: 2.0 × 10 = 20, 3.0 × 10 = 30, 1.2 × 20 = 24, 0.4 × 40 = 16. They add to 90.
  7. Shape: density rises to a peak in the class 10–20, then falls steadily over the wider classes.

Answer: Heights (claims per ₹1 thousand): 2.0, 3.0, 1.2 and 0.4. The histogram has a mode in 10–20 and a long right tail, so it is positively skewed.

Example 2

Ordered data (n = 12): 23, 27, 31, 34, 35, 38, 41, 42, 45, 47, 52, 78. (a) Draw a stem-and-leaf plot. (b) Find the quartiles using the (n + 1) rule and test for outliers using the 1.5 × IQR rule.

Show the solution
  1. (a) Use the tens digit as the stem. 2 | 3 7; 3 | 1 4 5 8; 4 | 1 2 5 7; 5 | 2; 6 | (no leaves); 7 | 8. Key: 2 | 3 means 23. The leaves total 2 + 4 + 4 + 1 + 1 = 12, which matches n.
  2. (b) Median: position 13 ÷ 2 = 6.5, so (38 + 41) ÷ 2 = 39.5.
  3. Q1: position 13 ÷ 4 = 3.25, so 31 + 0.25 × (34 − 31) = 31.75.
  4. Q3: position 3 × 13 ÷ 4 = 9.75, so 45 + 0.75 × (47 − 45) = 46.5.
  5. IQR = 46.5 − 31.75 = 14.75. Then 1.5 × IQR = 22.125.
  6. Upper fence = 46.5 + 22.125 = 68.625. Lower fence = 31.75 − 22.125 = 9.625.
  7. 78 is above 68.625, so it is an outlier. 23 is above 9.625, so there is no lower outlier.
  8. Whiskers: lower to 23, upper to 52 (the largest value inside the fence).

Answer: Q1 = 31.75, median = 39.5, Q3 = 46.5, IQR = 14.75. The value 78 is an outlier. The whiskers run from 23 to 52, and 78 is plotted as a separate point. The plot shows a long right tail.

Exam tips

  • Read the question for the word 'histogram' with grouped data. If the widths differ, density is almost always the point of the question.
  • Always label axes with units and write one sentence of interpretation. Marks are often given for the comment, not just the drawing.
  • In MCQs, check the vertical axis label first. 'Frequency density' tells you to read area, not height.
  • For box plots, show the fence working. A wrong whisker can still earn method marks if the fences are clear.
  • In computer-based papers, give the R command you use (hist(), boxplot(), stem(), quantile()) and comment on the output. Remember that R's quartile rule and bin choices may differ from hand methods.

Practice questions from Exploratory data analysis

Graphical Data Presentation: frequently asked questions

What is the difference between a bar chart and a histogram?

A bar chart shows categorical or discrete data. Its bars are separate and the height gives frequency. A histogram shows grouped continuous data. Its bars touch and the area gives frequency, so with unequal widths you plot frequency density.

How do I draw a histogram with unequal class widths?

Divide each class frequency by its class width to get frequency density. Use that as the bar height. Check that the area of each bar equals its class frequency.

How do I draw a stem-and-leaf diagram?

Split each value into a stem (leading digits) and a leaf (last digit). List the stems in a column and write the leaves beside them. Then reorder the leaves and add a key such as 2 | 3 means 23.

How do I read outliers on a box plot?

Outliers are points plotted beyond the whiskers. A common rule marks values more than 1.5 × IQR below Q1 or above Q3. Comment on them and check for errors before you remove any.