Solved Exercises on Interquartile Range (IQR) and Variability in Algebra 1

Master IQR and variability with strategies: quartile calculation, IQR determination, outlier detection, and variability comparison through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 Calculating Quartiles
Exercise 1
Find Q1, Q2 (median), and Q3 for the following data set: 12, 15, 18, 20, 22, 25, 28, 30, 35, 40. Show all steps in your calculation.
Definition:

Quartiles: Values that divide a dataset into four equal parts. Q1 (first quartile) = 25th percentile, Q2 (median) = 50th percentile, Q3 (third quartile) = 75th percentile.

Quartile calculation method:
  1. Arrange data in ascending order
  2. Find the median (Q2)
  3. Find Q1: median of the lower half of data
  4. Find Q3: median of the upper half of data
  5. For even counts, take average of two middle values
Data Analysis

Ordered data: 12, 15, 18, 20, 22, 25, 28, 30, 35, 40

Number of values: 10 (even)

Step 1: Arrange data in order

Already arranged: 12, 15, 18, 20, 22, 25, 28, 30, 35, 40

Step 2: Find Q2 (median)

With 10 values (even), median is average of 5th and 6th values

Q2 = (22 + 25) ÷ 2 = 23.5

Step 3: Find Q1 (first quartile)

Lower half: 12, 15, 18, 20, 22 (first 5 values)

Q1 = median of lower half = 18 (middle value)

Step 4: Find Q3 (third quartile)

Upper half: 25, 28, 30, 35, 40 (last 5 values)

Q3 = median of upper half = 30 (middle value)

Q1
18
Q2
23.5
Q3
30
Q1 = 18, Q2 = 23.5, Q3 = 30
Q1 = 18, Q2 = 23.5, Q3 = 30
Final answer:

Q1 = 18, Q2 = 23.5, Q3 = 30

Applied rules:

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

• Even count median: Average of two middle values

• Half inclusion: Include median in both halves when count is odd

2 Calculating Interquartile Range (IQR)
Exercise 2
Using the quartiles found in Exercise 1 (Q1 = 18, Q3 = 30), calculate the IQR. Then find the IQR for this different data set: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50.
Definition:

Interquartile Range (IQR): The range of the middle 50% of data, calculated as Q3 - Q1.

IQR Calculations

First dataset: Q1 = 18, Q3 = 30

Second dataset: Need to calculate Q1 and Q3

Step 1: Calculate IQR for first dataset

IQR = Q3 - Q1

IQR = 30 - 18 = 12

Step 2: Find quartiles for second dataset

Ordered data: 5, 10, 15, 20, 25, 30, 35, 40, 45, 50

Q2 (median) = (25 + 30) ÷ 2 = 27.5

Lower half: 5, 10, 15, 20, 25 → Q1 = 15

Upper half: 30, 35, 40, 45, 50 → Q3 = 40

Step 3: Calculate IQR for second dataset

IQR = Q3 - Q1 = 40 - 15 = 25

Step 4: Compare variability

First dataset IQR: 12

Second dataset IQR: 25

Second dataset has greater variability in the middle 50% of data

IQR = Q3 - Q1
Dataset Q1 Q3 IQR
First 18 30 12
Second 15 40 25
First dataset IQR = 12, Second dataset IQR = 25
Final answer:

First dataset IQR = 12, Second dataset IQR = 25

Applied rules:

• IQR formula: IQR = Q3 - Q1

• Variability measure: Higher IQR indicates greater spread

• Robustness: IQR is resistant to outliers

3 Outlier Detection Using IQR
Exercise 3
For the data set: 10, 15, 18, 20, 22, 25, 28, 30, 35, 40, 45, 50, 70, determine if there are any outliers using the 1.5 × IQR rule.
Definition:

Outlier: A data value that is significantly different from other values in the dataset, often defined as values beyond Q1 - 1.5(IQR) or Q3 + 1.5(IQR).

Data Analysis

Ordered data: 10, 15, 18, 20, 22, 25, 28, 30, 35, 40, 45, 50, 70

