Box plot (box-and-whisker plot): A graphical representation showing the five-number summary: minimum, Q1, median, Q3, and maximum
- Sort the data in ascending order
- Find the five-number summary (Min, Q1, Med, Q3, Max)
- Calculate the interquartile range (IQR)
- Determine whisker boundaries and outliers
- Draw the box plot with appropriate scale
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
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
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
Five-Number Summary:
Minimum: 75
Q1 (First Quartile): 82
Median (Q2): 88
Q3 (Third Quartile): 94
Maximum: 100
IQR: 12
No outliers detected
• 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
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
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
Between Q1 and Q3 = 75% - 25% = 50%
This is the definition of IQR (interquartile range)
IQR = Q3 - Q1 = 85 - 72 = 13
This range contains 50% of the data
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
Range = Max - Min = 95 - 60 = 35
About 25% of data is between 60-72
About 25% of data is between 85-95
Percentage between Q1 and Q3: 50%
IQR: 13 (range containing middle 50% of data)
Distribution: Approximately symmetric
Range: 35 (from 60 to 95)
• 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
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?
Center comparison: Compare medians to assess typical performance
Spread comparison: Compare IQRs to assess variability
Range comparison: Compare min-max ranges for overall spread
- Calculate IQR for each class
- Compare centers (medians)
- Compare spreads (IQRs and ranges)
- Assess skewness for each distribution
- Consider outliers if present
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%
Class A median: 75
Class B median: 78
Class B has a higher median, indicating better overall performance
Class A range: 90 - 65 = 25
Class B range: 95 - 60 = 35
Class B has greater overall variability
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
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 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.
• 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: 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
- Data sorting: Arrange data in ascending order
- Five-number summary: Calculate Min, Q1, Med, Q3, Max
- IQR calculation: Q3 - Q1
- Outlier detection: Check for values beyond Q1-1.5×IQR or Q3+1.5×IQR
- Plot construction: Draw box, whiskers, and outliers
• 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
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
Sorted data: 12, 15, 18, 20, 22, 24, 25, 26, 28, 30, 35, 40, 60
Total values: 13
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
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
Any value < -1.25 or > 52.75 is an outlier
Checking: 60 > 52.75, so 60 is an outlier
Outlier identified: 60
Lower whisker: Minimum non-outlier = 12
Upper whisker: Maximum non-outlier = 40
Outlier (60) will be plotted separately
Five-Number Summary (excluding outlier):
Minimum: 12
Q1: 19
Median: 25
Q3: 32.5
Maximum (non-outlier): 40
Outlier: 60
IQR: 13.5
• 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
Shape determination: Based on relative positions of quartiles and median
Percentile calculations: Using quartile positions to determine data percentages
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
By definition, Q3 represents the 75th percentile
Percentage below 40: 75%
Between Q1 (25th percentile) and Q3 (75th percentile)
Percentage between 25 and 40: 75% - 25% = 50%
Percentage below Median (30): 50%
Percentage below Q1 (25): 25%
Percentage above Q3 (40): 25%
IQR = Q3 - Q1 = 40 - 25 = 15
Range = Max - Min = 50 - 15 = 35
Distribution Shape: Right-skewed (upper half longer than lower half)
Percentage below 40: 75%
Percentage between 25 and 40: 50%
IQR: 15
Range: 35
• Shape determination: Compare distances from median to Q1 and Q3
• Percentile interpretation: Q1=25%, Med=50%, Q3=75%
• Range calculation: Maximum minus minimum values
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.
- Data sorting: Arrange all data points in ascending order
- Five-number summary: Calculate minimum, Q1, median, Q3, and maximum
- IQR calculation: Compute Q3 - Q1
- Outlier detection: Identify values beyond Q1 - 1.5×IQR or Q3 + 1.5×IQR
- Whisker determination: Set whiskers to extend to furthest non-outlier values
- Plot construction: Draw box, whiskers, median line, and outliers
• 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%
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.
- Data Preparation: Sort the data in ascending order and count total observations (n)
- Find Median (Q2): If n is odd, median is the middle value; if even, it's the average of two middle values
- Find Q1: Median of the lower half of the data (values below the overall median)
- Find Q3: Median of the upper half of the data (values above the overall median)
- Identify Min and Max: The smallest and largest values in the dataset
- Calculate IQR: Q3 - Q1
- Detect Outliers: Values below Q1 - 1.5×IQR or above Q3 + 1.5×IQR
- Determine Whisker Limits: Whiskers extend to the furthest non-outlier values
- 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
• 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.