Box Plots: Complete Guide with Solved Exercises

Master box plots: construction, interpretation, comparison, and analysis of quantitative data through 5 detailed exercises with comprehensive solutions.

Solution: Exercises 1 to 3
1 Basic Box Plot Construction
Exercise 1
Construct a box plot for the following data set representing test scores: 78, 82, 85, 88, 90, 92, 94, 96, 98, 100, 75, 80, 83, 87, 89
Definition:

Box plot (box-and-whisker plot): A graphical representation showing the five-number summary: minimum, Q1, median, Q3, and maximum

Construction Method:
  1. Sort the data in ascending order
  2. Find the five-number summary (Min, Q1, Med, Q3, Max)
  3. Calculate the interquartile range (IQR)
  4. Determine whisker boundaries and outliers
  5. Draw the box plot with appropriate scale
Step 1: Sort the data

Raw data: 78, 82, 85, 88, 90, 92, 94, 96, 98, 100, 75, 80, 83, 87, 89

Sorted data: 75, 78, 80, 82, 83, 85, 87, 88, 89, 90, 92, 94, 96, 98, 100

Total values: 15

Step 2: Calculate the five-number summary

Minimum: 75 (smallest value)

Maximum: 100 (largest value)

Median (Q2): Position = (15+1)/2 = 8th value = 88

Q1: Median of lower half (positions 1-7): 4th value = 82

Q3: Median of upper half (positions 9-15): 12th value = 94

Step 3: Calculate IQR and check for outliers

IQR = Q3 - Q1 = 94 - 82 = 12

Lower boundary = Q1 - 1.5×IQR = 82 - 1.5×12 = 64

Upper boundary = Q3 + 1.5×IQR = 94 + 1.5×12 = 112

All values (75-100) are within boundaries, so no outliers

Step 4: Draw the box plot
Min: 75
Q1: 82
Med: 88
Q3: 94
Max: 100
Five-number summary: Min=75, Q1=82, Med=88, Q3=94, Max=100
Final Answer:

Five-Number Summary:

Minimum: 75

Q1 (First Quartile): 82

Median (Q2): 88

Q3 (Third Quartile): 94

Maximum: 100

IQR: 12

No outliers detected

Applied Rules:

• Quartile calculation: Q1 at 25% position, Q2 at 50%, Q3 at 75%

• Outlier detection: Values beyond Q1-1.5×IQR or Q3+1.5×IQR

• Box plot structure: Box spans Q1 to Q3 with median line inside

2 Interpreting Box Plots
Exercise 2
Given the box plot with Min=60, Q1=72, Med=78, Q3=85, Max=95, interpret the distribution and calculate the percentage of data between Q1 and Q3.
Statistical Interpretation:

Quartiles: Divide data into four equal parts (25% each)

IQR: Contains the middle 50% of the data

Whiskers: Extend to minimum and maximum non-outlier values

Step 1: Understand the five-number summary

Min = 60: 0% of data is below this value

Q1 = 72: 25% of data is below this value

Med = 78: 50% of data is below this value

Q3 = 85: 75% of data is below this value

Max = 95: 100% of data is below this value

Step 2: Calculate percentage between Q1 and Q3

Between Q1 and Q3 = 75% - 25% = 50%

This is the definition of IQR (interquartile range)

Step 3: Calculate the IQR

IQR = Q3 - Q1 = 85 - 72 = 13

This range contains 50% of the data

Step 4: Analyze distribution shape

Distance from Q1 to Median: 78 - 72 = 6

Distance from Median to Q3: 85 - 78 = 7

Since these are nearly equal, the distribution is approximately symmetric

Step 5: Additional interpretations

Range = Max - Min = 95 - 60 = 35

About 25% of data is between 60-72

About 25% of data is between 85-95

50% of data lies between Q1=72 and Q3=85
Final Answer:

Percentage between Q1 and Q3: 50%

