Solved Exercises on Comparing Distributions

Master distribution comparison techniques: center, spread, shape analysis through these 5 detailed exercises covering comparative statistical analysis.

Solution: Exercises 1 to 3
1 Comparing Centers and Spreads
Exercise 1
Compare the following two datasets representing test scores from two different classes: Class A: 75, 80, 82, 85, 88, 90, 92, 95 and Class B: 70, 75, 80, 85, 90, 95, 100, 105. Which class has a higher center? Which has more variability?
Definition:

Comparing distributions: Analyzing two or more datasets to identify similarities and differences in their center, spread, and shape.

Center: The typical or middle value in a dataset (mean, median).

Spread: How much the data values vary (range, IQR, standard deviation).

Comparison method:
  1. Calculate measures of center for both distributions
  2. Calculate measures of spread for both distributions
  3. Compare the centers and spreads numerically
  4. Assess the shapes of the distributions
  5. Draw conclusions based on the comparison
Step 1: Calculate measures for Class A

Mean = (75+80+82+85+88+90+92+95) ÷ 8 = 687 ÷ 8 = 85.875

Median = (85+88) ÷ 2 = 86.5

Range = 95 - 75 = 20

Q1 = (80+82) ÷ 2 = 81, Q3 = (90+92) ÷ 2 = 91

IQR = 91 - 81 = 10

Step 2: Calculate measures for Class B

Mean = (70+75+80+85+90+95+100+105) ÷ 8 = 710 ÷ 8 = 88.75

Median = (85+90) ÷ 2 = 87.5

Range = 105 - 70 = 35

Q1 = (75+80) ÷ 2 = 77.5, Q3 = (95+100) ÷ 2 = 97.5

IQR = 97.5 - 77.5 = 20

Step 3: Compare centers

Class A: Mean = 85.875, Median = 86.5

Class B: Mean = 88.75, Median = 87.5

Class B has a higher center (both mean and median are higher)

Step 4: Compare spreads

Class A: Range = 20, IQR = 10

Class B: Range = 35, IQR = 20

Class B has more variability (both range and IQR are higher)

Step 5: Draw conclusion

Class B has both a higher center and more variability than Class A.

Class B: Higher center (mean=88.75 vs 85.875), More variability (range=35 vs 20)
Final answer:

Class B has a higher center (mean = 88.75 vs 85.875) and more variability (range = 35 vs 20, IQR = 20 vs 10) than Class A. Class B's scores are both higher and more spread out than Class A's scores.

Applied rules:

• Center comparison: Compare means and medians

• Spread comparison: Compare ranges and IQRs

• Higher values: Indicate greater center or variability

2 Comparing Shapes and Outliers
Exercise 2
Compare the following datasets representing monthly sales (in thousands of dollars): Store 1: 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100 and Store 2: 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 200. Analyze the shapes and identify any outliers.
Definition:

Shape comparison: Analyzing the pattern of how data values are distributed across the range.

Outliers: Values that fall well outside the overall pattern of the data.

Step 1: Analyze Store 1

Mean = (50+55+60+65+70+75+80+85+90+95+100) ÷ 11 = 770 ÷ 11 = 70

Median = 75 (middle value)

Range = 100 - 50 = 50

Q1 = 60, Q3 = 90, IQR = 30

Shape: Approximately symmetric (mean ≈ median)

Step 2: Analyze Store 2

Mean = (45+50+55+60+65+70+75+80+85+90+200) ÷ 11 = 925 ÷ 11 = 84.09

Median = 70 (middle value)

Range = 200 - 45 = 155

Q1 = 55, Q3 = 85, IQR = 30

Shape: Right-skewed (mean > median)

Step 3: Check for outliers using 1.5×IQR rule

Store 1: Lower = 60 - 1.5×30 = 15, Upper = 90 + 1.5×30 = 135

All values in [50, 100] are within [15, 135] → No outliers

Store 2: Lower = 55 - 1.5×30 = 10, Upper = 85 + 1.5×30 = 130

Value 200 > 130 → 200 is an outlier

Step 4: Compare shapes

Store 1: Symmetric, no outliers

Store 2: Right-skewed due to outlier, has one outlier

Step 5: Compare centers and spreads

Store 1: Mean = 70, Median = 75, Range = 50

Store 2: Mean = 84.09, Median = 70, Range = 155

Store 2 has higher mean but lower median, much higher range

Store 1: Symmetric, no outliers; Store 2: Right-skewed, outlier at 200
Final answer:

Store 1 has a symmetric distribution with no outliers, while Store 2 has a right-skewed distribution with an outlier at $200,000. Store 2's mean ($84,090) is higher than Store 1's mean ($70,000), but Store 1's median ($75,000) is higher than Store 2's median ($70,000). Store 2 has much more variability (range = $155,000 vs $50,000).