Number of values: 13 (odd)

Step 1: Find the median (Q2)

With 13 values (odd), median is the 7th value

Q2 = 28

Step 2: Find Q1 (first quartile)

Lower half: 10, 15, 18, 20, 22, 25 (first 6 values)

Q1 = (18 + 20) ÷ 2 = 19

Step 3: Find Q3 (third quartile)

Upper half: 30, 35, 40, 45, 50, 70 (last 6 values)

Q3 = (40 + 45) ÷ 2 = 42.5

Step 4: Calculate IQR

IQR = Q3 - Q1 = 42.5 - 19 = 23.5

Step 5: Calculate outlier boundaries

Lower fence = Q1 - 1.5(IQR) = 19 - 1.5(23.5) = 19 - 35.25 = -16.25

Upper fence = Q3 + 1.5(IQR) = 42.5 + 1.5(23.5) = 42.5 + 35.25 = 77.75

Step 6: Identify outliers

Check each value against boundaries [-16.25, 77.75]

All values (10 to 70) are within boundaries

No outliers detected

Outlier boundaries: [Q1 - 1.5(IQR), Q3 + 1.5(IQR)]
No outliers detected (all values within [-16.25, 77.75])
Final answer:

No outliers detected (all values within [-16.25, 77.75])

Applied rules:

• Outlier boundaries: Q1 - 1.5(IQR) and Q3 + 1.5(IQR)

• 1.5 × IQR rule: Standard method for outlier detection

• Robust measure: IQR-based detection is resistant to outliers

Rules and methods, laws,...
IQR = Q3 - Q1
Interquartile Range Formula
Q1
25th percentile
First quartile
Q2
50th percentile
Median
Q3
75th percentile
Third quartile
Key definitions:

Quartiles: Values that divide a dataset into four equal parts (25% each).

Interquartile Range (IQR): The difference between the third and first quartiles (Q3 - Q1).

Outlier: A data value that falls significantly outside the overall pattern of the data.

Five-number summary: Minimum, Q1, Median, Q3, Maximum.

Box plot: A visual representation of the five-number summary.

IQR calculation process:
  1. Order data: Arrange values from least to greatest
  2. Find median: Identify Q2 (middle value)
  3. Find Q1: Median of lower half of data
  4. Find Q3: Median of upper half of data
  5. Calculate IQR: Subtract Q1 from Q3
  6. Detect outliers: Use 1.5 × IQR rule
Tip 1: Always order your data before finding quartiles.
Tip 2: IQR is resistant to outliers, unlike range.
Tip 3: Outliers can significantly affect range but not IQR.
Benefits: IQR provides a robust measure of variability that focuses on the middle 50% of data.
Applications: Quality control, statistical analysis, data cleaning, and research.
Solution: Exercises 4 to 5
4 Comparing Variability Using IQR
Exercise 4
Compare the variability of two data sets using IQR: Set A: 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 and Set B: 1, 2, 3, 5, 8, 12, 15, 17, 19, 20. Which set has greater variability in the middle 50% of data?
Definition:

Variability: The degree to which data points differ from each other, measured by the spread of values.

Data Sets Comparison

Set A: 2, 4, 6, 8, 10, 12, 14, 16, 18, 20

Set B: 1, 2, 3, 5, 8, 12, 15, 17, 19, 20

Step 1: Calculate IQR for Set A

Q2 = (10 + 12) ÷ 2 = 11

Lower half: 2, 4, 6, 8, 10 → Q1 = 6

Upper half: 12, 14, 16, 18, 20 → Q3 = 16

IQR_A = 16 - 6 = 10

Step 2: Calculate IQR for Set B

Q2 = (8 + 12) ÷ 2 = 10

Lower half: 1, 2, 3, 5, 8 → Q1 = 3

Upper half: 12, 15, 17, 19, 20 → Q3 = 17

IQR_B = 17 - 3 = 14

Step 3: Compare variability

IQR_A = 10

IQR_B = 14