IQR: 13 (range containing middle 50% of data)

Distribution: Approximately symmetric

Range: 35 (from 60 to 95)

Applied Rules:

• Quartile percentages: Q1=25%, Med=50%, Q3=75%

• IQR interpretation: Always contains 50% of data

• Symmetry assessment: Compare distances from median to Q1 and Q3

3 Comparing Data Sets
Exercise 3
Compare the test scores of two classes using box plots:
Class A: Min=65, Q1=70, Med=75, Q3=80, Max=90
Class B: Min=60, Q1=72, Med=78, Q3=85, Max=95
Which class performed better overall?
Comparative Analysis:

Center comparison: Compare medians to assess typical performance

Spread comparison: Compare IQRs to assess variability

Range comparison: Compare min-max ranges for overall spread

Comparison Method:
  1. Calculate IQR for each class
  2. Compare centers (medians)
  3. Compare spreads (IQRs and ranges)
  4. Assess skewness for each distribution
  5. Consider outliers if present
Step 1: Calculate IQR for each class

Class A: IQR = Q3 - Q1 = 80 - 70 = 10

Class B: IQR = Q3 - Q1 = 85 - 72 = 13

Class B has slightly more variability in the middle 50%

Step 2: Compare centers (medians)

Class A median: 75

Class B median: 78

Class B has a higher median, indicating better overall performance

Step 3: Compare full ranges

Class A range: 90 - 65 = 25

Class B range: 95 - 60 = 35

Class B has greater overall variability

Step 4: Assess skewness

Class A: Distance from Q1 to Med: 75-70=5, from Med to Q3: 80-75=5 → Symmetric

Class B: Distance from Q1 to Med: 78-72=6, from Med to Q3: 85-78=7 → Slightly right-skewed

Step 5: Compare top performers

Top 25%: Class A: above 80, Class B: above 85

Maximum scores: Class A: 90, Class B: 95

Class B has higher top performers

Class B performed better overall (median 78 vs 75) but with slightly more variability
Final Answer:

Class B performed better overall with a median score of 78 compared to Class A's 75. However, Class B shows slightly more variability in scores (IQR=13 vs IQR=10). Class B also has higher top performers with scores reaching 95 compared to Class A's maximum of 90.

Applied Rules:

• Center comparison: Higher median indicates better overall performance

• Variability comparison: Larger IQR indicates more spread in the middle 50%

• Skewness assessment: Unequal distances from median indicate skewness

Box Plot Rules and Methods
Min ≤ Q1 ≤ Med ≤ Q3 ≤ Max
Five-Number Summary
Quartiles
Q1=25%, Med=50%, Q3=75%
Divide data into four equal parts
IQR
Q3 - Q1
Middle 50% of data
Outliers
< Q1-1.5×IQR or > Q3+1.5×IQR
Values beyond normal range
Key Definitions:

Box Plot: A standardized way of displaying the distribution of data based on a five-number summary

Quartiles: Values that divide the dataset into four equal parts

IQR: Interquartile range, the range of the middle 50% of the data

Whiskers: Lines extending from the box to show the range of the data excluding outliers

Complete Methodology:
  1. Data sorting: Arrange data in ascending order
  2. Five-number summary: Calculate Min, Q1, Med, Q3, Max
  3. IQR calculation: Q3 - Q1
  4. Outlier detection: Check for values beyond Q1-1.5×IQR or Q3+1.5×IQR
  5. Plot construction: Draw box, whiskers, and outliers
Tip 1: Remember that the box represents the middle 50% of the data regardless of its length.
Tip 2: Outliers are plotted separately as individual points beyond the whiskers.
Tip 3: A longer box indicates greater variability in the middle 50% of data.
Tip 4: Use box plots to compare multiple datasets visually.
Advantages: Shows center, spread, and skewness; identifies outliers; good for comparisons; compact representation.
Limitations: Doesn't show exact data values; may not capture multimodal distributions; less detailed than histograms.
Essential Rules:

