## What is a Box Plot?

A box plot, sometimes called a box and whisker plot, provides a snapshot of your continuous variable’s distribution. They particularly excel at comparing the distributions of groups within your dataset. A box plot displays a ton of information in a simplified format. Analysts frequently use them during exploratory data analysis because they display your dataset’s central tendency, skewness, and spread, as well as highlighting outliers.

Box plots truly shine when comparing data distributions across different groups. Their compact design offers a neat summary of data, making it a breeze to compare distributional properties of the groups through the positioning of box and whisker markings.

Use a box plot to compare distributions when you have a categorical grouping variable and a continuous outcome variable. The levels of the categorical variables form the groups in your data, and the researchers measure the continuous variable. These graphs are often precursors to hypothesis tests, such as 2-sample t-tests and ANOVA.

When you’re assessing one distribution, use a histogram because it offers a more detailed view. For more information, see Using Histograms to Understand Your Data.

**Related post**: Data Types

## Anatomy of a Box and Whisker Plot

Instead of displaying the raw data points, a box and whisker plot takes your sample data and presents ranges of values based on quartiles using boxes and lines. Additionally, they display outliers using asterisks that fall outside the whiskers. Learn more about Quartiles: Definition, Finding & Using.

Box plots display the five-number summary. This summary includes five key data points:

- The smallest number (minimum)
- The first quartile (25% mark)
- The middle number (median)
- The third quartile (75% mark)
- The largest number (maximum)

Together, these five values highlight your data’s distribution’s shape, spread, and central tendency. All these measures are nonparametric and do not make assumptions about the data distribution. This aspect makes a box and whisker plots especially suitable for the early stages of analysis.

This graph works by breaking your data down into quartiles. When your sample size is too small, the quartile estimates might not be meaningful. Consequently, these plots work best when you have at least 20 data points per group.

Let’s look at the anatomy of a box plot before getting to an example. Notice how it divides your data into quarters—at least approximately because the upper and lower whiskers do not include outliers, which the chart displays separately.

The image below shows how a box and whisker plot compares to the probability distribution function for a normal distribution. The box itself is the interquartile range, which contains 50% of your data. Additionally, notice how each whisker contains 24.65% of the distribution rather than an exact 25%. Box plots consider the observations beyond the whiskers to be outliers.

Learn more about outliers, including how a box and whisker plot detects them, in my post 5 Ways to Find Outliers in Your Data.

## How to Read a Box Plot

A box and whisker plot allows you quickly assess a distribution’s central tendency, variability, and skewness. Let me show you how!

### Central Tendency

To compare central tendencies in a box plot, use the median line and the overall vertical placement of the boxes.

In the graph below, Group A has a higher median line than Group B. Indeed, it’s easy to see that Group A’s entire distribution is shifted upwards relative to Group B. However, Group A’s lower quartile overlaps with Group B’s upper quartile.

**Related posts**: Measures of Central Tendency and Median: Definition and Uses

### Variability

To assess variability in a box and whisker plot, remember that half your data for each group falls within the interquartile box. The longer the box and whiskers, the greater the variability of the distribution. The total length of the whiskers represents the range of the data.

In the plot below, Group 2 has more variability than Group 1 because it has a longer box and whiskers. Group 1 ranges from approximately 3 to 7 while Group 2 ranges from roughly 1.5 to 9

Learn more about Measures of Variability.

### Skewness

To determine whether a distribution is skewed in a box plot, look at where the median line falls within the box and whiskers.

You have a symmetrical distribution when the box centers approximately on the median line, and the upper and lower whiskers are about equal length. If the two sides are not roughly equivalent, your distribution is skewed.

It’s a right-skewed distribution when the median is closer to the box’s lower values and the upper whisker is longer. Notice how the long tail extends into the higher values in the box and whisker plot below, making it positively skewed.

It’s a left-skewed distribution when the median is closer to the box’s higher values, and the lower whisker is longer. Notice that the long tail extends towards the lower values, making it negatively skewed.

