Skip to main content
← Back to B Definitions

Box plot

What Is a Box Plot?

A box plot, also known as a box-and-whisker plot, is a graphical representation used in descriptive statistics to visualize the distribution of numerical data. It provides a concise summary of a dataset based on its quartiles, the median, and extreme values, offering insights into the data's central tendency, spread, and skewness. This method of data visualization is a fundamental tool within statistical analysis for quickly understanding data characteristics. The box plot is especially useful for comparing distributions across multiple groups or datasets.

History and Origin

The concept of graphically representing data spread has precursors, but the modern box plot as it is widely known today was popularized by American mathematician and statistician John W. Tukey. Tukey introduced the box-and-whisker plot as a tool in exploratory data analysis in 1970 and formally published it in his influential 1977 book, Exploratory Data Analysis. His work significantly contributed to the adoption of the box plot as a standard statistical graphic.8,, While Mary Eleanor Spear introduced a "range-bar" method in 1952 that included the interquartile range, Tukey's systematic approach and emphasis on exploratory data analysis solidified the box plot's prominence in the field.7

Key Takeaways

  • A box plot graphically displays the five-number summary of a dataset: minimum, first quartile (Q1), median, third quartile (Q3), and maximum.
  • The central box represents the middle 50% of the data, defined by the interquartile range (IQR).
  • Whiskers extend from the box to indicate the variability outside the quartiles, typically to the minimum and maximum values within a defined range, with individual points often marking outliers.
  • Box plots are effective for quickly assessing data dispersion, identifying potential outliers, and comparing data distributions across different groups.
  • They are non-parametric, meaning they do not assume an underlying statistical distribution for the data.

Formula and Calculation

The construction of a box plot relies on calculating five key values from a dataset, known as the "five-number summary." These are:

  1. Minimum Value: The smallest observation in the dataset, excluding outliers.
  2. First Quartile (Q1): The value below which 25% of the data falls. It is the median of the lower half of the dataset.
  3. Median (Q2): The middle value of the dataset, dividing it into two equal halves. Also known as the 50th percentile.
  4. Third Quartile (Q3): The value below which 75% of the data falls. It is the median of the upper half of the dataset.
  5. Maximum Value: The largest observation in the dataset, excluding outliers.

The interquartile range (IQR) is a crucial component for defining the "whiskers" and identifying outliers:

[
\text{IQR} = Q3 - Q1
]

Outliers are typically defined as values that fall below (Q1 - 1.5 \times \text{IQR}) or above (Q3 + 1.5 \times \text{IQR}). The whiskers of the box plot extend to the most extreme data points that are not considered outliers.6,5

Interpreting the Box Plot

Interpreting a box plot involves understanding what each component communicates about the data distribution. The box itself represents the middle 50% of the data, providing a visual sense of its concentration. A longer box indicates greater spread in the central portion of the data, while a shorter box suggests more tightly clustered data around the median.

The position of the median line within the box indicates the skewness of the data. If the median is closer to Q1, the upper half of the data has a wider spread, suggesting a positive skew. Conversely, if it's closer to Q3, the lower half is more spread out, indicating a negative skew. The length of the whiskers also offers clues about the range and overall variability of the data beyond the central fifty percent. Points plotted individually outside the whiskers represent potential outliers, which may warrant further investigation. The National Institute of Standards and Technology (NIST) describes box plots as an excellent tool for conveying location and variation information in datasets.4

Hypothetical Example

Consider a hypothetical dataset of annual investment returns (in percentage) for a particular fund over 20 years:

Data: 2.1, 3.5, 4.0, 4.2, 4.5, 5.0, 5.1, 5.3, 5.5, 5.8, 6.0, 6.2, 6.5, 6.8, 7.0, 7.2, 7.5, 8.0, 9.0, 15.0

To construct a box plot:

  1. Order the Data: (Already ordered) 2.1, 3.5, 4.0, 4.2, 4.5, 5.0, 5.1, 5.3, 5.5, 5.8, 6.0, 6.2, 6.5, 6.8, 7.0, 7.2, 7.5, 8.0, 9.0, 15.0 (n=20)
  2. Find the Median (Q2): The average of the 10th and 11th values: ((5.8 + 6.0) / 2 = 5.9).
  3. Find Q1: The median of the lower half (first 10 values): ((4.5 + 5.0) / 2 = 4.75).
  4. Find Q3: The median of the upper half (last 10 values): ((7.0 + 7.2) / 2 = 7.1).
  5. Calculate IQR: (7.1 - 4.75 = 2.35).
  6. Determine Outlier Fences:
    • Lower fence: (4.75 - (1.5 \times 2.35) = 4.75 - 3.525 = 1.225)
    • Upper fence: (7.1 + (1.5 \times 2.35) = 7.1 + 3.525 = 10.625)
  7. Identify Whiskers and Outliers:
    • Minimum (non-outlier): 2.1 (since 2.1 > 1.225)
    • Maximum (non-outlier): 9.0 (since 9.0 < 10.625)
    • Outlier: 15.0 (since 15.0 > 10.625)