• Quartile positions: Q1 at 25%, Median at 50%, Q3 at 75% of sorted data

• Outlier boundaries: Lower = Q1 - 1.5×IQR, Upper = Q3 + 1.5×IQR

• Whisker limits: Extend to furthest non-outlier values

• Box representation: Box spans from Q1 to Q3

• Median line: Divides box at the median value

Solution: Exercises 4 to 5
4 Outlier Detection
Exercise 4
For the data set: 12, 15, 18, 20, 22, 24, 25, 26, 28, 30, 35, 40, 60, determine if there are any outliers and construct the complete box plot.
Outlier Detection:

Outliers: Data points that fall significantly outside the overall pattern of the data, defined as values beyond Q1 - 1.5×IQR or Q3 + 1.5×IQR

Step 1: Sort the data

Sorted data: 12, 15, 18, 20, 22, 24, 25, 26, 28, 30, 35, 40, 60

Total values: 13

Step 2: Calculate the five-number summary

Minimum: 12

Maximum: 60

Median: 7th value = 25

Q1: Median of lower half (12, 15, 18, 20, 22, 24) = (18+20)/2 = 19

Q3: Median of upper half (26, 28, 30, 35, 40, 60) = (30+35)/2 = 32.5

Step 3: Calculate IQR and outlier boundaries

IQR = Q3 - Q1 = 32.5 - 19 = 13.5

Lower boundary = Q1 - 1.5×IQR = 19 - 1.5×13.5 = 19 - 20.25 = -1.25

Upper boundary = Q3 + 1.5×IQR = 32.5 + 1.5×13.5 = 32.5 + 20.25 = 52.75

Step 4: Identify outliers

Any value < -1.25 or > 52.75 is an outlier

Checking: 60 > 52.75, so 60 is an outlier

Outlier identified: 60

Step 5: Determine whisker endpoints

Lower whisker: Minimum non-outlier = 12

Upper whisker: Maximum non-outlier = 40

Outlier (60) will be plotted separately

Outlier detected: 60; Whiskers extend to 12 and 40
Final Answer:

Five-Number Summary (excluding outlier):

Minimum: 12

Q1: 19

Median: 25

Q3: 32.5

Maximum (non-outlier): 40

Outlier: 60

IQR: 13.5

Applied Rules:

• Outlier formula: Values beyond Q1-1.5×IQR or Q3+1.5×IQR

• Whisker endpoints: Extend only to furthest non-outlier values

• Outlier plotting: Represent outliers as individual points beyond whiskers

5 Distribution Analysis
Exercise 5
Analyze the following box plot characteristics: Min=15, Q1=25, Med=30, Q3=40, Max=50. Determine the distribution shape, calculate the percentage of data below 40, and estimate the percentage between 25 and 40.
Distribution Analysis:

Shape determination: Based on relative positions of quartiles and median

Percentile calculations: Using quartile positions to determine data percentages

Step 1: Analyze distribution shape

Distance from Q1 to Median: 30 - 25 = 5

Distance from Median to Q3: 40 - 30 = 10

Since the upper half is larger, the distribution is right-skewed

Step 2: Calculate percentage below Q3 (40)

By definition, Q3 represents the 75th percentile

Percentage below 40: 75%

Step 3: Calculate percentage between Q1 and Q3

Between Q1 (25th percentile) and Q3 (75th percentile)

Percentage between 25 and 40: 75% - 25% = 50%

Step 4: Additional percentiles

Percentage below Median (30): 50%

Percentage below Q1 (25): 25%

Percentage above Q3 (40): 25%

Step 5: Calculate IQR and range

IQR = Q3 - Q1 = 40 - 25 = 15

Range = Max - Min = 50 - 15 = 35

Right-skewed distribution; 75% below 40; 50% between 25 and 40
Final Answer:

Distribution Shape: Right-skewed (upper half longer than lower half)

