Summary statistics of a data set – dragging data points

MathematicsStatisticsAges 15–16

Use with my class

A data sample is shown as a dot plot on a number line. Drag any point (or click 'Random') and watch the mean, median, quartiles Q₁, Q₂, Q₃, mode, range, interquartile range, variance and standard deviation update instantly. A box plot is drawn below, with outliers (outside [Q₁ − 1.5·IQR; Q₃ + 1.5·IQR]) marked with ×; drag one point far away to see the mean shift a lot while the median barely changes. Extra views: sample SD (n − 1) versus population SD (n), coding y = a·x + b, outlier rules with data cleaning, and stem-and-leaf plots (single and back-to-back).

Lesson: Measures of central tendency and measures of spread

What it shows

A small data set is plotted as dots on a number line, with measures of centre (mean, median, mode) and spread (range, IQR, variance, standard deviation) recalculated as the data change. The sample SD s divides by n − 1 and the population SD σ by n; a menu shows either or both. Other views show coding (y = a·x + b shifts the centre by b and scales the spread by |a|), outlier rules (1.5·IQR fences or mean ± 2 or 3 SD) with data cleaning, and single or back-to-back stem-and-leaf plots. One extreme value moves the mean and SD strongly; the median and IQR resist it.

How to use

Drag a dot far to the right and record how the mean, median, SD and IQR change; Random makes a new sample of size n. Choose Coding: y = a·x + b and move the a and b sliders to compare x and y. In Outliers and data cleaning, pick a rule, press Messy data example, then Remove outliers. Stem-and-leaf plot shows the data by tens; tick Back-to-back with data set B. Reset returns to the starting data.

Parameters you can change

  • Sample size n (when generating randomly) 5–20
  • Sample data (comma-separated; leave blank = random)
  • Maximum value on the axis 10–100
  • Show box plot
  • View Summary statistics, Coding y = a·x + b, Outliers and data cleaning, Stem-and-leaf plot
  • Standard deviation divisor Show both (n − 1 and n), Sample: n − 1, Population: n
  • Coding: multiply by a -3–3
  • Coding: add b -20–20
  • Outlier rule 1.5 × IQR fences, Mean ± 2 SD, Mean ± 3 SD
  • Data set B for the back-to-back stem-and-leaf plot (blank = random)
  • Back-to-back stem-and-leaf plot

Questions to explore

  1. In the default data set, why is the value 25 marked as an outlier?
  2. Which summary measures change least when you drag one point far away from the rest?
  3. Can two data sets with the same range have different standard deviations, and can you build an example?