The box plot would show a box from 4.75 to 7.1, with a median line at 5.9. The lower whisker would extend to 2.1, and the upper whisker to 9.0. A distinct point would be plotted at 15.0, indicating an outlier. This visual would immediately show that most returns fall between 4.75% and 7.1%, with a central tendency around 5.9%, and one significantly higher return.

Practical Applications

Box plots have diverse practical applications in finance and economics for financial data analysis:

  • Comparing Investment Performance: Analysts use box plots to compare the historical returns or volatility of different investment vehicles, such as stocks, bonds, or mutual funds. A box plot can quickly illustrate which asset class has a higher median return, greater risk management characteristics (as indicated by IQR), or more extreme outliers.
  • Market Performance Analysis: They can visualize daily price changes or trading volumes over different periods, revealing trends or anomalies in market performance.
  • Income Distribution: Economic researchers and policymakers often use box plots to analyze income or wealth distribution within a population, helping to identify disparities and track changes in economic inequality. The Organisation for Economic Co-operation and Development (OECD) provides extensive data on income inequality, which can be effectively visualized using box plots.3
  • Risk Assessment: In risk modeling, box plots can summarize the distribution of potential outcomes from simulations, aiding in understanding the range of possible losses or gains.

Limitations and Criticisms

While box plots are powerful for summarizing key statistical features, they also have limitations:

  • Loss of Detail: A box plot condenses a large amount of information into a few summary statistics, which can obscure the shape of the underlying data distribution. For instance, a bimodal or multimodal distribution (data with two or more peaks) would appear as a single box, potentially misleading the interpreter.2
  • Sample Size Sensitivity: The appearance and interpretation of a box plot can be sensitive to the size of the dataset, particularly regarding the identification of outliers.
  • Difficulty with Skewed Data: While they indicate skewness, for highly skewed datasets, parallel box plots might present challenges in accurate interpretation, as the medians could align even with vastly different distributions.1
  • Non-Uniqueness: Different datasets can produce identical box plots if their five-number summaries are the same, even if their internal data points vary significantly.

Box Plot vs. Histogram

Both box plots and histograms are fundamental tools for visualizing data distribution, but they serve different primary purposes and offer distinct insights.

A box plot excels at providing a compact, five-number summary of a dataset, making it ideal for comparing the central tendency, spread, and presence of outliers across multiple groups side-by-side. It clearly delineates the median, quartiles, and the overall range, which is particularly useful in comparative analyses where quick identification of differences in spread and location is needed.

In contrast, a histogram provides a more detailed view of the shape of the distribution, showing the frequency or count of data points within specified bins. It is superior for revealing underlying patterns such as modality (unimodal, bimodal), the presence of gaps in the data, or the exact nature of the skewness. However, comparing multiple datasets using histograms can become visually cluttered, especially with many groups. While a box plot masks some granular details for brevity, a histogram offers a complete picture of data density at the expense of simplicity for direct comparisons.

FAQs

What is the primary purpose of a box plot?

The primary purpose of a box plot is to visually summarize the distribution of a dataset through its five-number summary, allowing for a quick understanding of its central tendency, spread, and the presence of outliers.

What do the "whiskers" on a box plot represent?

The "whiskers" typically extend from the box to the minimum and maximum data points that are not considered outliers. They indicate the variability of the data outside the central 50%, providing a visual representation of the overall range of the non-outlying data.

Can a box plot identify outliers?

Yes, a key feature of a box plot is its ability to visually identify potential outliers. Data points that fall beyond the calculated whisker boundaries (usually (1.5 \times \text{IQR}) from the quartiles) are plotted individually, making them stand out as unusually high or low values.

How does a box plot show skewness?

A box plot indicates skewness by the position of the median line within the box and the relative lengths of the whiskers. If the median is closer to one end of the box or one whisker is significantly longer than the other, it suggests that the data is skewed in that direction.

When should I use a box plot instead of a histogram?

Use a box plot when you need to quickly compare the distributions of several datasets, especially focusing on their medians, interquartile ranges, and outliers. Use a histogram when you want a more detailed view of a single dataset's distribution shape, including its modality and the frequency of values within specific ranges.