Learn more about Skewed Distributions.

## Box Plot Example: Comparing Groups

Let’s combine all we’ve learned about box plots and compare four groups in this example.

Suppose we have four groups of test scores and we want to compare them by teaching method. To create this graph yourself, download the CSV data file: Boxplot. Teaching method is our categorical grouping variable and Score is the continuous outcome variable that the researchers measured.

Method 1 and 2 have nearly identical medians, but Method 1 has somewhat more variability. The second method also has a high outlier that we should investigate. Method 3 has the highest variability in scores and is potentially left-skewed. Method 4 has the highest median.

Susie says

Hello and thanks! This is all beautifully explained. However…I’m having trouble producing the actual graphs with my data, which has counts of sea snails (continuous variables) on two types of seaweed categorical variables).

Do you have instructions for this (I’m using Excel in MS Office 365) or can you point me to smile instruction website/video?

I will certainly be citing this site in my course report.

Thales says

Hello, nice article. Since box plot is a non parametric test, must I not relate it to p value?

This is a good content and I will be able to discuss better my results in my dissertation. Thanks.

Jim Frost says

Hi Thales,

Yes, if you want to test a pattern you see in any graph to see if it exists in a population, you need to use a hypothesis test (and have a representative sample). Boxplots primarily compare group medians, so one of those non-parametric tests would be a good one. Although, be aware that those tests only assess medians when the group distributions all have the same shape. An alternative would to use a bootstrap method when they have different shapes.

Even though you’re using a boxplot, you might still want to test medians with ANOVA if it better represents the center of your distributions. You’re not looked into using non-parametric tests.

Barry Lloyd says

Hi Jim, I have come across a data set (N=72) that rejects the Null hypothesis in a mintab normality test but the whiskers on it’s boxplot are of equal length (showing no skewness) and therefore the data should be of Normal Distribution?

Jim Frost says

Hi Barry,

There are several potential things going on here.

First, not all symmetric distributions are normal. For example, the Cauchy and Laplace distributions are symmetric but non-normal. A distribution can be symmetric but have too many or two few observations in the tail to be normal. See Kurtosis for details.

So, it’s possible that your data fit a different symmetrical distribution.

Alternatively, your data might have trivial deviations from the normal distribution that the test has sufficient power to detect. You don’t have a huge sample size so that’s less of a problem.

I’d recommend the following:

Graph your data in a histogram to visualize its distribution. That’ll give you a better picture than the boxplot.

In Minitab’s normality test, look at the Probability Plot and see if the data points generally follow the straight line. If so, your data follow a normal distribution despite the p-value. I write about this in my post about QQ Plots, which are the same idea as probability plots.

Sheila says

Hi thanks for this , however I have an assignment and I am quite confused on this , I have data from a mop up vaccination for 25 person for 5 local government across 5 different primary health care

Using summary statistics and appropriate presentation show the performance across the 5 phc

Would you consider I use a box plot for this?

However I always thought box plot was for continuous data.

Jim Frost says

Hi Sheila,

Yes, for boxplots you should have a continuous outcome variable divided into groups. I can’t tell what your data are like so I’m not sure if a boxplot is a good choice. A boxplot would allow you to compare the 5 primary health care providers but you’d need to be comparing some type of continuous variable.

Badmus Yetunde says

Hi

The last example given above is not clear regarding teaching method 4, why does method 4 have the highest median value

Jim Frost says

Hi,

If you refer to the Anatomy of a Boxplot section in this post, you’ll see that the horizontal line within the box represents the median. In the final example, that horizontal line is the furthest up on the Y-axis for Method 4. Hence, Method 4 has the highest median.

WKBN Prame says

Can I get better results by transforming data to normality before making the Tukey’s Box Plot and then back calculating?

Jim Frost says

Hi,

It’s important to stay close to your original data to really understand its distribution. I recommend creating a regular box plot with untransformed data. It’s a great tool for the initial exploration of your data. See it how it is. A normal box plot also finds outliers using an approach that doesn’t depend on the normal distribution.