Descriptive Statistics: Mean, Median, IQR, Quartiles, and Related Examples

Population mean and center measures

  • Population mean is denoted by μ\mu.

  • The sample mean is the typical point estimate for the population mean and is the focus when discussing samples.

  • In the transcript, the population mean is described using a Greek letter with a tag; standard notation is μ\mu for the population mean.

  • The sample mean is the most appropriate measure of center for normal or approximately normal distributions (i.e., symmetric distributions). It is sensitive to skew and to outliers, so in skewed distributions or data with outliers the mean can be misleading.

  • For skewed or non-normal distributions, the median is preferred as a measure of center.

Center measures: mean vs median

  • When to use the mean:

    • Normal or approximately normal distributions (symmetric).

  • When to use the median:

    • Skewed distributions or distributions with outliers; it is a resistant measure of center.

  • Terminology:

    • Median = the midpoint; about 50% of data lie below and 50% above (also the 50th percentile).

The Median: how to compute

  • Steps to compute the median:

    • 1) Arrange data in increasing order.

    • 2) Compute the location of the median as: location=n+12\text{location} = \dfrac{n+1}{2}.

    • 3) If n is odd, the median is the data value at that location.

    • 4) If n is even, the median is the average of the two middle values.

  • If the location is a decimal (e.g., 8.5 or 12.5), take the two data values closest to that location (e.g., for location 12.5 use the 12th and 13th values) and average them.

  • Examples in the lecture illustrate: when the location is 8.5, you take the 8th and 9th data values; when the location ends up as a decimal like 12.5 (e.g., with n even), you take the two surrounding data points and average them.

  • Why this matters:

    • The median is resistant to outliers and is appropriate for skewed data.

Measures of spread: Range and IQR

  • Range:

    • Definition: Range=max(D)min(D)\text{Range} = \max(D) - \min(D), where D is the data set.

    • Pros: simple and quick.

    • Cons: can be uninformative about the distribution's shape.

  • Interquartile Range (IQR):

    • Definition: IQR=Q<em>3Q</em>1\text{IQR} = Q<em>3 - Q</em>1.

    • It measures the spread of the middle 50% of the data.

  • Quartiles:

    • There are four quarters; the first quartile Q<em>1Q<em>1 marks the 25th percentile, the second quartile Q</em>2Q</em>2 marks the 50th percentile (the median), and the third quartile Q3Q_3 marks the 75th percentile.

    • How to obtain them:

    • Find the median (Q2Q_2).

    • Then Q1Q_1 is the median of the lower half of the data (values strictly below the median, not including it).

    • Q3Q_3 is the median of the upper half (values strictly above the median).

  • Percentiles:

    • A percentile is the value below which a given percentage of data fall. For example, the 25th percentile is the value with 25% of the data below it; the 50th percentile is the median; the 75th percentile is the 0.75 quantile.

Example 1: Tornado deaths in the US (1990–2000)

  • Data (sorted): 25,30,33,39,39,40,53,67,69,94,13025, 30, 33, 39, 39, 40, 53, 67, 69, 94, 130

  • Number of values: n=11n = 11.

  • Note on counting years: 1990 through 2000 inclusive yields 11 years.

  • Median:

    • Location: n+12=122=6\dfrac{n+1}{2} = \dfrac{12}{2} = 6

    • 6th value is 4040 → Median = 4040.

  • Range:

    • maxmin=13025=105\max - \min = 130 - 25 = 105.

  • Quartiles:

    • Lower half (values below the median): 25,30,33,39,3925, 30, 33, 39, 39

    • Q1=extmedianoflowerhalf=33Q_1 = ext{median of lower half} = 33 (3rd value in that half).

    • Upper half (values above the median): 53,67,69,94,13053, 67, 69, 94, 130

    • Q3=extmedianofupperhalf=69Q_3 = ext{median of upper half} = 69 (3rd value in that half).

  • Interquartile Range:

    • IQR=Q<em>3Q</em>1=6933=36\text{IQR} = Q<em>3 - Q</em>1 = 69 - 33 = 36.

Example 2: Histogram of international call lengths

  • Data representation: frequencies by interval (from the histogram in the lecture)

    • 0–8 min: 13

    • 8–16 min: 2

    • 16–24 min: 9

    • 24–32 min: 5

    • 32–40 min: 6

    • 40–48 min: 7

    • 48–56 min: 0

    • 56–60 min: 1

  • Total observations: n=44n = 44 (as stated in the lecture).

  • Median (location): n+12=452=22.5\dfrac{n+1}{2} = \dfrac{45}{2} = 22.5; a decimal location means the median lies in the interval containing the 22nd and 23rd observations.

    • Cumulative counts: 13 (0–8), 15 (up to 8–16), 24 (up to 16–24). Since 22 and 23 fall within the 16–24 interval, the median lies in [16,24][16, 24].

  • Q1 (lower half, 22 data values): location 22+12=11.5\dfrac{22+1}{2} = 11.5; the 11th and 12th data values lie within the first interval (0–8), so Q1[0,8]Q_1 \in [0, 8].

  • Q3 (upper half, 22 data values): the middle of the upper half similarly lands in the interval [32,40][32, 40], so Q3[32,40]Q_3 \in [32, 40].

  • Note: exact quartile values cannot be determined from a histogram alone; we can only specify the intervals in which they fall.

Example 3: Unemployment rates (June 2016)

  • Data organization:

    • Data presented in two columns (lower half on the left, upper half on the right) and arranged in increasing order; total n=26n = 26.

  • Median (Q2):

    • Location: n+12=272=13.5\dfrac{n+1}{2} = \dfrac{27}{2} = 13.5, which lies between the 13th and 14th values (between the two middle entries across halves).

    • Therefore, Q2=4.5+4.62=4.55Q_2 = \dfrac{4.5 + 4.6}{2} = 4.55.

  • First quartile (Q1):

    • Lower half has 13 values; location 13+12=7\dfrac{13+1}{2} = 7; the 7th value is 3.73.7Q1=3.7Q_1 = 3.7.

  • Third quartile (Q3): symmetry implies the upper half median; given the data, Q3=5.0Q_3 = 5.0.

  • Interquartile Range:

    • IQR=Q<em>3Q</em>1=5.03.7=1.3\text{IQR} = Q<em>3 - Q</em>1 = 5.0 - 3.7 = 1.3.