Percentage below 40: 75%

Percentage between 25 and 40: 50%

IQR: 15

Range: 35

Applied Rules:

• Shape determination: Compare distances from median to Q1 and Q3

• Percentile interpretation: Q1=25%, Med=50%, Q3=75%

• Range calculation: Maximum minus minimum values

Comprehensive Guide: Box Plot Laws, Methods, Rules, and Definitions
Min ≤ Q1 ≤ Med ≤ Q3 ≤ Max
Five-Number Summary
Key definitions:

Box Plot: A standardized way of displaying the distribution of data based on a five-number summary (minimum, first quartile, median, third quartile, and maximum).

Quartiles: Values that divide the dataset into four equal parts, each containing 25% of the data.

Interquartile Range (IQR): The range between the first and third quartiles (Q3 - Q1), representing the middle 50% of the data.

Outliers: Data points that fall significantly outside the overall pattern of the data, typically defined as values beyond Q1 - 1.5×IQR or Q3 + 1.5×IQR.

Complete methodology:
  1. Data sorting: Arrange all data points in ascending order
  2. Five-number summary: Calculate minimum, Q1, median, Q3, and maximum
  3. IQR calculation: Compute Q3 - Q1
  4. Outlier detection: Identify values beyond Q1 - 1.5×IQR or Q3 + 1.5×IQR
  5. Whisker determination: Set whiskers to extend to furthest non-outlier values
  6. Plot construction: Draw box, whiskers, median line, and outliers
Tip 1: To find quartiles, first find the median, then find the median of each half of the data.
Tip 2: The box in a box plot always contains exactly 50% of the data, regardless of its visual size.
Tip 3: If the median is closer to Q1, the distribution is right-skewed; if closer to Q3, it's left-skewed.
Tip 4: Use box plots to compare multiple groups by placing them side by side for easy visual comparison.
Tip 5: The length of the whiskers indicates the spread of the outer 25% of data on each side.
Advantages: Shows center, spread, and skewness simultaneously; identifies outliers; allows for easy comparison between groups; compact and efficient visualization.
Limitations: Doesn't show exact data values; may not capture multimodal distributions; can appear simplistic compared to histograms; doesn't show frequency distribution details.
Applications: Quality control, exploratory data analysis, comparing groups, identifying outliers, preliminary statistical analysis.
Essential formulas and rules:

• Quartile positions: Q1 at (n+1)×0.25, Q2 at (n+1)×0.5, Q3 at (n+1)×0.75

• IQR calculation: Interquartile range = Q3 - Q1

• Outlier boundaries: Lower = Q1 - 1.5×IQR, Upper = Q3 + 1.5×IQR

• Whisker endpoints: Extend to furthest non-outlier values

• Percentile relationships: Q1=25%, Median=50%, Q3=75%

Detailed Summary: Box Plots Mastery Guide
Box Plot = {Min, Q1, Med, Q3, Max}
Core Structure
Comprehensive Definitions:

Box Plot (Box-and-Whisker Plot): A graphical method for depicting groups of numerical data through their quartiles. The box shows the middle 50% of the data, the whiskers extend to show the rest of the distribution, and outliers are plotted separately.

Five-Number Summary: The minimum, first quartile (Q1), median (Q2), third quartile (Q3), and maximum of a dataset. These values completely describe the spread and center of the data.

Quartiles: Three values that divide the sorted data into four equal parts, each containing 25% of the data. Q1 is the median of the lower half, Q2 is the overall median, and Q3 is the median of the upper half.

Interquartile Range (IQR): The difference between the third and first quartiles (Q3 - Q1). It represents the range of the middle 50% of the data and is a measure of statistical dispersion.

