Box Plot
Box plots, also known as box-and-whisker plots, are a standardized way of displaying the
distribution of data based on a five-number summary: minimum, first quartile (Q1), median (Q2),
third quartile (Q3), and maximum.
Purpose and Benefits:
● Visualizing Distribution: Box plots provide a clear visual representation of the spread,
skewness, and central tendency of a dataset.
● Identifying Outliers: They effectively highlight potential outliers, which are data points
significantly different from the rest of the data.
● Comparing Distributions: Box plots are excellent for comparing the distributions of
multiple datasets side-by-side.
● Understanding Data Variability: They help understand the variability and range of the
data.
● Non-Parametric Representation: Box plots are non-parametric, meaning they don't
assume a specific distribution for the data.
Components of a Box Plot:
● Box:
○ Represents the interquartile range (IQR), which is the range between the first quartile
(Q1) and the third quartile (Q3).
○ The length of the box indicates the spread of the middle 50% of the data.
○ Q1 (25th percentile) is the lower edge of the box.
○ Q3 (75th percentile) is the upper edge of the box.
● Median (Q2):
○ A line inside the box represents the median (50th percentile) of the data.
○ The position of the median line within the box indicates the skewness of the data.
■ If the median is near the center, the data is relatively symmetrical.
■ If the median is closer to Q1, the data is positively skewed (skewed right).
■ If the median is closer to Q3, the data is negatively skewed (skewed left).
● Whiskers:
○ Extend from the box to the minimum and maximum values within a defined range.
○ Typically, whiskers extend to the furthest data point within 1.5 times the IQR from the
box edges.
○ Values beyond the whiskers are considered potential outliers.
● Outliers:
○ Individual points plotted beyond the whiskers.
○ Represent data points that are significantly different from the rest of the data.
○ Outliers can be calculated in different ways, but the 1.5 * IQR rule is most common.
Interpreting Box Plots:
● Symmetry:
○ A symmetrical box plot indicates a symmetrical distribution.
○ The median line is centered within the box, and the whiskers are roughly equal in
length.
● Skewness:
○ A skewed box plot indicates an asymmetrical distribution.
○
Positive skew: The median is closer to Q1, the right whisker is longer, and outliers may
be on the right.
○ Negative skew: The median is closer to Q3, the left whisker is longer, and outliers may
be on the left.
● Spread:
○ The length of the box and whiskers indicates the spread or variability of the data.
○ A longer box or whiskers indicates greater variability.
● Outliers:
○ Outliers may indicate errors in the data or unusual observations.
○ They should be investigated to determine their cause.
Key Calculations:
● IQR (Interquartile Range): IQR = Q3 - Q1
● Lower Limit for Whiskers: Q1 - (1.5 * IQR)
● Upper Limit for Whiskers: Q3 + (1.5 * IQR)
Uses:
● Exploratory data analysis
● Comparing distributions across groups
● Identifying potential outliers
● Summarizing large datasets
Example:
● A farmer wants to analyze the yield of wheat (in kilograms per hectare) across 12
different plots of land.
● Here's the data collected: 350, 420, 480, 510, 550, 580, 600, 620, 650, 700, 720, 850.
1. Order the Data:
● First, arrange the data in ascending order: 350, 420, 480, 510, 550, 580, 600, 620, 650,
700, 720, 850
2. Find the Median (Q2):
● Since there are 12 data points (an even number), the median is the average of the two
middle values (6th and 7th values).
● Median (Q2) = (580 + 600) / 2 = 590
3. Find the First Quartile (Q1):
● Q1 is the median of the lower half of the data (values below the overall median).
● Lower half: 350, 420, 480, 510, 550, 580
● Q1 = (480 + 510) / 2 = 495
4. Find the Third Quartile (Q3):
● Q3 is the median of the upper half of the data (values above the overall median).
● Upper half: 600, 620, 650, 700, 720, 850
● Q3 = (650 + 700) / 2 = 675
5. Find the Minimum and Maximum:
● Minimum: 350
● Maximum: 850
6. Calculate the Interquartile Range (IQR):
● IQR = Q3 - Q1 = 675 - 495 = 180
7. Determine the Whiskers:
● Lower whisker limit: Q1 - (1.5 * IQR) = 495 - (1.5 * 180) = 225
● Upper whisker limit: Q3 + (1.5 * IQR) = 675 + (1.5 * 180) = 945
● Since the lowest value is 350, and that is higher than the lower whisker limit of 225, the
lower whisker will extend to 350.
● Since the highest value is 850, and that is lower than the upper whisker limit of 945, the
upper whisker will extend to 850.
● Therefore there are no outliers in this data set.
8. Draw the Box Plot:
● Draw a number line that includes the range of your data (from 350 to 850).
● Draw a box from Q1 (495) to Q3 (675).
● Draw a line inside the box at the median (590).
● Draw a whisker from Q1 (495) to the minimum value (350).
● Draw a whisker from Q3 (675) to the maximum value (850).
Interpretation:
● The box shows the middle 50% of wheat yields, with the median indicating the central
tendency.
● The whiskers show the spread of the remaining data.
● Because the median is relatively centered within the box, the data is relatively
symmetrical.
● The length of the box and whiskers shows the variability in wheat yield across the plots.