Applied rules:

• Shape assessment: Mean vs median relationship indicates skewness

• Outlier detection: Values outside [Q1-1.5×IQR, Q3+1.5×IQR]

• Robust vs sensitive: Median more reliable than mean with outliers

3 Comprehensive Distribution Comparison
Exercise 3
Compare the following datasets representing commute times (in minutes): City A: 15, 20, 25, 30, 35, 40, 45, 50 and City B: 10, 15, 20, 25, 30, 35, 40, 45. Provide a complete comparison of shape, center, and spread.
Definition:

Complete comparison: Analyzing all three aspects of distributions (shape, center, spread) to fully understand differences.

Step 1: Analyze City A

Mean = (15+20+25+30+35+40+45+50) ÷ 8 = 260 ÷ 8 = 32.5

Median = (30+35) ÷ 2 = 32.5

Range = 50 - 15 = 35

Q1 = (20+25) ÷ 2 = 22.5, Q3 = (40+45) ÷ 2 = 42.5

IQR = 42.5 - 22.5 = 20

Shape: Symmetric (mean ≈ median)

Step 2: Analyze City B

Mean = (10+15+20+25+30+35+40+45) ÷ 8 = 220 ÷ 8 = 27.5

Median = (25+30) ÷ 2 = 27.5

Range = 45 - 10 = 35

Q1 = (15+20) ÷ 2 = 17.5, Q3 = (35+40) ÷ 2 = 37.5

IQR = 37.5 - 17.5 = 20

Shape: Symmetric (mean ≈ median)

Step 3: Compare shapes

Both distributions are approximately symmetric

Both have similar spread patterns

Step 4: Compare centers

City A: Mean = 32.5, Median = 32.5

City B: Mean = 27.5, Median = 27.5

City A has higher center by 5 minutes

Step 5: Compare spreads

City A: Range = 35, IQR = 20

City B: Range = 35, IQR = 20

Both cities have identical variability

Both symmetric; City A: Higher center (32.5 vs 27.5); Same spread (range=35, IQR=20)
Final answer:

Both cities have approximately symmetric distributions with identical variability (range = 35, IQR = 20). City A has a higher center (mean = 32.5 vs 27.5) but the same spread as City B. This suggests that commutes in City A are consistently about 5 minutes longer than in City B.

Applied rules:

• Complete analysis: Compare shape, center, and spread

• Similarity assessment: Equal ranges and IQRs indicate similar spread

• Center difference: Consistent offset in symmetric distributions

Distribution Comparison Framework
\text{Comparison} = \text{Shape}_1 - \text{Shape}_2, \text{Center}_1 - \text{Center}_2, \text{Spread}_1 - \text{Spread}_2
Comparison Formula
Shape
Symmetric vs Skewed
Unimodal vs Bimodal
Pattern comparison
Center
Mean, Median
Higher vs Lower
Typical value
Spread
Range, IQR
More vs Less variable
Variability measure
Key definitions:

Distribution comparison: The process of analyzing and contrasting two or more datasets to identify similarities and differences.

Statistical comparison: Using numerical measures to quantify differences between distributions.

Comparison process:
  1. Calculate measures: Compute center and spread for each distribution
  2. Assess shapes: Determine if distributions are symmetric, skewed, etc.
  3. Identify outliers: Check for extreme values in each distribution
  4. Compare quantitatively: Calculate differences in measures
  5. Draw conclusions: Interpret the differences in context
Tip 1: Always compare shape, center, and spread together.
Tip 2: Use robust measures (median, IQR) when outliers are present.
Tip 3: Consider the practical significance of differences.
Tip 4: Look for patterns across all three characteristics.
Shape Comparison: Symmetric vs skewed, unimodal vs bimodal, uniform vs clustered.
Center Comparison: Higher/lower means, median differences, mode patterns.
Comparison guidelines:

• Center: Higher mean/median indicates higher typical values

• Spread: Larger range/IQR indicates more variability

• Shape: Similar shapes indicate similar distribution patterns

Solution: Exercises 4 to 5
4 Real-World Distribution Comparison
Exercise 4
A company compares customer satisfaction ratings (1-10 scale) for two stores: Store X: 7, 7, 8, 8, 8, 9, 9, 9, 10, 10 and Store Y: 4, 5, 6, 7, 8, 8, 9, 9, 10, 10. Compare the distributions and determine which store performs better.
Definition:

Performance comparison: Using statistical measures to evaluate and contrast business metrics.

Customer satisfaction: Measuring customer experience quality through quantitative ratings.

Step 1: Analyze Store X

Mean = (7+7+8+8+8+9+9+9+10+10) ÷ 10 = 85 ÷ 10 = 8.5

Median = (8+9) ÷ 2 = 8.5

Range = 10 - 7 = 3

Q1 = 8, Q3 = 9, IQR = 1

Shape: Symmetric (mean ≈ median), concentrated in upper range

Step 2: Analyze Store Y

Mean = (4+5+6+7+8+8+9+9+10+10) ÷ 10 = 76 ÷ 10 = 7.6

Median = (8+8) ÷ 2 = 8

Range = 10 - 4 = 6

Q1 = 6, Q3 = 9, IQR = 3

Shape: Left-skewed (mean < median)

Step 3: Compare centers

Store X: Mean = 8.5, Median = 8.5

Store Y: Mean = 7.6, Median = 8

Store X has higher center (both mean and median)

Step 4: Compare spreads

Store X: Range = 3, IQR = 1

Store Y: Range = 6, IQR = 3

Store Y has more variability (both range and IQR are higher)

Step 5: Compare shapes

Store X: Symmetric, concentrated in 7-10 range

Store Y: Left-skewed, covers full 4-10 range

Store X: Higher center (8.5 vs 7.6), Less variability (IQR=1 vs 3), More consistent
Final answer:

Store X performs better with a higher center (mean = 8.5 vs 7.6) and less variability (IQR = 1 vs 3). Store X's ratings are more concentrated in the high range (7-10) with less spread, while Store Y has lower ratings on average and more inconsistent customer satisfaction.

Applied rules:

• Performance metrics: Higher center indicates better performance

• Consistency: Lower variability indicates more consistent performance

• Business context: Consider both center and spread for complete evaluation

5 Advanced Distribution Comparison
Exercise 5
Compare the following datasets representing daily temperatures (°F) in two cities over 10 days: City Alpha: 60, 65, 70, 75, 80, 85, 90, 95, 100, 105 and City Beta: 62, 64, 68, 72, 78, 82, 88, 92, 98, 102. Which city has more consistent temperatures?
Definition:

Temperature consistency: How little temperatures vary around the average value.

Climate comparison: Analyzing weather patterns using statistical measures.

Step 1: Analyze City Alpha

Mean = (60+65+70+75+80+85+90+95+100+105) ÷ 10 = 825 ÷ 10 = 82.5

Median = (80+85) ÷ 2 = 82.5

Range = 105 - 60 = 45

Q1 = (70+75) ÷ 2 = 72.5, Q3 = (90+95) ÷ 2 = 92.5

IQR = 92.5 - 72.5 = 20

Shape: Symmetric (mean ≈ median)

Step 2: Analyze City Beta

Mean = (62+64+68+72+78+82+88+92+98+102) ÷ 10 = 798 ÷ 10 = 79.8

Median = (78+82) ÷ 2 = 80

Range = 102 - 62 = 40

Q1 = (68+72) ÷ 2 = 70, Q3 = (92+98) ÷ 2 = 95

IQR = 95 - 70 = 25

Shape: Symmetric (mean ≈ median)

Step 3: Compare centers

City Alpha: Mean = 82.5, Median = 82.5

City Beta: Mean = 79.8, Median = 80

City Alpha has slightly higher temperatures on average

Step 4: Compare spreads

City Alpha: Range = 45, IQR = 20

City Beta: Range = 40, IQR = 25

City Alpha has smaller range but larger IQR

Step 5: Determine consistency

For consistency, we look at IQR (central 50% variability)

City Alpha: IQR = 20 (more consistent in middle 50%)

City Beta: IQR = 25 (less consistent in middle 50%)

City Alpha has more consistent temperatures

City Alpha: Higher average (82.5 vs 79.8), More consistent (IQR=20 vs 25)
Final answer:

City Alpha has more consistent temperatures with a smaller IQR (20 vs 25), despite having a slightly larger range (45 vs 40). City Alpha also has a higher average temperature (82.5°F vs 79.8°F). The middle 50% of City Alpha's temperatures are more tightly clustered than City Beta's.

Applied rules:

• Consistency measure: IQR represents central consistency

• Range vs IQR: Range shows total spread, IQR shows central spread

• Practical interpretation: Consider which measure is most relevant for consistency

Comprehensive Distribution Comparison Guide
\text{Comparison} = (\text{Shape}, \text{Center}, \text{Spread})_1 - (\text{Shape}, \text{Center}, \text{Spread})_2
Comparison Framework
Key definitions:

Distribution comparison: The systematic analysis of two or more datasets to identify similarities and differences in their statistical characteristics.

Shape: The pattern of how data values are distributed across the range of possible values.

Center: The typical or middle value that represents the central tendency of the data.

Spread: How much the data values vary or are dispersed from the center.

Complete comparison process:
  1. Calculate centers: Mean, median, mode for each distribution
  2. Calculate spreads: Range, IQR, standard deviation for each distribution
  3. Assess shapes: Symmetric, skewed, uniform, bimodal for each distribution
  4. Identify outliers: Check each distribution for extreme values
  5. Compare quantitatively: Calculate differences between measures
  6. Interpret contextually: Explain differences in practical terms
