Summarizing Data Numerically: Quartiles, IQR, and Boxplots

Quartiles and the Five-Number Summary

  • First Quartile (Q1Q_1): The 25th percentile of the data values.

  • Third Quartile (Q3Q_3): The 75th percentile of the data values.

  • Median (MM): The middle observation (50th percentile) that breaks the data into two equal halves.

  • Five-Number Summary: Consists of the smallest observation, Q1Q_1, MM, Q3Q_3, and the largest observation.

  • Calculation Example (Study Hours): For the data 2, 3, 4, 4, 5, 6, 7, 10, 17, 28:

    • M=5.5hoursM = 5.5\,\text{hours}

    • Q1=4hoursQ_1 = 4\,\text{hours}

    • Q3=10hoursQ_3 = 10\,\text{hours}

Measures of Spread: Range vs. IQR

  • Interquartile Range (IQR): Calculated as IQR=Q3Q1IQR = Q_3 - Q_1. It measures the spread of the middle 50% of observations and is resistant to outliers.

  • Range: Calculated as largest observationsmallest observation\text{largest observation} - \text{smallest observation}. It is highly sensitive to outliers.

  • Statistical Comparison: In the study hours example, the range is 26hours26\,\text{hours} (suggesting high spread/outliers) while the IQRIQR is only 6hours6\,\text{hours} (suggesting the middle 50% has a small spread).

Outlier Detection and Fences

  • Fences: Used to identify outliers mathematically:

    • left fence=Q11.5×IQR\text{left fence} = Q_1 - 1.5 \times IQR

    • right fence=Q3+1.5×IQR\text{right fence} = Q_3 + 1.5 \times IQR

  • Outlier Definition: Any observation that lies outside the fences (either less than the left fence or greater than the right fence).

  • Example (Novels Read): For data 0, 0, 2, 2, 2, 3, 4, 5, 5, 6, 12 where IQR=3IQR = 3:

    • left fence=21.5(3)=2.5\text{left fence} = 2 - 1.5(3) = -2.5

    • right fence=5+1.5(3)=9.5\text{right fence} = 5 + 1.5(3) = 9.5

    • The observation 12 is an outlier because 12 > 9.5.

Boxplot Interpretation

  • Structure: A boxplot consists of four parts: the left whisker, left part of the box, right part of the box, and right whisker. Each part represents approximately 25% of the observations.

  • Determining Skewness (Unimodal Distributions):

    • Skewed Left: The left whisker is significantly longer than the right whisker, and the left part of the box is at least as long as the right part.

    • Skewed Right: The right whisker is significantly longer than the left whisker, and the right part of the box is at least as long as the left part.

  • Outliers in Plots: Indicated by dots beyond the whiskers. Whiskers extend only to the farthest data points that are still within the fences.

Questions & Discussion

  • Question Regarding Range Comparison: A student notes that the youngest and oldest ages for both Major League Baseball (MLB) and National Football League (NFL) players are 19 and 45, respectively. Since the range for both is 26years26\,\text{years}, the student concludes the spread of ages is the same. Is this accurate?

  • Response: No. Comparing only the extremes (range) provides an incomplete picture. Comparing medians (Baseball: 27years27\,\text{years}, Football: 24years24\,\text{years}) and quartiles shows that baseball players tend to be older. Additionally, comparing the length of the individual components of the boxplots Reveals that baseball players' ages are more spread out overall than football players' ages, excluding outliers.