Box plot workshop
About this app
Range, quantile, interquartile range and box-and-whisker plot: 40 gross salaries, scissors at the p quantile, cutting off the outer quarters. When the manager earning €40m joins, the range explodes and the IQR stays 32 k€. Then 40 body heights with histogram and box plot, whiskers from min to max or at most 1.5 · IQR with an outlier point.
With explain mode: an AI tutor walks you through the app, points out what matters in the scene and answers your questions.
The idea
Measures of spread tell you how far data are apart. The range is the largest minus the smallest value: quick to compute, but a single outlier can make it as large as you like. The p quantile is a threshold with the share p of the values below it. Following Fahrmeir you take x₍⌈np⌉₎ from the sorted list, and if n·p is an integer, the mean of x₍np₎ and x₍np+1₎. The interquartile range IQR = Q₀.₇₅ − Q₀.₂₅ cuts off a quarter at the bottom and at the top and is therefore robust.
What the app shows
40 annual gross salaries first float as a scattered cloud and then move, sorted, onto the salary axis: range 115 k€, Q₁ 36, median 52, Q₃ 68, IQR 32. A pair of scissors cuts at the p quantile; at p = 0.2, 8 of 40 salaries lie below. When a manager earning 40 million euros joins, the axis zooms out, the range jumps to 39,995 k€ and the IQR stays 32. The second scene shows 40 body heights with histogram, point row and box-and-whisker plot, median 177 cm and mean 179.3 cm.
What you can try
Sort the salaries, move the share p and watch which points the scissors cut off. Switch on the quarters and bring in the manager. In the box plot you build median, box, whiskers and mean step by step and shade the histogram areas left of Q₁ and right of Q₃, one quarter each. Switch the whiskers from minimum-to-maximum to at most 1.5 · IQR: 218 cm becomes an outlier point. Drag points or add your own; the values panel updates live.
Frequently asked questions
- How do you calculate a quantile?
- Sort the values and compute n·p. If n·p is not an integer, the quantile is the value at position ⌈np⌉. If n·p is an integer, take the mean of the values at positions np and np + 1. With 40 values and p = 0.25, n·p = 10, so Q₁ = (x₍₁₀₎ + x₍₁₁₎)/2.
- Why is the interquartile range more robust than the range?
- The range depends only on the smallest and the largest value, so an outlier changes it fully. The IQR measures the distance between Q₁ and Q₃, the width of the middle half of the data. What happens far out barely touches it.
- How far do the whiskers of a box plot reach?
- There are two common rules. Either the whiskers run from the minimum to the maximum. Or they reach at most 1.5 · IQR beyond the box, up to the last value inside that limit, and values further out are drawn as single outlier points.
- What can I change in the app?
- The scene (salaries or body heights), sorted or scattered, the share p of the scissors, quarters, range and the manager; in the box plot the build-up step, the whisker rule, histogram and 25 % areas. Points can be dragged and added.
Subject: Statistics
More from Statistics
- Anscombe's quartet
- Bias-variance / overfitting
- Geometric mean
- Law of large numbers
- Histogram workshop
- Hypothesis test & p-value
- Confidence interval
- Measures of location & spread
A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps