Solved Exercises on Outliers and Their Effects on Summary Statistics

Master how outliers affect measures of center and spread through these 5 detailed exercises covering identification, calculation, and interpretation of statistical impacts.

Solution: Exercises 1 to 3
1 Identifying and Measuring Outlier Effects
Exercise 1
For the dataset: 10, 12, 15, 16, 18, 20, 22, 25, 28, 100, identify if there are any outliers using the 1.5×IQR rule. Then calculate the mean and median with and without the outlier.
Definition:

Outlier: An observation that falls well outside the overall pattern of the data.

1.5×IQR rule: Values below Q1 - 1.5×IQR or above Q3 + 1.5×IQR are considered outliers.

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

Outlier detection method:
  1. Arrange data in ascending order
  2. Find Q1 (first quartile) and Q3 (third quartile)
  3. Calculate IQR = Q3 - Q1
  4. Calculate boundaries: Q1 - 1.5×IQR and Q3 + 1.5×IQR
  5. Identify values outside these boundaries
Step 1: Arrange data and find quartiles

Data is sorted: 10, 12, 15, 16, 18, 20, 22, 25, 28, 100

With 10 values (even), split into two halves: 10, 12, 15, 16, 18 and 20, 22, 25, 28, 100

Q1 = (12 + 15) ÷ 2 = 13.5

Q3 = (25 + 28) ÷ 2 = 26.5

Step 2: Calculate IQR and boundaries

IQR = Q3 - Q1 = 26.5 - 13.5 = 13

Lower boundary = Q1 - 1.5×IQR = 13.5 - 1.5×13 = 13.5 - 19.5 = -6

Upper boundary = Q3 + 1.5×IQR = 26.5 + 1.5×13 = 26.5 + 19.5 = 46

Step 3: Identify outliers

Any value < -6 or > 46 is an outlier

Value 100 > 46, so 100 is an outlier

Step 4: Calculate statistics WITH outlier

Mean = (10+12+15+16+18+20+22+25+28+100) ÷ 10 = 256 ÷ 10 = 25.6

Median = (18+20) ÷ 2 = 19

Step 5: Calculate statistics WITHOUT outlier

Without 100: 10, 12, 15, 16, 18, 20, 22, 25, 28

Mean = (10+12+15+16+18+20+22+25+28) ÷ 9 = 156 ÷ 9 = 17.33

Median = 18 (middle value)

Outlier: 100; Mean with outlier: 25.6; Mean without: 17.33; Median with: 19; Median without: 18
Final answer:

The value 100 is an outlier. The mean decreases from 25.6 to 17.33 when the outlier is removed (change of 8.27), while the median changes from 19 to 18 (change of 1). The mean is more affected by the outlier than the median.

Applied rules:

• 1.5×IQR rule: Outliers are values outside [Q1 - 1.5×IQR, Q3 + 1.5×IQR]

• Mean sensitivity: Highly affected by outliers

• Median robustness: Less affected by outliers

2 Comparing Effects on Different Statistics
Exercise 2
Compare the range and IQR for the following datasets: A) 5, 8, 10, 12, 15 and B) 5, 8, 10, 12, 50. How does the outlier affect each measure differently?
Definition:

Robust measure: A statistical measure that is not significantly affected by outliers.

Sensitive measure: A statistical measure that is significantly affected by outliers.

Step 1: Calculate for Dataset A (5, 8, 10, 12, 15)

Range = 15 - 5 = 10

Q1 = 6.5 (average of 5 and 8), Q3 = 13.5 (average of 12 and 15)

IQR = 13.5 - 6.5 = 7

Step 2: Calculate for Dataset B (5, 8, 10, 12, 50)

Range = 50 - 5 = 45

Q1 = 6.5 (average of 5 and 8), Q3 = 31 (average of 12 and 50)

IQR = 31 - 6.5 = 24.5

Step 3: Compare the changes

Range: Dataset A = 10, Dataset B = 45 (increase of 35)

IQR: Dataset A = 7, Dataset B = 24.5 (increase of 17.5)

Step 4: Analyze the impact

The range increased by 350% (from 10 to 45)

The IQR increased by 250% (from 7 to 24.5)

Both measures are affected, but range is more sensitive

Step 5: Determine which measure is more robust

The IQR is more robust than the range because it only considers the middle 50% of data

The range is affected by both the minimum and maximum values

Range: A=10, B=45; IQR: A=7, B=24.5; IQR is more robust than range
Final answer:

Dataset A: Range = 10, IQR = 7; Dataset B: Range = 45, IQR = 24.5. The outlier (50) increases the range by 350% and the IQR by 250%. The IQR is more robust than the range because it's only affected by the middle 50% of data.

Applied rules:

• Range sensitivity: Affected by min and max values

• IQR robustness: Only affected by middle 50% of data

• Outlier impact: Range more sensitive than IQR

3 Outlier Impact on Standard Deviation
Exercise 3
Calculate the standard deviation for the datasets: A) 20, 22, 24, 26, 28 and B) 20, 22, 24, 26, 60. Compare how the outlier affects the standard deviation.
Definition:

Standard deviation: A measure of the amount of variation or dispersion of a set of values.

Variance: The average of the squared differences from the mean.

Step 1: Calculate for Dataset A (20, 22, 24, 26, 28)

Mean = (20+22+24+26+28) ÷ 5 = 120 ÷ 5 = 24

Deviations from mean: (20-24)², (22-24)², (24-24)², (26-24)², (28-24)²

Squared deviations: 16, 4, 0, 4, 16

Variance = (16+4+0+4+16) ÷ 5 = 40 ÷ 5 = 8

Standard deviation = √8 = 2.83

Step 2: Calculate for Dataset B (20, 22, 24, 26, 60)

Mean = (20+22+24+26+60) ÷ 5 = 152 ÷ 5 = 30.4

Deviations from mean: (20-30.4)², (22-30.4)², (24-30.4)², (26-30.4)², (60-30.4)²

Squared deviations: 108.16, 70.56, 40.96, 19.36, 876.16

Variance = (108.16+70.56+40.96+19.36+876.16) ÷ 5 = 1115.2 ÷ 5 = 223.04

Standard deviation = √223.04 = 14.93

Step 3: Compare the changes

Dataset A: Standard deviation = 2.83

Dataset B: Standard deviation = 14.93

Change: 14.93 - 2.83 = 12.10

Percent increase: (12.10 ÷ 2.83) × 100% = 427.6%

Step 4: Analyze the impact

The outlier (60) dramatically increases the standard deviation from 2.83 to 14.93

Standard deviation is highly sensitive to outliers because it squares the deviations

Step 5: Compare with other measures

Mean changed from 24 to 30.4 (27% increase)

Standard deviation changed by 427.6% (much more sensitive)

Dataset A: SD = 2.83; Dataset B: SD = 14.93; Outlier increases SD by 427.6%
Final answer:

Dataset A: Standard deviation = 2.83; Dataset B: Standard deviation = 14.93. The outlier increases the standard deviation by 427.6%. Standard deviation is highly sensitive to outliers because it involves squaring the deviations from the mean.

Applied rules:

• Standard deviation sensitivity: Squares deviations, amplifying outlier effects

• Robust alternatives: IQR and MAD are less sensitive to outliers

• Outlier impact: Squared deviations make SD highly sensitive

Outlier Effects on Summary Statistics
Outlier: Q1 - 1.5×IQR \text{ or } Q3 + 1.5×IQR
Outlier Detection Rule
Mean
Sensitive to
outliers
Affected by all values
Median
Robust to
outliers
Not affected by extremes
Range
Highly
sensitive
Uses min/max only
Key definitions:

Outlier: An observation that falls well outside the overall pattern of the data.

Robust measure: A statistical measure that is not significantly affected by outliers.

Sensitive measure: A statistical measure that is significantly affected by outliers.

Outlier identification:
  1. Visual inspection: Look at plots (dot plots, box plots, histograms)
  2. 1.5×IQR rule: Values outside [Q1 - 1.5×IQR, Q3 + 1.5×IQR]
  3. Contextual analysis: Consider if value makes sense in the situation
Tip 1: Always check for outliers before interpreting statistics.
Tip 2: Median and IQR are robust to outliers.
Tip 3: Mean and standard deviation are sensitive to outliers.
Tip 4: Consider the cause of outliers before removal.
Outlier Sensitivity: Range > Standard deviation > Mean > IQR > Median
Robust Measures: Median, IQR, mode, quartiles
Sensitivity hierarchy:

• Most sensitive: Range, Standard deviation

• Moderately sensitive: Mean

• Least sensitive: IQR, Median

Solution: Exercises 4 to 5
4 Real-World Outlier Analysis
Exercise 4
A company tracks daily sales (in thousands of dollars) over 10 days: 25, 28, 30, 32, 35, 38, 40, 42, 45, 120. The last day was Black Friday. Calculate mean, median, range, and IQR with and without the outlier. Discuss which statistics are most affected.
Definition:

Real-world context: Applying statistical concepts to practical business situations.

Extreme event: An unusual occurrence that significantly affects business metrics.

Step 1: Calculate statistics WITH outlier

Mean = (25+28+30+32+35+38+40+42+45+120) ÷ 10 = 435 ÷ 10 = 43.5

Median = (35+38) ÷ 2 = 36.5

Range = 120 - 25 = 95

Q1 = 30, Q3 = 42, IQR = 42 - 30 = 12

Step 2: Calculate statistics WITHOUT outlier

Without 120: 25, 28, 30, 32, 35, 38, 40, 42, 45

Mean = (25+28+30+32+35+38+40+42+45) ÷ 9 = 315 ÷ 9 = 35

Median = 35

Range = 45 - 25 = 20

Q1 = 29, Q3 = 41, IQR = 41 - 29 = 12

Step 3: Compare the changes

Mean: 35 → 43.5 (increase of 8.5, 24.3% increase)

Median: 35 → 36.5 (increase of 1.5, 4.3% increase)

Range: 20 → 95 (increase of 75, 375% increase)

IQR: 12 → 12 (no change)

Step 4: Identify most affected statistics

Range is most affected (375% increase)

Mean is moderately affected (24.3% increase)

Median is least affected (4.3% increase)

IQR is unaffected by the outlier

Step 5: Business implications

For planning regular operations, median and IQR provide better insight

Range is inflated by the special event

Mean suggests higher sales than typical days

With outlier: Mean=43.5, Median=36.5, Range=95, IQR=12; Without: Mean=35, Median=35, Range=20, IQR=12
Final answer:

With outlier: Mean = 43.5k, Median = 36.5k, Range = 95k, IQR = 12k. Without outlier: Mean = 35k, Median = 35k, Range = 20k, IQR = 12k. The range is most affected (375% increase), followed by mean (24.3% increase). The IQR is unaffected, and the median shows minimal change.

Applied rules:

• Range sensitivity: Most affected by outliers

• IQR robustness: Unaffected by extreme values

• Business decision-making: Use robust measures for regular planning

5 Outlier Investigation and Decision Making
Exercise 5
You have the following test scores: 78, 82, 85, 88, 90, 92, 95, 100, 15. The score of 15 seems unusual. Should it be considered an outlier? If so, what should you do with it? Calculate summary statistics with and without it.
Definition:

Data validation: Checking for accuracy and legitimacy of data points.

Outlier investigation: Determining if an outlier is legitimate or an error.

Step 1: Check if 15 is an outlier using 1.5×IQR rule

Sorted data: 15, 78, 82, 85, 88, 90, 92, 95, 100

With 9 values: Lower half: 15, 78, 82, 85; Upper half: 90, 92, 95, 100

Q1 = (78+82) ÷ 2 = 80, Q3 = (92+95) ÷ 2 = 93.5

IQR = 93.5 - 80 = 13.5

Lower boundary = 80 - 1.5×13.5 = 80 - 20.25 = 59.75

Upper boundary = 93.5 + 1.5×13.5 = 93.5 + 20.25 = 113.75

Since 15 < 59.75, it is an outlier

Step 2: Calculate statistics WITH outlier

Mean = (15+78+82+85+88+90+92+95+100) ÷ 9 = 625 ÷ 9 = 69.44

Median = 88

Step 3: Calculate statistics WITHOUT outlier

Without 15: 78, 82, 85, 88, 90, 92, 95, 100

Mean = (78+82+85+88+90+92+95+100) ÷ 8 = 610 ÷ 8 = 76.25

Median = (88+90) ÷ 2 = 89

Step 4: Investigate the outlier

Potential causes: Absence, illness, misunderstanding instructions, data entry error

Should investigate before deciding to remove

Step 5: Decision making

If 15 is a legitimate score (student present, attempted exam), keep it

If it's due to data error or extenuating circumstances, consider removing

Always report both analyses when presenting results

15 is an outlier; Mean with: 69.44, Mean without: 76.25; Investigate before removal
Final answer:

The score 15 is an outlier (below 59.75). With outlier: Mean = 69.44, Median = 88. Without outlier: Mean = 76.25, Median = 89. The outlier significantly lowers the mean. Before removing, investigate the cause. If legitimate, keep it; if error, consider removal. Always report both analyses.

Applied rules:

• Investigate first: Always determine cause before removing outliers

• Legitimate outliers: May be important to retain

• Transparent reporting: Show results with and without outliers

Comprehensive Guide to Outliers and Summary Statistics
\text{Outlier boundaries}: Q1 - 1.5×IQR \text{ to } Q3 + 1.5×IQR
Outlier Detection Formula
Key definitions:

Outlier: An observation that falls well outside the overall pattern of the data.

1.5×IQR rule: Values below Q1 - 1.5×IQR or above Q3 + 1.5×IQR are considered outliers.

Robust measure: A statistical measure that is not significantly affected by outliers.

Sensitive measure: A statistical measure that is significantly affected by outliers.

Interquartile Range (IQR): The difference between Q3 and Q1, representing the middle 50% of data.

Outlier analysis procedure:
  1. Identify potential outliers: Use 1.5×IQR rule or visual inspection
  2. Calculate summary statistics: With and without outliers
  3. Investigate outliers: Determine if they are legitimate or errors
  4. Decide on action: Keep, remove, or analyze separately
  5. Report transparently: Show impact of outliers on conclusions
Tip 1: Always calculate both robust and sensitive measures.
Tip 2: Outliers may contain important information.
Tip 3: Don't automatically remove outliers.
Tip 4: Use box plots to visualize outliers.
Tip 5: Consider the context when interpreting outliers.
Tip 6: Report both analyses when outliers are present.
Sensitivity Hierarchy: Range > Standard deviation > Mean > IQR > Median. Range is most affected by outliers, median is least affected.
Robust Alternatives: Use median instead of mean, IQR instead of range, and MAD instead of standard deviation when outliers are present.
Outlier Causes: Data entry errors, measurement errors, natural variation, or rare but legitimate events.
Outlier decision rules:

• Keep outliers: When they represent legitimate extreme values

• Remove outliers: When they are due to errors or impossible values

• Analyze separately: When they represent a different population

• Always investigate: Before making decisions about outliers

Outlier Effects Visualization
Understanding Outlier Impact
Key characteristics of outlier effects:
Mean: Highly sensitive to outliers
Median: Robust to outliers
Range: Very sensitive to outliers
IQR: Robust to outliers
Standard deviation: Highly sensitive to outliers

Analysis: Different summary statistics respond differently to outliers, affecting data interpretation.

  • Mean: Affected by all values, including outliers
  • Median: Unaffected by extreme values
  • Range: Highly dependent on min/max values
  • IQR: Focuses on central 50% of data
  • Standard deviation: Squares deviations, amplifying outliers

Questions & Answers

Question: How do I know if a value is really an outlier? Sometimes it just looks different but might be legitimate.

Answer: Use both statistical and contextual approaches:

  • Statistical rules: Use the 1.5×IQR rule or z-score method (values with |z| > 2 or 3)
  • Visual inspection: Look at box plots, histograms, or dot plots
  • Contextual analysis: Consider if the value makes sense in the real-world situation
  • Investigation: Look for data entry errors or special circumstances

Remember: A value can be statistically an outlier but still be legitimate. Always consider the context before deciding to remove it.

Question: Why is the IQR more robust than the range? What makes it resistant to outliers?

Answer: The IQR is more robust because it only uses the middle 50% of data:

  • Range uses: Only the two extreme values (minimum and maximum)
  • IQR uses: The middle 50% of data between Q1 and Q3
  • Outlier impact: Range is heavily influenced by outliers, IQR ignores them

Example: Dataset A: 10, 15, 20, 25, 30 (range = 20, IQR = 10)

Dataset B: 10, 15, 20, 25, 100 (range = 90, IQR = 10)

The outlier dramatically increases the range but doesn't affect the IQR.

Question: Should I always remove outliers from my data? When is it appropriate to keep them?

Answer: Never automatically remove outliers! Consider these factors:

  • Remove outliers when: They are data entry errors, impossible values, or due to measurement problems
  • Keep outliers when: They represent legitimate extreme values in the population
  • Analyze separately when: They come from a different population or process

Best practice: Always investigate outliers before deciding. Sometimes they contain important information about rare but important events. Report both analyses when outliers are present.

Question: Why does the standard deviation get so affected by outliers? Is there a mathematical reason?

Answer: The standard deviation is highly sensitive to outliers because of its mathematical formula:

  • Squaring deviations: The formula squares the differences from the mean, which amplifies large deviations
  • Formula: s = √[Σ(xi - x̄)²/n-1] - the squared terms make outliers have disproportionate influence
  • Mean dependence: The standard deviation uses the mean, which itself is affected by outliers

Example: If a value is 10 units away from the mean, it contributes 100 to the sum of squares, not just 10.

Alternative: Use MAD (Median Absolute Deviation) for a more robust measure of spread.

Question: When reporting results with outliers, what's the best practice for transparency?

Answer: Best practice includes:

  • Identify outliers: Clearly state which values are considered outliers
  • Report both analyses: Show results with and without outliers
  • Explain decisions: State reasons for keeping or removing outliers
  • Show impact: Demonstrate how outliers affect key statistics

Example reporting: "Data included one outlier (value = 120), which was retained as it represented a legitimate extreme event. Results with outlier: mean = 43.5, median = 36.5. Without outlier: mean = 35, median = 35."

This approach allows readers to understand the impact of outliers on your conclusions.