Introduction

Measures of central tendency (mean, median, and mode) tell us about the “middle” or “typical” value in a dataset. However, they don’t tell us how spread out the data points are. Two datasets can have identical means but be drastically different in their structure.

Measures of dispersion tell us how spread out the data is around the central value. The key measures we’ll explore are:

  • Range: The difference between the maximum and minimum values
  • Variance: The average of squared deviations from the mean
  • Standard Deviation: The square root of the variance
  • Interquartile Range (IQR): The range of the middle 50% of the data

As we learn from the lecture slides: Whenever you report a measure of central tendency, you should report a measure of dispersion.

Same Mean, Different Variance: Understanding Dispersion Visually

To understand the concept of variance, let’s start with a visual example. Below are three distributions that all have the same mean (50) but different amounts of spread around that mean:

Summary Statistics for the Three Distributions
distribution Mean Median SD Variance Range
High Variability (SD = 30) 49.40 48.48 29.35 861.47 188.09
Low Variability (SD = 5) 50.08 50.05 4.96 24.59 30.25
Medium Variability (SD = 15) 50.64 50.82 15.15 229.37 96.57

Observations:

  • Notice how all three distributions have approximately the same mean (~50)
  • The “Low Variability” distribution is tall and narrow - most values are clustered tightly around the mean
  • The “High Variability” distribution is short and wide - values are spread far from the mean
  • The variance increases dramatically as the spread increases (variance is the square of standard deviation)

Range: The Simplest Measure of Dispersion

The range is the difference between the maximum and minimum values in a dataset. It’s the simplest measure of dispersion.

Ranges of the Three Distributions
Distribution Range
Low Variability 30.25407
Medium Variability 96.57348
High Variability 188.08924

Limitations of Range:

  • Very sensitive to outliers - one extreme value can drastically change the range
  • Only uses two points in the entire dataset (the minimum and maximum)
  • Doesn’t tell us anything about how the data is distributed between these extremes

As the lecture notes state: Like the mean, the range is very sensitive to extreme scores!

Variance: The Average Squared Deviation

The variance measures how far each value in the dataset is from the mean. It’s calculated by:

  1. Finding the difference between each value and the mean (the deviation)
  2. Squaring each deviation
  3. Finding the average of these squared deviations

Let’s calculate the variance step by step for a small dataset:

Step-by-step Variance Calculation
Value Deviation.from.Mean Squared.Deviation
4 -14 196
8 -10 100
15 -3 9
16 -2 4
23 5 25
42 24 576
## Mean = 18
## Sum of Squared Deviations = 910
## Variance = 151.6667

The Variance Formula

The variance is calculated as the average of squared deviations from the mean:

\(\text{Variance} = \frac{\sum(\text{value} - \text{mean})^2}{\text{count}}\)

Note: You may sometimes see different formulas with either n or (n-1) in the denominator. These distinguish between population variance and sample variance, but this distinction is not important for descriptive statistics (what we’re currently learning). We will cover sampling concepts later in the course.

Why Square the Deviations?

There are two main reasons for squaring the deviations:

  1. To eliminate negative values: Some values are below the mean (negative deviations) and some are above (positive deviations). If we simply averaged the deviations, they would cancel each other out, and the result would always be zero!

  2. To emphasize larger deviations: Squaring gives more weight to larger deviations, making the variance more sensitive to outliers and extreme values.

Standard Deviation: Back to Original Units

As the lecture notes state: Although variance is central to many of our advanced statistical methods, it is difficult for our brains to think in squared units.

The standard deviation addresses this problem. It’s simply the square root of the variance:

\(\text{Standard Deviation} = \sqrt{\text{Variance}}\)

Note: You may sometimes see standard deviation represented as σ (sigma) for populations or s for samples, but this distinction is not important for descriptive statistics at this stage of the course.

## Variance = 151.6667 (squared units)
## Standard Deviation = 12.3153 (original units)

Interpreting Standard Deviation

The standard deviation tells us about the typical or average distance of data points from the mean. A small standard deviation indicates that data points are clustered closely around the mean, while a large standard deviation indicates that data points are spread out over a wider range.

Note About Notation: You may sometimes see the standard deviation represented as σ (sigma) for population data or s for sample data. This distinction is not important for descriptive statistics at this point in the course. We’ll cover sampling theory later.

For normally distributed data, the standard deviation can be used to determine the percentage of data that falls within certain ranges from the mean, but we’ll cover this more in the unit on normal distributions.

Quartiles and Interquartile Range (IQR)

Quartiles divide a dataset into four equal parts:

  • First quartile (Q1): 25% of data values are below this point
  • Second quartile (Q2): The median; 50% of data values are below this point
  • Third quartile (Q3): 75% of data values are below this point

The Interquartile Range (IQR) is the difference between the third quartile and the first quartile:

\[IQR = Q3 - Q1\]

The IQR represents the middle 50% of the data and is a robust measure of dispersion that isn’t affected by outliers.

Five-Number Summary Plus Additional Statistics
Statistic Value
Minimum 20.00
Q1 (25th percentile) 44.67
Median (50th percentile) 51.01
Q3 (75th percentile) 58.62
Maximum 105.00
IQR 13.95
Mean 52.31
Standard Deviation 13.21

Why Use IQR Instead of Standard Deviation?

The IQR has several advantages:

  1. Robustness to outliers: Extreme values don’t affect the IQR because it only considers the middle 50% of the data
  2. Suitable for skewed distributions: Works well even when data isn’t normally distributed
  3. Used to identify outliers: Values more than 1.5 × IQR below Q1 or above Q3 are often considered outliers

Boxplots: Visualizing Distributions

A boxplot (also called a box-and-whisker plot) is a standardized way of displaying the distribution of data based on the five-number summary:

Comparing Distributions with Boxplots

Boxplots are especially useful for comparing multiple distributions side by side:

Detecting Skewness: Relationship Between Mean and Median
group Mean Median Skew Direction
Approximately symmetric 65.7 69.2 Left (Negative) Skew
Approximately symmetric but with outliers 50.9 50.7 Right (Positive) Skew
Right Skewed 33.5 30.7 Right (Positive) Skew
Symmetric 49.8 49.2 Right (Positive) Skew

Reading Skewness from Boxplots

You can determine skewness from a boxplot by looking at:

  1. Relative positions of the median line: If the median is closer to the bottom of the box (Q1), the distribution is positively skewed. If closer to the top (Q3), it’s negatively skewed.

  2. Whisker lengths: Unequal whisker lengths suggest skewness. A longer upper whisker indicates positive skew; a longer lower whisker indicates negative skew.

  3. Outlier positions: More outliers on one side suggest skewness in that direction.

Choosing the Right Measure of Dispersion

Different measures of dispersion are appropriate in different situations:

Comparing Different Measures of Dispersion
Measure When.to.Use Advantages Limitations
Range For a quick, simple measure of total spread Easy to calculate and understand Extremely sensitive to outliers
Variance For statistical modeling and analysis of variation Mathematical basis for many statistical methods Not in original units, harder to interpret directly
Standard Deviation For describing normal or near-normal distributions Same units as data, good interpretability with normal distributions Can be misleading for skewed distributions
IQR For skewed distributions or when outliers are present Robust against outliers, works with any distribution shape Only uses information about the middle of the distribution

The Impact of Outliers

Let’s see how outliers affect these different measures:

How Different Measures Respond to an Outlier
Measure Without.Outlier With.Outlier Percent.Change
Range Range 37.47 123.19 228.8
SD SD 9.32 16.92 81.5
IQR IQR 12.66 12.76 0.8

As we can see, adding just one outlier: - Dramatically increases the range - Substantially increases the standard deviation - Has minimal effect on the IQR

This is why the IQR is often preferred for skewed distributions or data with outliers.

Example: Comparing Different Datasets

Let’s analyze two test score distributions to demonstrate all these concepts together:

Summary Statistics for Test Scores by Class
class Mean Median SD Variance Range IQR Q1 Q3
Class A 74.8 74.6 4.9 24.1 18.8 5.8 71.6 77.4
Class B 75.5 75.4 10.8 117.0 31.2 20.9 65.0 85.9

Interpretation

The summary statistics show that both classes have similar means (around 75), but their distributions are very different:

  1. Class A:
    • Has a normal, symmetrical distribution
    • Most students score close to the average (small standard deviation)
    • The mean and median are very close
  2. Class B:
    • Has a bimodal distribution (two distinct groups)
    • Much higher variability (larger standard deviation)
    • Students tend to be either high performers or low performers
    • The mean and median are still close because the distribution is symmetrically bimodal

This example demonstrates why looking at measures of central tendency alone is insufficient. The measures of dispersion tell us important information about how the scores are distributed.

Conclusion: When to Use Which Measure

As the lecture slides state: When telling about a quantitative variable, always report the shape of its distribution, along with a center and a dispersion.

Here’s a summary of when to use which combination of measures:

  1. For symmetrical, normal distributions:
    • Mean as a measure of central tendency
    • Standard deviation as a measure of dispersion
  2. For skewed distributions or distributions with outliers:
    • Median as a measure of central tendency
    • IQR as a measure of dispersion
  3. For complex distributions (like bimodal):
    • Multiple measures and visual representations
    • Consider reporting both mean/SD and median/IQR

Remember, understanding variability helps us see beyond averages to develop a richer, more complete understanding of our data.