Set B has greater variability in the middle 50% of data

Step 4: Verify with other measures

Range_A = 20 - 2 = 18

Range_B = 20 - 1 = 19

Both measures confirm Set B has greater spread

Set Q1 Q3 IQR Range
A 6 16 10 18
B 3 17 14 19
Set B has greater variability: IQR_B (14) > IQR_A (10)
Set B has greater variability: IQR = 14 vs IQR = 10
Final answer:

Set B has greater variability: IQR = 14 vs IQR = 10

Applied rules:

• Variability comparison: Higher IQR indicates greater spread

• Robust comparison: IQR is less affected by extreme values

• Consistency check: Compare with other measures for confirmation

5 Box Plot Analysis and Interpretation
Exercise 5
Create a box plot for the data: 5, 8, 12, 15, 18, 20, 22, 25, 28, 30, 35, 40. Then interpret the distribution, including center, spread, and any skewness.
Definition:

Box plot: A graphical representation of the five-number summary (minimum, Q1, median, Q3, maximum).

Five-Number Summary
Statistic Value Description
Minimum 5 Lowest value
Q1 13.5 First quartile (25th percentile)
Median 21 Second quartile (50th percentile)
Q3 27.5 Third quartile (75th percentile)
Maximum 40 Highest value
Box Plot Visualization
5
13.5
21
27.5
40
Step 1: Calculate the five-number summary

Ordered data: 5, 8, 12, 15, 18, 20, 22, 25, 28, 30, 35, 40

Min = 5, Max = 40

Median = (20 + 22) ÷ 2 = 21

Q1 = (12 + 15) ÷ 2 = 13.5

Q3 = (25 + 28) ÷ 2 = 26.5

Step 2: Calculate IQR

IQR = Q3 - Q1 = 26.5 - 13.5 = 13

Step 3: Check for outliers

Lower fence = 13.5 - 1.5(13) = -6

Upper fence = 26.5 + 1.5(13) = 46

No outliers (all values within [-6, 46])

Step 4: Interpret the distribution

Center: Median = 21

Spread: IQR = 13, Range = 35

Shape: Slightly right-skewed (distance from Q1 to median is 7.5, from median to Q3 is 5.5)

Five-number summary: [5, 13.5, 21, 26.5, 40], IQR = 13
Distribution is slightly right-skewed with IQR = 13
Final answer:

Distribution is slightly right-skewed with IQR = 13

Applied rules:

• Box plot interpretation: Length of box represents IQR

• Skewness detection: Unequal distances between Q1-Median and Median-Q3

• Outlier detection: Use 1.5 × IQR rule

Summary: Interquartile Range (IQR) and Variability in One-Variable Statistics
IQR = Q3 - Q1 = Middle 50% of Data
Variability Measurement Framework
Key definitions:

Quartiles: Values that divide a dataset into four equal parts (25% each). Q1 = 25th percentile, Q2 = 50th percentile (median), Q3 = 75th percentile.

Interquartile Range (IQR): The range of the middle 50% of data, calculated as Q3 - Q1.

Outlier: A data value that falls significantly outside the overall pattern of the data, typically defined as values beyond Q1 - 1.5(IQR) or Q3 + 1.5(IQR).

Five-number summary: The minimum, Q1, median, Q3, and maximum values of a dataset.

Variability: The degree to which data points differ from each other, measured by the spread of values.

IQR calculation process:
  1. Order the data: Arrange values from least to greatest
  2. Find the median (Q2): Middle value or average of two middle values
  3. Find Q1: Median of the lower half of the data
  4. Find Q3: Median of the upper half of the data
  5. Calculate IQR: IQR = Q3 - Q1
  6. Detect outliers: Use 1.5 × IQR rule
  7. Interpret results: Analyze variability and distribution shape
