{
  "id": "box-plot",
  "title": "Box Plot",
  "lang": "en",
  "source_lang": "en",
  "summary": "A box plot summarizes numerical data through quartiles, a median, whiskers, and, in many conventions, separately marked extreme observations.",
  "category": "mathematics",
  "subcategory": "probability-statistics",
  "type": "concept",
  "aliases": [
    "Box-and-whisker plot",
    "Box-and-whisker diagram",
    "Boxplot"
  ],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/box-plot/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/box-plot/",
      "json": "https://aiwiki.page/zh/box-plot.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "A box plot is a statistical graphic that summarizes the location, spread, and selected features of numerical data using a box, a line marking the median, and extensions called whiskers. The box usually spans the lower and upper quartiles, enclosing approximately the middle half of the observations. Whisker definitions vary: they may extend to the minimum and maximum or to the most extreme observations within specified limits, with observations beyond those limits plotted individually. Box plots are especially useful for comparing distributions across groups."
    },
    {
      "heading": "Components and construction",
      "text": "A box plot represents data along a numerical axis, either vertically or horizontally. Its main components are:\n\n- Lower edge of the box: the first quartile, \\(Q_1\\), corresponding to the 25th percentile.\n- Line inside the box: the second quartile, \\(Q_2\\), or median, corresponding to the 50th percentile.\n- Upper edge of the box: the third quartile, \\(Q_3\\), corresponding to the 75th percentile.\n- Whiskers: lines extending from the box to endpoints defined by the plotting convention.\n- Separate points: observations beyond the whiskers, when the chosen convention distinguishes them.\n\nQuartiles are particular quantiles. The box length is the interquartile range:\n\n\\[\\operatorname{IQR}=Q_3-Q_1.\\]\n\nThe IQR describes the spread of the central half of the data. Unlike the full range, it is not directly determined by the smallest and largest observations.\n\nSample quartiles do not have a single universally adopted computational definition. Methods differ in how they locate fractional ranks, interpolate between observations, and handle the median when dividing a sample into halves. Tukey’s original construction used hinges, which are closely related to quartiles but do not coincide with every modern quartile convention. Consequently, different software packages can produce slightly different boxes and whiskers from the same data, especially for small samples.\n\nThe 1.5-IQR convention\n\nA widely used construction defines two inner fences:\n\n\\[L=Q_1-1.5\\operatorname{IQR}, \\qquad U=Q_3+1.5\\operatorname{IQR}.\\]\n\nThe lower whisker ends at the smallest observed value at or above \\(L\\), and the upper whisker ends at the largest observed value at or below \\(U\\). Observations outside these fences are drawn separately.\n\nThe fences are numerical thresholds, not usually the whisker endpoints themselves. A whisker normally ends at an actual observation rather than exactly \\(1.5\\operatorname{IQR}\\) from the box.\n\nSome implementations also distinguish observations beyond the outer fences,\n\n\\[Q_1-3\\operatorname{IQR} \\quad\\text{and}\\quad Q_3+3\\operatorname{IQR},\\]\n\nusing a different symbol.\n\nOther whisker conventions\n\nOther box plots extend whiskers to:\n\n- the sample minimum and maximum;\n- specified percentiles, such as the 5th and 95th percentiles;\n- endpoints determined by a specialized rule.\n\nThe whisker definition therefore belongs in the figure caption or accompanying documentation. The name “box plot” alone does not uniquely specify it."
    },
    {
      "heading": "Worked example",
      "text": "Consider the ordered observations\n\n\\[1,\\;2,\\;3,\\;4,\\;5,\\;6,\\;7,\\;8,\\;20.\\]\n\nUsing the median-of-halves method and excluding the overall median from both halves gives\n\n\\[Q_1=2.5,\\qquad Q_2=5,\\qquad Q_3=7.5.\\]\n\nThus,\n\n\\[\\operatorname{IQR}=5,\\]\n\nand the inner fences are\n\n\\[L=-5,\\qquad U=15.\\]\n\nUnder the 1.5-IQR convention, the box extends from \\(2.5\\) to \\(7.5\\), the median line lies at \\(5\\), and the whiskers end at \\(1\\) and \\(8\\). The observation \\(20\\) appears as a separate point. Under a minimum-to-maximum convention, the upper whisker would instead reach \\(20\\)."
    },
    {
      "heading": "Interpretation",
      "text": "Location and spread\n\nThe median indicates the central location of the observations. The box length measures central spread, while the whiskers and separate points provide partial information about the tails.\n\nWhen box plots share a numerical scale, they allow rapid comparisons of:\n\n- differences in medians;\n- differences in interquartile ranges;\n- asymmetry between the lower and upper portions of a distribution;\n- the presence of observations far from the central box.\n\nA box plot does not ordinarily display the sample mean, variance, or standard deviation. Some variants add a mean marker, but it must be distinguished from the median line.\n\nAsymmetry and tails\n\nA median close to one end of the box, or a much longer whisker on one side, can suggest asymmetry. Such features do not fully characterize the underlying distribution, however. Very different distributions can produce identical box plots.\n\nIn particular, a box plot can conceal multiple clusters, gaps, or concentrations within the box. Symmetric-looking boxes and whiskers do not establish that the data follow a normal distribution.\n\nSeparately plotted observations\n\nAn outlier marker identifies an observation that satisfies the plotting rule; it does not establish a recording error, measurement failure, or scientifically exceptional event.\n\nFor a normal distribution, the population 1.5-IQR fences lie approximately \\(2.70\\) standard deviations on either side of the mean. About \\(0.7\\%\\) of that distribution lies outside those fences. Actual sample fences vary, and skewed or heavy-tailed distributions can place a much larger proportion of observations beyond them.\n\nThe rule is therefore a descriptive screening convention rather than a universal statistical hypothesis test or a justification for removing observations."
    },
    {
      "heading": "Major variants",
      "text": "Notched box plots\n\nA notched box plot narrows the box around the median. One common approximate notch interval is\n\n\\[Q_2\\pm1.58\\frac{\\operatorname{IQR}}{\\sqrt{n}},\\]\n\nwhere \\(n\\) is the sample size.\n\nThe notches provide an approximate visual guide to uncertainty in the median. Nonoverlapping notches are often interpreted as evidence of a difference between two medians, but their calibration depends on assumptions and implementation. They are not a substitute for a specified inferential procedure. For small samples, notches may extend beyond the box.\n\nA confidence interval for the median obtained through bootstrap sampling can instead be displayed with an explicitly stated method.\n\nVariable-width box plots\n\nIn a variable-width box plot, box width represents group size, often in proportion to \\(\\sqrt{n}\\). Ordinary equal-width boxes do not encode the number of observations. The relationship between width and sample size must be stated because conventions differ.\n\nCombined displays\n\nBox plots may be overlaid with individual observations or combined with a violin plot, which displays an estimated distributional shape. These combinations retain the median-and-quartile summary while revealing features hidden by a conventional box plot."
    },
    {
      "heading": "History and applications",
      "text": "John W. Tukey developed and popularized the modern box-and-whisker display as part of exploratory data analysis. His 1977 book Exploratory Data Analysis helped establish its widespread use. Earlier statistical graphics had also represented ranges and quantile-based summaries, so the modern box plot belongs to a longer history of graphical description.\n\nBox plots are used in scientific research, engineering, education, economics, and quality monitoring. Their compact form makes them particularly effective for displaying many groups side by side—for example, measurements from different production lines, experimental treatments, or time periods.\n\nGrouped box plots describe observed differences but do not establish their causes. Their interpretation depends on sampling, experimental design, and whether observations are independent or related."
    },
    {
      "heading": "Limitations and reporting considerations",
      "text": "The compactness of a box plot comes at the cost of information:\n\n- Distributional detail is suppressed. A histogram or a display of individual observations can reveal modes and gaps that quartiles cannot.\n- Sample size may be invisible. Identical boxes can represent a handful of observations or thousands.\n- Small samples give unstable summaries. Quartile conventions can materially affect the display.\n- Ties and discrete values can collapse the box. If \\(Q_1=Q_3\\), the IQR is zero, and the standard fence rule may flag every observation unequal to that common value.\n- Overlapping points can hide counts. Several observations outside a fence may appear as a single marker.\n- Axis transformations affect interpretation. Computing fences on the original scale and then displaying a logarithmic axis is not equivalent to computing fences after logarithmic transformation.\n- Overlap is not an inferential test. Overlapping boxes do not establish equal distributions, and separated boxes do not by themselves quantify statistical uncertainty.\n\nA reproducible description specifies the quartile method, whisker rule, meaning of additional symbols, sample sizes, and any transformations. Comparisons across panels also require attention to whether their numerical scales are shared."
    }
  ],
  "links": [
    "median",
    "quantile",
    "interquartile-range",
    "sample-mean",
    "variance",
    "standard-deviation",
    "probability-distribution",
    "normal-distribution",
    "statistical-hypothesis-testing",
    "sample-size",
    "confidence-interval",
    "bootstrap-sampling",
    "exploratory-data-analysis",
    "experimental-design",
    "histogram"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}