Tip 1: Always compare all three aspects: shape, center, and spread.
Tip 2: Use robust measures (median, IQR) when outliers are present.
Tip 3: Consider the practical significance of statistical differences.
Tip 4: Look for patterns across all characteristics simultaneously.
Tip 5: Consider sample size differences when comparing distributions.
Tip 6: Use visual displays to aid in comparing distributions.
Shape Patterns: Symmetric (bell-shaped), right-skewed (tail right), left-skewed (tail left), uniform (flat), bimodal (two peaks).
Center Selection: Mean for symmetric data, median for skewed data, mode for categorical data.
Spread Measures: Range (sensitive to outliers), IQR (robust), standard deviation (sensitive to outliers).
Comparison principles:

• Shape assessment: Mean vs Median relationship indicates skewness direction

• Center comparison: Higher values indicate greater typical values

• Spread comparison: Larger values indicate more variability

• Outlier impact: Consider robust measures when outliers present

Distribution Comparison Visualization
Understanding Distribution Comparison
Key characteristics of distribution comparison:
Shape: Symmetric, skewed, uniform, bimodal
Center: Mean, median, mode
Spread: Range, IQR, standard deviation
Outliers: Values outside normal pattern
Context: Real-world interpretation

Analysis: Complete distribution comparison combines shape, center, and spread for comprehensive data understanding.

  • Shape: Pattern of data distribution
  • Center: Typical value in dataset
  • Spread: Variability of data values
  • Outliers: Extreme values affecting analysis
  • Context: Practical interpretation of results

Questions & Answers

Question: When comparing two distributions, which is more important - center or spread? How do I decide?

Answer: The importance depends on the context and research question:

  • Center is more important when: You want to know which group has higher/lower typical values (e.g., comparing test scores, comparing average income)
  • Spread is more important when: You want to know which group is more consistent or has more variability (e.g., comparing quality control, comparing investment risk)

Best practice: Always consider both center and spread together, as they provide different insights. Sometimes a group with a lower center but less spread might be preferable to a group with a higher center but more variability.

For example, when comparing job offers, you might prefer one with a slightly lower salary but consistent pay (low spread) over one with higher average pay but high variability.

Question: How do I compare distributions when they have different sample sizes? Does this affect the comparison?

Answer: Different sample sizes can affect comparisons in several ways:

  • Center measures: Means and medians are generally comparable regardless of sample size
  • Spread measures: Range tends to increase with larger samples, but IQR and standard deviation are more stable
  • Shape assessment: Larger samples provide more reliable estimates of true distribution shape

Recommendations:

  • Focus on relative differences rather than absolute differences
  • Be cautious when comparing ranges across different sample sizes
  • Use standardized measures (like coefficient of variation) when comparing spread across different scales

For example, if comparing test scores from a class of 20 vs a class of 100, the larger class might have a slightly larger range simply due to more opportunities for extreme values.

Question: What if two distributions have the same center but different spreads? What does this mean practically?

Answer: This means both groups have the same typical value but different consistency:

  • Smaller spread: Values are more clustered around the center, more predictable, more consistent
  • Larger spread: Values are more dispersed, less predictable, more variable

Practical examples:

  • Two basketball players with same average points but different consistency
  • Two investments with same expected return but different risk levels
  • Two manufacturing processes with same target but different precision

The group with smaller spread is generally more reliable and predictable, while the group with larger spread has more uncertainty and potential for extreme outcomes.

Question: How do I write a complete comparison of two distributions? What elements should I include?

Answer: A complete distribution comparison should include:

  • Shape comparison: Symmetric vs skewed, uniform vs clustered, presence of outliers
  • Center comparison: Mean and median values, which is higher/lower
  • Spread comparison: Range and IQR values, which is more/less variable
  • Numerical differences: Specific differences in values
  • Practical interpretation: What the differences mean in context

Example structure: "Distribution A has a [higher/lower] center ([mean] vs [mean]) and [more/less] variability ([range] vs [range]) than Distribution B. Both distributions are [shape]. This suggests [practical interpretation]."

Always connect statistical findings back to the real-world context of the comparison.

Question: When comparing distributions, how do I determine if differences are practically significant versus just statistically significant?

Answer: Statistical significance vs practical significance:

  • Statistical significance: Whether differences are unlikely due to chance (depends on sample size and variability)
  • Practical significance: Whether differences are meaningful in real-world context

To assess practical significance:

  • Consider the magnitude of differences relative to the scale of measurement
  • Think about the real-world impact of the differences
  • Consult domain experts about what constitutes meaningful differences
  • Consider the cost/benefit of acting on the differences

For example, a statistically significant difference of 0.1 points in test scores might not be practically significant, but a difference of 10 points likely is.