Tip 1: Always order your data before calculating quartiles.
Tip 2: For even number of values, include both middle values in both halves.
Tip 3: IQR is resistant to outliers, making it more reliable than range.
Tip 4: Compare IQR with range to understand data distribution.
Common pitfalls: Forgetting to order data, miscalculating quartiles, misapplying the 1.5 × IQR rule, confusing IQR with range.
Statistical literacy: Understanding IQR helps in making informed decisions based on data variability.
Comparison of spread measures:
Measure Formula Sensitivity to Outliers When to Use
Range Max - Min Very High Quick estimate, small datasets
IQR Q3 - Q1 Low Robust measure, skewed data
Standard Deviation √(Σ(x-μ)²/n) High Normal distributions, all data matters
Quartile Calculation

Odd count: For n values, Q1 is at position (n+1)/4, Q3 is at 3(n+1)/4

Even count: Split data into two equal halves, find median of each

Interpolation: When position is not a whole number, interpolate between adjacent values

Example: For 10 values, Q1 is between 2nd and 3rd values, Q3 is between 8th and 9th values

IQR Properties

Robustness: IQR is not affected by extreme values or outliers

Central focus: Measures variability of the middle 50% of data

Units: Same units as the original data

Comparison: Higher IQR indicates greater variability

Outlier Detection

1.5 × IQR Rule: Values below Q1 - 1.5(IQR) or above Q3 + 1.5(IQR) are outliers

3 × IQR Rule: More conservative approach for extreme outliers

Context matters: Always consider if outliers are valid data points

Impact: Outliers can significantly affect mean and standard deviation

Box Plot Interpretation

Box length: Represents IQR, indicates variability of middle 50%

Median position: If median is centered, distribution is symmetric; if off-center, distribution is skewed

Whisker lengths: Indicate spread of lower and upper 25% of data

Outliers: Points beyond whiskers, shown as individual dots

Questions & Answers

Question: I'm confused about why we use 1.5 × IQR to detect outliers. Why not 1 × IQR or 2 × IQR?

Answer: The 1.5 × IQR rule was developed by statistician John Tukey as a balance between sensitivity and specificity:

Why 1.5 specifically:

  • 1 × IQR would be too sensitive: Would flag too many values as outliers, including legitimate data points
  • 2 × IQR would be too conservative: Would miss actual outliers, keeping them in the analysis
  • 1.5 × IQR strikes a balance: Detects true outliers while not over-flagging normal variations

Empirical basis: This rule was tested against normal distributions and found to work well in practice. For normally distributed data, about 99.3% of values fall within Q1 - 1.5(IQR) and Q3 + 1.5(IQR).

Flexibility: Some statisticians use 3 × IQR for extreme outliers or 1 × IQR for more sensitive detection, but 1.5 × IQR remains the standard.

Question: When should I use IQR instead of standard deviation to measure variability?

Answer: The choice depends on your data's characteristics:

Use IQR when:

  • Your data is skewed (not normally distributed)
  • Your data contains outliers
  • You want a robust measure resistant to extreme values
  • You're working with ordinal data
  • You want to focus on the central portion of your data

Use standard deviation when:

  • Your data is approximately normally distributed
  • Your data doesn't contain significant outliers
  • You need to perform further statistical calculations
  • You want to include all data points in your measure

Key difference: IQR focuses on the middle 50% of data and is robust to outliers, while standard deviation uses all data points and is sensitive to extreme values.

Question: How do I know if my data is skewed by looking at quartiles and IQR?

Answer: You can assess skewness by comparing distances between quartiles:

Right skew (positive skew):

  • Distance from Q3 to median > Distance from median to Q1
  • Q3 - Median > Median - Q1
  • The upper half of data is more spread out

Left skew (negative skew):

  • Distance from median to Q1 > Distance from Q3 to median
  • Median - Q1 > Q3 - Median
  • The lower half of data is more spread out

Symmetric distribution:

  • Distance from Q3 to median ≈ Distance from median to Q1
  • Q3 - Median ≈ Median - Q1

Example: If Q1 = 10, Median = 20, Q3 = 35, then Q3 - Median = 15 and Median - Q1 = 10. Since 15 > 10, the data is slightly right-skewed.