Skip to main content
Copertina articolo: Boxplot data analysis: How to read the chart
Articles/Tutorial

Boxplot data analysis: How to read the chart

/

In 2007 Roland Fryer published a study showing how candidates with “Afro-American” names received 50% less calls than candidates with “white” names. But what many did not highlight was the difference in the distribution of calls, not only in the average. The boxplot used by Fryer revealed that candidates with “Afro-American” names had a more compressed distribution and almost completely lacked calls from high-quality companies.

This example explains why the boxplot is basic: it does not replace the average, but shows what the average hides, that is the form of distribution, the concentration of values and the presence of anomalies. Two groups can have the same average but completely different distributions, and the boxplot makes it evident.

Anatomy of a boxplot: element by element

Invented by John Tukey in 1970, the boxplot is a tool to explore the data before confirming it. Consider the delivery times of 100 orders of an e-commerce:

Each element has a precise meaning:

ItemStatistical definitionPractical significance
Median50th percentileThe real central point: half of orders arrive before this time
Q125° percentile25% of the fastest orders arrive within this time
Q375th percentile75% of orders arrive within this time
IQRQ3 - Q1Variability of typical values, excluding extremes
Lower moustacheQ1, 1.5 × IQRLower limit of normal
Upper moustacheQ3 + 1.5 × IQRUpper limit of normal
OutlierValues beyond the mustacheAnomalies That Deserve Attention

The mustache formula includes 99.3% of the values for a normal distribution.

A concrete example: e-commerce delivery times

An e-commerce with deliveries from 1 to 25 days shows a boxplot with median to 5 days, IQR from 3 to 8 days and outlier to 25 days. The average alone, for example 6 days, does not catch asymmetric distribution and important outliers that the boxplot makes evident.

Read each element: detailed in-depth

Quartiles

Quartles divide data into four equal parts, with the median representing the central value. The median is preferable to the mean when there are outliers that strongly affect it.

Interquartile interval (IQR)

The IQR measures the variability of the central data, excluding the 25% lower and 25% higher. A small IQR indicates consistency, a large one indicates high variability.

Mustache

Mustache delimites the “normal” range of data according to the Tukey formula. Values beyond mustache are rare and deserve attention.

Outlier

Outliers represent special cases to be investigated: orders in remote areas, exceptionally long customer service responses or very high purchases. They are not noise to ignore but opportunities or problems to analyze.

Why the boxplot beats the average: the quartet of anscombe

Francis Anscombe in 1973 showed four datasets with the same descriptive statistics but completely different distributions, demonstrating that the average and other summary statistics can deceive without visualization.

Example of two departments

Two departments with identical average sales (100 euros) can have very different distributions: one stable and predictable, the other with large oscillations and outliers. The boxplot makes this difference evident, basic for planning.

Boxplot vs. histogram vs. violin plot

DisplayBest useProsAgainst
BoxplotComparison between 5-20 distributionsCompact, show clearly outlierHide the full form
HistogramAnalysis of 1-2 distributionsShow Detailed ShapeDifficult multiple comparison
Violin PlotCombine boxplot and histogramShow shape and quartileMore complex visually
Density PlotVery smooth continuous dataElegant, naturalLess precise on outliers

If you have to compare multiple groups use boxplot, to understand the shape of a single distribution use histogram, for the best of the two worlds violin plot.

How to create boxplot in python

Base with matplotlib

One example shows three marketing channels with different distributions. Email marketing presents a bimodal distribution that the average does not represent well, but the boxplot clearly reveals it.

Advanced with seaborn

With a more realistic dataset, Seaborn allows you to create colored boxplots with overlapping points to see the real distribution, useful for discovering hidden structures.

Boxplot in SQL: calculate quartile with window functions

You can calculate quartiles, IQR, mustache and count outliers directly in SQL using functions such as PERCENTILE_CONT, allowing automatic and updated dashboards.

5 patterns to recognize immediately

  1. Tight box: concentrated data, stable and predictable process. 2. Wide box: high variability, unpredictable process. 3. Non-centered median: asymmetrical distribution, misleading mean. 4. Many outliers: cases to investigate, opportunities or problems. 5. Comparative boxplot: show median changes and variability.

When to use the boxplot

Use when…Avoid when…
Group ComparisonsSmall samples, fewer than 20 per group
Outlier CirclesTime trend monsters
Continuous distribution analysisCategoric data
Suspected differences not evident in the meanNon-family audience with statistical graphs

For non-technical audiences, prefer histograms or bar charts, for analytical teams use boxplot.

Three immediate applications in business

  • Customer service response time: identify agents with inconsistent performance and outliers to investigate., AOV distribution: segment by channel to understand hidden differences from the media., Performance sellers: distinguish stable sellers from volatile ones for targeted interventions.

The basic lesson

Viewing data is an integral part of the analysis. The boxplot is the simplest and most useful tool to reveal the hidden structure behind the average. Before accepting an average, always ask to see the boxplot.

Relationship with the ginnytech course

To learn more, visit the modules Matthematic Data Analysis and Marketing Analysis that explain quantiles, percentili and practical applications.

The point the boxplot reveals the true structure of the data, helping you make more informed decisions under uncertainty. don’t stop at the average: the boxplot shows you what really matters.

Related articles

Statistically valid online surveys: Practical guide
February 28, 20261 min read
Read
SQL for marketing: 15 query templates ready to use
February 28, 20261 min read
Read