Complete Construction Process:
  1. Data Preparation: Sort the data in ascending order and count total observations (n)
  2. Find Median (Q2): If n is odd, median is the middle value; if even, it's the average of two middle values
  3. Find Q1: Median of the lower half of the data (values below the overall median)
  4. Find Q3: Median of the upper half of the data (values above the overall median)
  5. Identify Min and Max: The smallest and largest values in the dataset
  6. Calculate IQR: Q3 - Q1
  7. Detect Outliers: Values below Q1 - 1.5×IQR or above Q3 + 1.5×IQR
  8. Determine Whisker Limits: Whiskers extend to the furthest non-outlier values
  9. Draw the Plot: Create a number line, draw the box from Q1 to Q3, add the median line, whiskers to non-outlier extremes, and plot outliers separately
Example 1 (Simple): Data: 1, 2, 3, 4, 5. Min=1, Q1=1.5, Med=3, Q3=4.5, Max=5. IQR=3. No outliers.
Example 2 (Advanced): Data: 10, 15, 20, 25, 30, 35, 40, 45, 50, 100. Q1=20, Med=32.5, Q3=45. IQR=25. Outlier: 100.
Common Mistake: Including outliers in IQR calculation. Always calculate IQR from non-outlier data.
Memory Aid: "Box holds 50%" - the box portion always contains exactly half of all data points.
Key Notes: The box plot is robust against outliers; it shows skewness through the position of the median within the box; longer boxes indicate greater variability in the middle 50%.
Takeaways: Box plots excel at comparing multiple datasets; they summarize large amounts of data efficiently; they clearly identify outliers and their magnitude.
Core Principles for Success:

• Always sort data first: Proper quartile calculation requires ordered data

• Handle even/odd counts differently: For median and quartile calculations

• Outlier detection is crucial: It affects whisker endpoints and data interpretation

• Visual comparison: Use multiple box plots to compare different groups or conditions

• Context matters: Always interpret box plots within the context of the problem being analyzed

Questions & Answers

Question: I'm confused about when to use 1.5×IQR versus 3×IQR for outlier detection. Why is 1.5 the standard multiplier?

Answer: The 1.5×IQR rule is John Tukey's convention, established in his work on exploratory data analysis. Here's why:

  • 1.5×IQR: Identifies "mild" outliers - values that are unusually far from the bulk of the data
  • 3×IQR: Would identify "extreme" outliers - much rarer events that are extremely distant

The 1.5×IQR rule provides a good balance between sensitivity and specificity. It catches values that are likely errors or unusual while not flagging too many legitimate data points. In a normal distribution, this rule identifies about 0.7% of values as outliers, which is reasonable for most applications.

Some fields use different thresholds based on their specific needs, but 1.5×IQR is the widely accepted standard in introductory statistics.

Question: How do box plots differ from histograms, and when should I use each one?

Answer: Both visualize data distribution but serve different purposes:

  • Box plots: Show five-number summary, identify outliers, excellent for comparisons, compact representation, focus on center and spread
  • Histograms: Show frequency distribution in bins, reveal modality (unimodal/bimodal), show exact shape of distribution, better for large datasets

Use box plots when: Comparing multiple groups, identifying outliers, showing quartiles, working with moderate-sized datasets.

Use histograms when: Showing detailed distribution shape, revealing patterns in large datasets, showing frequency of values.

Box plots are more robust against outliers and provide clearer summary statistics, while histograms show more detail about the distribution's shape.

Question: How can I determine skewness from a box plot? What patterns should I look for?

Answer: Skewness is determined by the relative positions of the median and the quartiles:

  • Right-skewed: Median closer to Q1, longer right whisker, box shifted left
  • Left-skewed: Median closer to Q3, longer left whisker, box shifted right
  • Symmetric: Median centered in box, whiskers roughly equal length

Visual cues: Look at the position of the median line within the box and the relative lengths of the whiskers. If the median is not centered in the box, the distribution is skewed in the direction of the longer whisker.

Also examine the distance from Q1 to median versus median to Q3. In right-skewed distributions, the median-Q3 distance is larger than Q1-median distance.