b. Numerical Data
Our running example for numerical data:
Numerical data needs different tools than categorical data:
A dot plot shows every individual data point — handy when the dataset is small enough to see each value:
Each dot = one Michigan county. For larger datasets, the histogram’s binning becomes more practical.
Mean: arithmetic average
\bar{x}=\frac{x_1+x_2+\cdots+x_n}{n}
Median: middle value when data are ordered
| mean | median |
|---|---|
| 78.04 | 77.85 |
Mean (red, dashed) sits just above the median (blue, solid) — the distribution leans slightly right.
Five students reported how many hours they volunteered last month:
2, \ 5, \ 8, \ 10, \ 100
(One spent a full week on a campaign event.) Compute — advance for answers:
| Question | Answer |
|---|---|
| Mean? | (2+5+8+10+100)/5 = 25 |
| Median? | the middle value = 8 |
| Which is bigger — and why? | mean (the 100 pulls it way up) |
Shape describes the overall form of the distribution. Three common shapes:
Symmetric
Right-skewed
Left-skewed
The MI life expectancy histogram is mildly right-skewed — that’s why the mean came out slightly above the median.
Population by Michigan county — a strongly right-skewed distribution:
Mean = 120,028 (red, dashed); median = 37,711 (blue, solid). Wayne County (Detroit, ~1.75M) and a handful of other large counties pull the mean far above the median.
The five-number summary captures a distribution with five values:
| min | Q1 | median | Q3 | max |
|---|---|---|---|---|
| 75.08 | 77.3 | 77.85 | 78.84 | 81.88 |
Quartiles are special percentiles — the Pth percentile is the value below which P% of observations fall. Q1 = 25th, the median = Q2 = 50th, Q3 = 75th.
For MI counties: half have life expectancy below 77.8 years, and the middle 50% spans 77.3 to 78.8 years.
Range = max − min
IQR = Q3 − Q1
Standard deviation
s = \sqrt{\frac{\sum_{i=1}^n(x_i-\bar{x})^2}{n-1}}
| range | IQR | SD |
|---|---|---|
| 6.8 | 1.54 | 1.21 |
Blue lines mark Q1, median, Q3 (and the band between Q1 and Q3 is the IQR). Red dashed lines mark the mean and ±1 SD. Range = full width of the plot.
Outlier: a data point unusually far from the rest. The 1.5×IQR rule flags points more than 1.5×IQR beyond Q1 or Q3.
For MI counties:
2 outliers — Leelanau County (81.9 years) and Ottawa County (81.3 years), both with unusually high life expectancy.
Daily commute time (minutes) for a small class:
| min | Q1 | median | Q3 | max |
|---|---|---|---|---|
| 5 | 10 | 15 | 22 | 60 |
Apply the 1.5 × IQR rule — advance for answers:
| Question | Answer |
|---|---|
| IQR? | Q3 − Q1 = 22 − 10 = 12 |
| 1.5 × IQR? | 1.5 × 12 = 18 |
| Lower bound (Q1 − 1.5×IQR)? | 10 − 18 = −8 |
| Upper bound (Q3 + 1.5×IQR)? | 22 + 18 = 40 |
| Any outliers? | yes — the 60-min commute is above the upper bound |
A box plot is the five-number summary made visual: box spans Q1 → Q3 (the IQR), line inside the box marks the median, whiskers reach to the min/max excluding outliers, dots are outliers (1.5×IQR rule).
Center
Spread
Choose resistant measures (median + IQR) when data are skewed or have outliers.
For this distribution of home sale prices in Ames, Iowa (2,930 homes), decide — advance for answers:
| Question | Answer |
|---|---|
| Shape (symmetric / right-skewed / left-skewed)? | right-skewed |
| Mean vs median (>, <, or ≈)? | mean > median |
| Better summary of center — mean or median? | median |
| Better summary of spread — SD or IQR? | IQR |