📚 Box Plots: Five-Number Summary, IQR and Outliers | 箱线图:五数综合、四分位距与异常值
A box plot, also called a box-and-whisker diagram, summarises a whole data set with just five key values: the minimum, the lower quartile, the median, the upper quartile and the maximum. In Edexcel A-Level Mathematics it is one of the fastest ways to display spread, to identify outliers and to compare two or more distributions side by side.
箱线图又称盒须图,用最小值、下四分位数、中位数、上四分位数和最大值这五个关键值概括一整组数据。在爱德思 A-Level 数学中,它是展示离散程度、识别异常值以及并排比较两个或多个分布最快捷的工具之一。
This article rebuilds the topic from the ground up: how the five-number summary is found, how a box plot is drawn and read, how outliers are defined, how skewness is judged, and how to write full-mark comparison answers. It also covers the conventions your examiner expects, including the difference between quartiles from listed data and quartiles read from a cumulative frequency graph.
本文从最基础处重建这一考点:如何求五数综合、如何绘制与解读箱线图、如何定义异常值、如何判断偏态,以及如何写出满分的比较类答案。文中同时说明考官期望的约定,包括由原始数据求四分位数与由累积频率图读取四分位数之间的区别。
1. What Is a Box Plot? | 什么是箱线图
A box plot is a standardised picture of a distribution. A rectangle (the box) is drawn from the lower quartile Q₁ to the upper quartile Q₃, so its width is the interquartile range and it contains the middle 50% of the data. A line inside the box marks the median Q₂, and two lines (the whiskers) run out to the smallest and largest values that are not outliers.
箱线图是分布的标准化图形。矩形箱体从下四分位数 Q₁ 画到上四分位数 Q₃,因此箱体宽度就是四分位距,箱内包含中间 50% 的数据。箱内一条竖线标出中位数 Q₂,两条须线则分别延伸到不属于异常值的最小值和最大值。
Because it is built only from order statistics, a box plot is excellent for comparing groups, but it deliberately hides detail. It does not show the mean unless you mark it separately, it does not show gaps, clusters or modes, and two very different data sets can share an identical box plot.
由于只由次序统计量构成,箱线图非常适合比较各组数据,但它刻意隐藏了细节。除非另行标出,它不显示平均数,也不显示空档、聚集或众数;两组完全不同的数据甚至可能画出完全相同的箱线图。
2. The Five-Number Summary | 五数综合
The five-number summary is the ordered set of values that defines the plot. Written in ascending order it is: minimum, Q₁, Q₂ (median), Q₃, maximum. When outliers are present, the "maximum" used on the plot is the largest value that is not an outlier, not the largest value in the raw list.
五数综合就是定义这张图的那组按大小排列的值,依次为:最小值、Q₁、中位数 Q₂、Q₃、最大值。当存在异常值时,图中使用的"最大值"是不属于异常值的最大数据,而不是原始列表中的绝对最大值。
| Value | Meaning | 中文说明 |
| Minimum | Lowest data value (not an outlier) | 最小值,非异常值中的最小者 |
| Q₁ | Lower quartile, 25% of data below it | 下四分位数,约 25% 数据小于它 |
| Q₂ | Median, 50% of data below it | 中位数,约 50% 数据小于它 |
| Q₃ | Upper quartile, 75% of data below it | 上四分位数,约 75% 数据小于它 |
| Maximum | Highest data value (not an outlier) | 最大值,非异常值中的最大者 |
3. How to Draw a Box Plot | 如何绘制箱线图
Box plots are almost always drawn on graph paper or in an answer booklet with a given scale, so accuracy marks are usually available for correctly placed lines. Work through the distribution in a fixed order and label everything.
箱线图通常在方格纸或答题册给定刻度上绘制,因此线条位置正确往往可以拿到准确分。请按固定顺序处理数据,并把所有要素标注清楚。
- Step 1: Sort the data into ascending order and count how many values there are. — 第一步:把数据按从小到大排序,并数出数据个数。
- Step 2: Find the median, the lower quartile and the upper quartile using the position rules in Section 4. — 第二步:用第 4 节的位置法则求出中位数、下四分位数和上四分位数。
- Step 3: Test the smallest and largest values against the outlier fences (Section 6). — 第三步:用异常值围栏(见第 6 节)检验最小值和最大值。
- Step 4: Draw a horizontal scale covering the whole range and mark the five values as vertical lines. — 第四步:画出覆盖整个取值范围的横轴刻度,并把五个值用竖线标出。
- Step 5: Join Q₁ to Q₃ to form the box, keep the median line inside it, and extend the whiskers to the smallest and largest non-outlier values. — 第五步:连接 Q₁ 与 Q₃ 形成箱体,保留箱内的中位数线,须线延伸到非异常值中的最小值和最大值。
- s as separate crosses (×) beyond the whiskers and add a key or label explaining the units. — 第六步:把异常值用单独的叉号(×)画在须线之外,并加上图例或标注说明单位。
4. Finding Quartiles: Position Rules | 求四分位数:位置法则
Quartiles are positional, not arithmetic, averages. For a listed set of n discrete values, find the position of the quartile first, then read the value at that position. If the position falls between two data values, interpolate linearly between them.
四分位数是按位置确定的,而不是算术平均。对于含有 n 个离散数据的列表,先求四分位数所在的位置,再读取该位置上的数值。若位置落在两个数据值之间,就在两者之间作线性插值。
Position of Q₁ = (n + 1) ÷ 4 | Position of Q₂ = (n + 1) ÷ 2 | Position of Q₃ = 3(n + 1) ÷ 4
3.25th value, so it is the 3rd value plus 0.25 of the gap to the 4th value. The median is at the 6.5th value, halfway between the 6th and 7th values. Always state the position you are using, because method marks are awarded for it.
例如当 n = 12 时,Q₁ 位于第 3.25 个值,即第 3 个值加上到第 4 个值间隔的 0.25 倍;中位数位于第 6.5 个值,即第 6 与第 7 个值的中点。务必写明所用的位置,因为方法分就是按这一步给的。
Some calculators and older textbooks use the position n ÷ 4 instead of (n + 1) ÷ 4. The two conventions give the same answer only when the position happens to be a whole number, so in an examination follow the rule used in your Pearson Edexcel textbook and write your method down. A clearly stated correct method protects you even if a rounding convention differs.
部分计算器和较早的教材使用 n ÷ 4 而不是 (n + 1) ÷ 4。只有当位置恰好为整数时两种约定才给出相同答案,因此在考试中请遵循你所用爱德思教材的规则,并把过程写出来。只要方法写清楚且正确,即便四舍五入约定不同也能保住分数。
5. Range, Interquartile Range and Percentiles | 极差、四分位距与百分位数
The range is the simplest measure of spread: maximum minus minimum. It uses only two values and is very sensitive to outliers. The interquartile range (IQR) is Q₃ minus Q₁; it measures the spread of the middle half of the data and ignores extreme values, which is exactly why it is reported alongside a box plot.
极差是最简单的离散程度度量:最大值减最小值。它只用到两个数值,对异常值非常敏感。四分位距(IQR)等于 Q₃ 减 Q₁,衡量中间一半数据的离散程度,不受极端值影响,这正是它与箱线图配套使用的原因。
Range = Maximum − Minimum | IQR = Q₃ − Q₁
Quartiles are simply percentiles at 25%, 50% and 75%. If a value is at the 90th percentile, about 90% of the data lies below it. This language matters in context questions about reaction times, test scores or waiting times, where you must interpret the number rather than merely compute it.
四分位数其实就是 25%、50% 和 75% 处的百分位数。若某值处于第 90 百分位数,则约 90% 的数据小于它。在涉及反应时间、考试成绩或等候时间的应用题中,这种表述非常关键,你必须解释该数字的实际含义,而不只是算出它。
6. Outliers and the 1.5 × IQR Rule | 异常值与 1.5 × IQR 法则
An outlier is a value that is unusually far from the rest of the data. In Edexcel A-Level Mathematics the standard test uses fences built from the IQR. A value is an outlier if it lies outside the fences below.
异常值是明显远离其余数据的取值。在爱德思 A-Level 数学中,标准检验方法是用四分位距构造围栏。若数值落在下列围栏之外,就判定为异常值。
Lower fence = Q₁ − 1.5 × IQR | Upper fence = Q₃ + 1.5 × IQR
es are sometimes called extreme outliers and may be plotted differently. On the diagram, an outlier is drawn as a cross beyond the whisker, and the whisker is then shortened to the most extreme value that is still inside the fences. Never extend a whisker to an outlier.
与四分位数距离超过 3 × IQR 的值有时称为极端异常值,可用不同方式标出。在图上,异常值用须线之外的叉号表示,须线则缩短到仍位于围栏之内最极端的数据。绝不要把须线延伸到异常值上。
- Step 1: find Q₁, Q₃ and IQR. — 第一步:求出 Q₁、Q₃ 与 IQR。
- Step 2: compute both fences. — 第二步:算出上下两条围栏。
- Step 3: compare only the extreme values with the fences; a value is either inside or outside. — 第三步:把最极端的值与围栏比较;数值要么在围栏内,要么在外。
- Step 4: state the conclusion with the numerical comparison, e.g. "45 > 40.5, so 45 is an outlier". — 第四步:用数值比较给出结论,例如"45 > 40.5,故 45 是异常值"。
7. Reading Skewness from a Box Plot | 从箱线图判断偏态
The shape of a box plot tells you about the shape of the distribution. If the median line is roughly central in the box and the whiskers are of similar length, the distribution is approximately symmetric. Symmetric distributions also have the mean close to the median.
箱线的形状能反映分布的形状。若中位数线大致位于箱体中央,且两侧须线长度相近,则分布近似对称。对称分布的平均数也接近中位数。
If the median is closer to Q₁ and the upper whisker is longer, the distribution is positively skewed: the data has a long tail of large values. If the median is closer to Q₃ and the lower whisker is longer, the distribution is negatively skewed, with a tail of small values. Longer whiskers always point towards the tail.
若中位数偏向 Q₁ 一侧且上须线更长,则分布为正偏态,即存在一条大数值的长尾。若中位数偏向 Q₃ 一侧且下须线更长,则分布为负偏态,即存在一条小数值的尾部。须线更长的一侧总是指向尾部方向。
In a positive skew the mean is usually greater than the median; in a negative skew the mean is usually less than the median. This link between mean, median and skew is a frequent source of multiple-choice and "comment on the shape" questions.
正偏态中平均数通常大于中位数,负偏态中平均数通常小于中位数。平均数、中位数与偏态之间的这种联系是选择题和"评价分布形状"类问题的常考点。
8. Comparing Two or More Distributions | 比较两个或多个分布
Comparison questions are marked on structure. Compare an average first (median against median), then compare spread (IQR against IQR, or range against range), then compare outliers and shape, and finally interpret each comparison in the context of the question. Never write "box plot A is bigger" — always say bigger in what respect.
比较类题目按结构给分。先比较平均水平(中位数对中位数),再比较离散程度(四分位距对四分位距,或极差对极差),接着比较异常值与形状,最后结合题目情境解释每一项比较。不要写"图 A 更大",一定要说明在哪一方面更大。
| Statistic | Class A | Class B | Comparison |
| Median | 62 | 71 | B is typically higher |
| IQR | 9 | 22 | B is more variable |
| Range | 40 | 58 | B has a wider overall spread |
A strong answer reads like this: the median of B is higher, so students in B scored higher on average; the IQR of B is larger, so B's scores are more spread out in the middle 50%; and B has an outlier, so its range overstates the typical spread. That is three comparisons plus a consequence, exactly what the mark scheme rewards.
高分答案的写法是:B 的中位数更高,说明 B 班学生平均得分更高;B 的四分位距更大,说明 B 班中间 50% 的成绩更分散;B 存在异常值,因此其极差高估了典型离散程度。这就是三条比较加一条推论,正是评分标准所要的。
9. Box Plots vs Histograms and Cumulative Frequency Graphs | 与直方图、累积频率图的对比
All three diagrams summarise the same data, but they answer different questions. A histogram shows the shape and any gaps or clusters; a cumulative frequency graph shows how the total builds up and is used to read quartiles; a box plot compresses everything into five values so several groups can be compared at a glance.
三种图形概括的是同一批数据,但回答的问题不同。直方图展示形状以及可能存在的空档或聚集;累积频率图展示累计过程,用于读取四分位数;箱线图把一切压缩为五个数值,便于一眼比较多个组。
| Diagram | Best for | 中文说明 |
| Histogram | Shape, modes, gaps, class widths | 形状、众数、空档、组距 |
| Cumulative frequency | Reading quartiles and percentiles from grouped data | 从分组数据读取四分位数与百分位数 |
| Box plot | Comparing several distributions quickly | 快速比较多个分布 |
For grouped continuous data, quartiles are read from a cumulative frequency curve by finding n ÷ 4, n ÷ 2 and 3n ÷ 4 on the cumulative frequency axis and reading down to the horizontal axis. Notice this is a different convention from the (n + 1) ÷ 4 position rule used for listed data, so always check whether the data is given raw or grouped.
对于分组的连续数据,四分位数从累积频率曲线上读取:在累积频率轴上找到 n ÷ 4、n ÷ 2 与 3n ÷ 4,再向下对应到横轴。注意这与原始数据所用的 (n + 1) ÷ 4 位置法则不同,因此必须看清题目给的是未分组数据还是分组数据。
10. Worked Example | 例题精讲
Q₁ is at the 3.25th value, the median is at the 6.5th value and Q₃ is at the 9.75th value.
考虑这十二个观测值:12, 14, 15, 17, 18, 19, 21, 22, 24, 26, 31, 45。这里 n = 12,因此 Q₁ 位于第 3.25 个值,中位数位于第 6.5 个值,Q₃ 位于第 9.75 个值。
Q₁ = 15 + 0.25 × (17 − 15) = 15.5 | Q₂ = (19 + 21) ÷ 2 = 20 | Q₃ = 24 + 0.75 × (26 − 24) = 25.5
; 40.5, the value 45 is an outlier and must be plotted as a cross; the upper whisker stops at 31. The five-number summary for the plot is therefore 12, 15.5, 20, 25.5 and 31, with one outlier at 45.
因此 IQR = 25.5 − 15.5 = 10。围栏为 Q₁ − 1.5 × IQR = 15.5 − 15 = 0.5 以及 Q₃ + 1.5 × IQR = 25.5 + 15 = 40.5。由于 45 > 40.5,数值 45 是异常值,必须用叉号标出,上须线止于 31。故绘图所用的五数综合为 12、15.5、20、25.5 和 31,另有异常值 45。
You can also comment on shape: the median 20 is slightly
更多咨询请联系16621398022(同微信)

或截图后用「扫一扫 → 相册」选择本图