Course contentsShow
← Machine Learning and Deep Learning
Lesson 77 of 3,5381. Mathematical Foundations for Machine LearningFree lesson

Descriptive Statistics: Spread and Variability

Measuring variance, standard deviation, range, and interquartile range to quantify data spread.

Descriptive Statistics: Spread and Variability

What you'll learn: How to measure how "spread out" your data is using variance, standard deviation, range, and interquartile range.

Why Spread Matters

Knowing the mean tells you the center of your data, but it doesn't tell the full story. Imagine two datasets with the same mean: one where all values cluster tightly around 10, and another where values swing wildly from 0 to 20. They're very different! Spread (or variability) quantifies this difference.

Key Measures of Spread

Range

The simplest measure: maximum value - minimum value. If your dataset is [2, 5, 8, 12], the range is 12 - 2 = 10. Easy, but sensitive to outliers.

Variance

This measures the average squared distance from the mean. It's the concept you already learned in "Variance and Standard Deviation," but now applied to describe real datasets. Higher variance = more spread out data.

Standard Deviation

The square root of variance. Why take the square root? To get back to the original units of your data. If measuring heights in centimeters, variance is in cm², but standard deviation is back in cm—much more interpretable!

Interquartile Range (IQR)

The range of the middle 50% of your data. Calculate the 75th percentile (Q3) minus the 25th percentile (Q1). This is robust to outliers—extreme values don't distort it like they do range.

Choosing the Right Measure

  • Range: Quick snapshot, but outliers dominate
  • Standard deviation: Most common; pairs naturally with the mean
  • IQR: Best when data has outliers or is skewed

Key Takeaway: Spread measures quantify how dispersed your data is—variance and standard deviation capture average distance from the mean, while range and IQR describe the full or central span of values.