---
title: "Describing Data"
book: "University Economics — Year 1"
subject: economics
language: en
chapter: 29
exercises: 12
source: https://one-course.com/books/economics/3/en/chapter/29-describing-data
license: CC-BY-NC-SA-4.0
credit: "One Economics Book, One Course (one-course.com)"
---

# Chapter 29 — Describing Data

In 1978, 2,490 American men of a household panel earned on average 21,554 dollars of 1982, and $51.4\%$ of them earned less than that average. (The samples of this chapter and the next three measure earnings in dollars of 1982.)

In the United States in 2022, the richest hundredth of the population had an average income 9.37 times the median. A mean is a fine summary of a symmetric distribution and a poor one of a skewed one, and incomes are skewed. This chapter describes data before any model: distributions, their centre and spread, how two variables move together, how means differ across groups — and the traps in each.

![Average income per person of each hundredth of the population, United States, 2022, dollars a day at 2021 purchasing power, on an ordinary axis (left) and a logarithmic axis (right).](https://one-course.com/images/onecourse/chapters/economics-3/b1-describing-data/fig-058c0aa70242.svg)

*Average income per person of each hundredth of the population, United States, 2022, dollars a day at 2021 purchasing power, on an ordinary axis (left) and a logarithmic axis (right). Source: World Bank, Poverty and Inequality Platform ([percentiles](#def-b1-describing-data-quantile))*

On the ordinary axis the bottom four-fifths are squeezed together and the top hundredth stands alone at 629 dollars a day. On the logarithmic axis, equal distances are equal ratios: the median, 67 dollars, is 2.7 times the tenth hundredth and 0.4 times the ninetieth.

**You already know.**

Mean, median, quartiles, variance and standard deviation were met in the mathematics series; the Lorenz curve, the Gini coefficient and top shares at school. Python and pandas are [Chapter 28](https://one-course.com/books/economics/3/en/chapter/28-economic-data-with-python#ch-b1-economic-data-python).

**How it is measured — Income in a survey.**

The opening chart’s incomes come from a household survey. Household income is divided by the number of members, which assumes that everyone in the household shares equally; and wealthy households are less likely to answer, so the distribution may have too thin a tail at the top. Tax records, which reach the top better, give larger top shares.

## 29.1 Histograms and quantiles

**Definition 29.1 (Histogram).**

A *histogram* divides the range of a variable into bins and draws over each a bar whose area is the share of observations in the bin: its height is the share divided by the bin’s width, a *density*, so that the areas sum to 1 whatever the widths.

**Definition 29.2 (Empirical distribution function).**

The *empirical distribution function* of a sample $x_1, \dots, x_n$ is $\hat F(t) = \frac1n\#\{i : x_i \le t\}$, the share of observations at or below $t$.

**Definition 29.3 (Quantile, percentile).**

The *quantile* of order $p$ is the smallest value $t$ with $\hat F(t) \ge p$ (or an interpolation between two observations, as pandas does by default); the $p$-th *percentile* is the quantile of order $p/100$.

```python
"""Earnings in 1978 of 2,490 American men (PSID sample): a histogram and quantiles."""

import numpy as np
from econdata import nsw

earn = nsw("psid_controls").re78  # dollars of 1982
counts, edges = np.histogram(earn, bins=np.arange(0, 130_001, 10_000))
width = edges[1] - edges[0]
density = counts / (len(earn) * width)  # the bars' areas sum to 1
for lo, n, d in zip(edges[:-1], counts, density):
    print(f"{lo:>7,.0f} to {lo + width:>7,.0f}: {n:5d}  density {d:.2e}")

q = earn.quantile([0.1, 0.25, 0.5, 0.75, 0.9]).round(0)
print(q.to_string())
print(
    f"mean {earn.mean():,.0f}; share below the mean {(earn < earn.mean()).mean():.3f}"
)
```

***Listing 29.1.** A [histogram](#def-b1-describing-data-histogram) as a table of densities, and five [quantiles](#def-b1-describing-data-quantile). code/bachelor-1/29-describing-data/listings/histogram.py*

```
$ python histogram.py
      0 to  10,000:   562  density 2.26e-05
 10,000 to  20,000:   623  density 2.50e-05
 20,000 to  30,000:   730  density 2.93e-05
 30,000 to  40,000:   370  density 1.49e-05
 40,000 to  50,000:   108  density 4.34e-06
 50,000 to  60,000:    41  density 1.65e-06
 60,000 to  70,000:    17  density 6.83e-07
 70,000 to  80,000:    20  density 8.03e-07
 80,000 to  90,000:    11  density 4.42e-07
 90,000 to 100,000:     4  density 1.61e-07
100,000 to 110,000:     1  density 4.02e-08
110,000 to 120,000:     2  density 8.03e-08
120,000 to 130,000:     1  density 4.02e-08
0.10        0.0
0.25    11526.0
0.50    20688.0
0.75    29554.0
0.90    38421.0
mean 21,554; share below the mean 0.514
```

***Output 29.1.** A long right tail: a few men above 100,000 dollars, a tenth at zero.*

## 29.2 Mean, variance and skewness

**Definition 29.4 (Skewness).**

The *skewness* of a sample is $\frac1n\sum_i (x_i - \bar x)^3/s^3$, with $s^2 = \frac1n\sum_i (x_i - \bar x)^2$: positive when the right tail is longer, negative when the left one is, zero for a symmetric distribution.

```python
"""Mean, standard deviation and skewness of earnings and of their logarithm."""

import numpy as np
from econdata import nsw
from scipy.stats import skew

earn = nsw("psid_controls").re78
pos = earn[earn > 0]  # the logarithm needs positive earnings
print("zero earnings:", (earn == 0).sum())
for name, x in [("earnings", pos), ("log earnings", np.log(pos))]:
    print(
        f"{name:13s} mean {x.mean():10.3f}  sd {x.std():10.3f}  skewness {skew(x):6.3f}"
    )
```

***Listing 29.2.** The first three moments, of earnings and of their logarithm. code/bachelor-1/29-describing-data/listings/moments.py*

```
$ python moments.py
zero earnings: 286
earnings      mean  24350.845  sd  14326.321  skewness  1.645
log earnings  mean      9.897  sd      0.746  skewness -1.913
```

***Output 29.2.** Positive earnings skewed to the right ($1.645$); their logarithm skewed to the left ($-1.913$).*

The logarithm pulls in the long right tail, but it stretches the left one: a man with very low positive earnings sits far below the others on a log scale. In Brenland’s survey, where no household has income near zero, the logarithm of [disposable income](https://one-course.com/books/economics/3/en/chapter/18-national-accounts-in-depth#def-b1-national-accounts-in-depth-gni) has a [skewness](#def-b1-describing-data-skewness) of $-0.123$, against $1.436$ for the level (weekend problem). Whether the logarithm makes a distribution symmetric depends on its bottom as much as on its top.

## 29.3 Covariance and correlation

**Definition 29.5 (Sample covariance, correlation coefficient).**

The *sample covariance* of $x$ and $y$ is $s_{xy} = \frac1{n-1}\sum_i (x_i - \bar x)(y_i - \bar y)$; the *correlation coefficient* is $r = s_{xy}/(s_x s_y)$.

**Proposition 29.6 (Range of the correlation).**

$-1 \le r \le 1$, with $|r| = 1$ if and only if the points lie on a straight line that is not horizontal or vertical.

**Proof.** Let $a_i = x_i - \bar x$ and $b_i = y_i - \bar y$. By the Cauchy–Schwarz inequality, $(\sum_i a_ib_i)^2 \le \sum_i a_i^2 \sum_i b_i^2$, so $s_{xy}^2 \le s_x^2 s_y^2$ and $r^2 \le 1$. Equality holds when $b = \lambda a$ for some $\lambda \ne 0$, that is $y_i - \bar y = \lambda(x_i - \bar x)$ for every $i$. ∎

```python
"""Covariance and correlation: earnings in 1975 and 1978, and a parabola."""

import numpy as np
from econdata import nsw

d = nsw("psid_controls")
x, y = d.re75, d.re78
n = len(d)
cov = ((x - x.mean()) * (y - y.mean())).sum() / (n - 1)
r = cov / (x.std() * y.std())  # pandas' std divides by n - 1 too
print(f"by hand:     cov {cov:,.0f}  r {r:.4f}")
print(f"with pandas: cov {x.cov(y):,.0f}  r {x.corr(y):.4f}")

rng = np.random.default_rng(2026)
u = rng.uniform(-1, 1, 1000)
v = u**2  # v is a function of u, yet ...
print(f"parabola:    r {np.corrcoef(u, v)[0, 1]:.4f}")
```

***Listing 29.3.** Covariance and correlation by hand and with pandas, and a correlation that misses a parabola. code/bachelor-1/29-describing-data/listings/covariance.py*

```
$ python covariance.py
by hand:     cov 154,706,518  r 0.7315
with pandas: cov 154,706,518  r 0.7315
parabola:    r 0.0672
```

***Output 29.3.** Earnings in 1975 and 1978: $r = 0.73$. A parabola: $r$ near 0.*

A correlation measures how close the points are to a straight line. It says nothing about a relation that is not linear: on a symmetric range, $v = u^2$ is entirely determined by $u$, and the correlation is near zero.

![Three seeded samples of 200 points: close to a line, a cloud, and a parabola whose correlation is near zero although y is a function of x.](https://one-course.com/images/onecourse/chapters/economics-3/b1-describing-data/fig-179e8c7b27a0.svg)

*Three seeded samples of 200 points: close to a line, a cloud, and a parabola whose correlation is near zero although $y$ is a function of $x$.*

## 29.4 Conditional means

**Definition 29.7 (Conditional mean (in data)).**

The *conditional mean* of $y$ given $x = a$ in a sample is the mean of $y$ over the observations with $x = a$; as a function of $a$, it describes how the average of $y$ changes with $x$.

```python
"""Conditional means: earnings in 1978 by years of schooling (PSID sample)."""

from econdata import nsw

d = nsw("psid_controls")
d = d[d.education.between(8, 17)]
g = d.groupby("education").re78.agg(["count", "mean", "median"]).round(0)
print(g.to_string())
```

***Listing 29.4.** Mean and median earnings by years of schooling. code/bachelor-1/29-describing-data/listings/group_means.py*

```
$ python group_means.py
           count     mean   median
education                         
8            148  14888.0  13300.0
9            104  16130.0  13743.0
10           163  17797.0  17733.0
11           162  16153.0  14149.0
12           853  20564.0  20688.0
13           135  20934.0  22166.0
14           184  24465.0  25121.0
15            64  27804.0  25687.0
16           283  30184.0  28816.0
17           211  32285.0  31032.0
```

***Output 29.4.** Earnings rise with schooling, with a dip at 11 years and a step at 12.*

![Mean earnings in 1978 by years of schooling, PSID comparison sample: the 2,307 men with 8 to 17 years of schooling (counts above the bars).](https://one-course.com/images/onecourse/chapters/economics-3/b1-describing-data/fig-3170cabdcd1a.svg)

*Mean earnings in 1978 by years of schooling, PSID comparison sample: the 2,307 men with 8 to 17 years of schooling (counts above the bars). Source: LaLonde (1986) and Dehejia and Wahba (1999) samples of the National Supported Work data*

The samples were assembled to test whether non-experimental methods can reproduce the result of an experiment (LaLonde 1986; Dehejia and Wahba 1999).

The [conditional means](#def-b1-describing-data-conditional-mean) describe; whether a year of schooling causes the step from $16{,}153$ to $20{,}564$ dollars between 11 and 12 years is the question of [Chapter 32](https://one-course.com/books/economics/3/en/chapter/32-simple-regression#ch-b1-simple-regression).

## 29.5 Traps

**Definition 29.8 (Composition effect, Simpson’s paradox).**

A *composition effect* is a change or difference in an overall mean that comes from the shares of the groups rather than from the means within them. *Simpson’s paradox* is its extreme case: a comparison that goes one way within every group and the other way overall.

```python
"""Brenland's survey: older and younger households, overall and by work."""

from country import load

h = load("households")
h["older"] = h.age_head >= 50  # head aged 50 or more
h["works"] = h.hours > 0
overall = h.groupby("older").disposable.mean().round(0)
print("overall:", overall.to_dict())
by_work = h.groupby(["works", "older"]).disposable.agg(["count", "mean"]).round(0)
print(by_work.to_string())
print("share working:", h.groupby("older").works.mean().round(3).to_dict())
```

***Listing 29.5.** Older and younger households in Brenland’s survey, overall and within working and non-working households. code/bachelor-1/29-describing-data/listings/simpson.py*

```
$ python simpson.py
overall: {False: 25301.0, True: 24519.0}
             count     mean
works older                
False False     57   9353.0
      True     504  18370.0
True  False    968  26240.0
      True     471  31098.0
share working: {False: 0.944, True: 0.483}
```

***Output 29.5.** Older households have more income within each group, and less overall.*

![Simpson’s paradox in Brenland’s survey: within non-working and within working households, households with older heads have more income; overall they have less, because 51.7\% of them do not work, against 5.6\% of the others.](https://one-course.com/images/onecourse/chapters/economics-3/b1-describing-data/fig-62cb283d13b8.svg)

*[Simpson’s paradox](#def-b1-describing-data-simpson) in Brenland’s survey: within non-working and within working households, households with older heads have more income; overall they have less, because $51.7\%$ of them do not work, against $5.6\%$ of the others.*

**On the record — Admissions by department.**

In 1973 the six largest departments of a graduate school admitted $44.5\%$ of 2,691 male applicants and $30.4\%$ of 1,835 female applicants. Department by department the gap largely disappeared: women had applied more often to the departments that admitted a small share of all applicants. The pooled figures showed a pattern that the departments’ own decisions did not (Bickel, Hammel and O’Connell 1975).

**Definition 29.9 (Top-coding, censoring).**

A variable is *top-coded* when values above a cap are recorded at the cap. More generally, it is *censored* when values beyond a limit are known only to lie beyond it.

```python
"""The CPS sample: earnings above a cap were recorded at the cap."""

from econdata import nsw

earn = nsw("cps_controls").re78
cap = earn.max()
at_cap = earn == cap
n_cap = at_cap.sum()
print(f"cap {cap:,.2f}; men at the cap {n_cap} of {len(earn)} ({at_cap.mean():.3f})")
print(f"mean as recorded       {earn.mean():10,.0f}")
print(f"mean without the capped {earn[~at_cap].mean():10,.0f}")
print(f"median                 {earn.median():10,.0f}")
print(
    "the true mean is at least", f"{earn.mean():,.0f}"
)  # capped values are lower bounds
```

***Listing 29.6.** A quarter of a sample at the cap. code/bachelor-1/29-describing-data/listings/top_coding.py*

```
$ python top_coding.py
cap 25,564.70; men at the cap 4145 of 15992 (0.259)
mean as recorded           14,847
mean without the capped     11,097
median                     16,422
the true mean is at least 14,847
```

***Output 29.6.** 4,145 men recorded at 25,564.70 dollars: the recorded mean is a lower bound.*

![Earnings in 1978 in dollars of 1982, density per 100,000 dollars, bins of 2,000 dollars: PSID comparison sample (blue) and CPS comparison sample (red), values above 60,000 put in the last bin.](https://one-course.com/images/onecourse/chapters/economics-3/b1-describing-data/fig-b4295da55bea.svg)

*Earnings in 1978 in dollars of 1982, density per 100,000 dollars, bins of 2,000 dollars: PSID comparison sample (blue) and CPS comparison sample (red), values above 60,000 put in the last bin. Source: National Supported Work comparison samples*

The CPS sample’s spike at its cap holds a quarter of the men. Every mean, variance or regression computed on it treats 25,564.70 dollars as their earnings.

**Definition 29.10 (Outlier, trimmed mean).**

An *outlier* is an observation far from the bulk of the data. The *$\alpha$-trimmed mean* drops the fraction $\alpha$ of the observations at each end and averages the rest.

```python
"""Mean, median and trimmed mean, with and without the largest earnings."""

from econdata import nsw
from scipy.stats import trim_mean

earn = nsw("nsw_dw").re78  # the 445 men of the experiment
top = earn.idxmax()
for name, x in [("all", earn), ("without the largest", earn.drop(top))]:
    print(
        f"{name:20s} n {len(x)}  mean {x.mean():7,.0f}  median {x.median():7,.0f}"
        f"  5% trimmed {trim_mean(x, 0.05):7,.0f}"
    )
print(f"largest {earn.max():,.0f}")
```

***Listing 29.7.** The mean moves with one observation; the median and the [trimmed mean](#def-b1-describing-data-outlier) barely. code/bachelor-1/29-describing-data/listings/trimmed.py*

```
$ python trimmed.py
all                  n 445  mean   5,301  median   3,702  5% trimmed   4,538
without the largest  n 444  mean   5,177  median   3,673  5% trimmed   4,507
largest 60,308
```

***Output 29.7.** Removing one man in 445 lowers the mean by 124 dollars and the median by 29.*

## Exercises

**Exercise 29.1 ★.**

From the opening chart’s table, the median hundredth of Americans had 67.15 dollars a day in 2022 and the ninetieth 169.65. Give the ratio, and say where each lies on the logarithmic panel.

**Solution of Exercise 29.1.**

$169.65/67.15 = 2.53$. On the logarithmic panel the ninetieth hundredth lies $\log_{10} 2.53 = 0.40$ decades above the median, about as far above it as the tenth hundredth (24.55 dollars) lies below it.

**Exercise 29.2 ★.**

Find the mean and the median of $2$, $3$, $3$, $4$, $18$. Which describes the typical value?

**Solution of Exercise 29.2.**

Mean $30/5 = 6$, median $3$. The median: one large value pulls the mean above four of the five numbers.

**Exercise 29.3 ★.**

Two variables have a covariance of 12 and standard deviations of 3 and 5. Find their correlation.

**Solution of Exercise 29.3.**

$r = 12/(3 \times 5) = 0.8$.

**Exercise 29.4 ★.**

A country’s average wage falls in a year in which the wage of every occupation rises. Name the trap and give a mechanism.

**Solution of Exercise 29.4.**

A [composition effect](#def-b1-describing-data-simpson): employment shifted towards lower-paid occupations, for example because high-paid jobs were lost in a recession or many young workers entered low-paid ones.

**Exercise 29.5 ★★.**

For the PSID men earning at least 5,000 dollars, compute the [skewness](#def-b1-describing-data-skewness) of earnings and of their logarithm, and compare with [Output 29.2](#out-b1-describing-data-moments).

**Solution of Exercise 29.5.**

For the 2,107 men earning at least 5,000 dollars, the [skewness](#def-b1-describing-data-skewness) is $1.878$ for earnings and $-0.238$ for their logarithm: without the lowest earnings, the logarithm is close to symmetric.

**Exercise 29.6 ★★.**

Replace the CPS sample’s capped values by 1.5 times the cap. By how much does the mean change? And the median?

**Solution of Exercise 29.6.**

The mean rises from 14,847 to 18,160 dollars, by $22.3\%$; the median stays at 16,422, since it lies below the cap.

**Exercise 29.7 ★★.**

From [Output 29.4](#out-b1-describing-data-groups), give the step in mean earnings from 11 to 12 years of schooling, and the step from 12 to 16 years per year.

**Solution of Exercise 29.7.**

$20{,}564 - 16{,}153 = 4{,}411$ dollars from 11 to 12 years; from 12 to 16 years, $(30{,}184 - 20{,}564)/4 = 2{,}405$ dollars a year.

**Exercise 29.8 ★★.**

Prove [Proposition 29.6](#prop-b1-describing-data-range) without the Cauchy–Schwarz inequality, using $\sum_i (a_i/\sqrt{\sum a^2} \pm b_i/\sqrt{\sum b^2})^2 \ge 0$.

**Solution of Exercise 29.8.**

With $A = \sqrt{\sum a_i^2}$ and $B = \sqrt{\sum b_i^2}$, expanding gives $\sum a_i^2/A^2 + \sum b_i^2/B^2 \pm 2\sum a_ib_i/(AB) = 2 \pm 2r \ge 0$, so $-1 \le r \le 1$. Equality needs every term zero: $b_i/B = \mp a_i/A$, a straight line.

**Exercise 29.9 ★★.**

A billionaire moves into a town of 10,000 people. Predict the change in mean and in median wealth.

**Solution of Exercise 29.9.**

The mean rises by about $10^9/10{,}001 \approx 99{,}990$ dollars; the median barely moves (it shifts by half a step between two neighbouring values).

**Exercise 29.10 ★★★.**

Department A admits 80 of 100 male and 18 of 20 female applicants; department B admits 10 of 50 male and 30 of 130 female applicants. Compute the admission rates by department and overall, and explain.

**Solution of Exercise 29.10.**

Men: $80\%$ in A, $20\%$ in B, $90/150 = 60\%$ overall. Women: $90\%$ in A, $30/130 = 23.1\%$ in B, $48/150 = 32\%$ overall. Women are admitted at a higher rate in each department and at a lower rate overall, because most of them applied to B, which admits few.

**Exercise 29.11 ★★★.**

Show that $\bar x$ minimises $\sum_i (x_i - c)^2$ over $c$, and that a median minimises $\sum_i |x_i - c|$.

**Solution of Exercise 29.11.**

The derivative of $\sum(x_i - c)^2$ is $-2\sum(x_i - c)$, zero at $c = \bar x$, and the function is convex. For $\sum|x_i - c|$, moving $c$ up by a small $h$ changes the sum by $h$ times (the number of observations below $c$ minus the number above); the sum falls while more lie above and rises once more lie below, so it is smallest where half lie on each side: at a median.

**Exercise 29.12 ★★★.**

A study reports a correlation of $0.1$ between two variables. What observation would show that a strong relation lies behind it?

**Solution of Exercise 29.12.**

A scatter plot showing the points close to a curve that is not a line — a parabola, a threshold, a relation that holds in one group and is reversed in another. Correlations within groups, or of transformed variables, much larger than $0.1$ would show it too.

## 29.6 Problem: Brenland’s Household Survey

**Problem 29.1.**

Weekend problem — a survey, described

Brenland’s household survey of 2025 (invented) has 2,000 households, with disposable and gross income, the head’s age, schooling and hours, and the household’s size. Each answer comes from a script.

**Part I — The distribution.**

1. Give the counts of [disposable income](https://one-course.com/books/economics/3/en/chapter/18-national-accounts-in-depth#def-b1-national-accounts-in-depth-gni) in bins of 10,000 dalens.
2. Give the counts of $\log_{10}$ of [disposable income](https://one-course.com/books/economics/3/en/chapter/18-national-accounts-in-depth#def-b1-national-accounts-in-depth-gni) in bins of $0.2$ from $3.8$ to $5$ .
3. Which [histogram](#def-b1-describing-data-histogram) is closer to symmetric?
4. Give the mean and the median.
5. What share of households is below the mean?
6. Why is the mean above the median?

**Part II — Moments and quantiles.**

7. Give the standard deviation and the [skewness](#def-b1-describing-data-skewness) .
8. Give the [skewness](#def-b1-describing-data-skewness) of the logarithm.
9. Give the 10th and 90th [percentiles](#def-b1-describing-data-quantile) and their ratio.
10. What share of all [disposable income](https://one-course.com/books/economics/3/en/chapter/18-national-accounts-in-depth#def-b1-national-accounts-in-depth-gni) goes to the top tenth of households?
11. Why may a survey understate that share?

**Part III — Income and schooling.**

12. Give mean gross income for heads with under 12, 12, 13–15 and 16 or more years of schooling.
13. Give the correlation of schooling with gross income, and with its logarithm.
14. Why might the correlation understate how much schooling and income are related?
15. Does the table show that schooling raises income?

**Part IV — The paradox.** Split households by the head’s age (under 50, 50 or over) and by whether the head works.

16. Give mean [disposable income](https://one-course.com/books/economics/3/en/chapter/18-national-accounts-in-depth#def-b1-national-accounts-in-depth-gni) of each age group, overall.
17. Give the four means within working and non-working households.
18. Give the share working in each age group.
19. Rebuild each overall mean as a weighted average of the within-group means.
20. Compute the older households’ mean if they worked as often as the younger.
21. Which comparison answers “do older households have more income when they work?”
22. Which answers “do older households have more income?”
23. Name the trap.
24. What would a reader of the overall means alone conclude?
25. State the result.

**Solution of Problem 29.1.**

**1.** 49, 731, 734, 315, 111, 40, 11, 7, 1, 1 (from 0 to 100,000).

**2.** 30, 249, 926, 598, 163, 15: 1,981 households. The other 19, all at the minimum of 6,000 dalens ($\log_{10} 6000 = 3.78$), lie below $3.8$.

**3.** The logarithmic one: the level has a long right tail.

**4.** Mean $24{,}919.7$ dalens; median $22{,}265$.

**5.** $60.8\%$.

**6.** The distribution is skewed to the right: a few high incomes raise the mean and not the median.

**7.** $10{,}603.9$ dalens; [skewness](#def-b1-describing-data-skewness) $1.436$.

**8.** $-0.123$.

**9.** 14,789 and 38,991; ratio $2.64$.

**10.** $19.3\%$.

**11.** Wealthy households answer less often, and top incomes are under-reported.

**12.** 22,355; 24,775; 28,367; 35,762 dalens.

**13.** $0.315$; $0.329$ with the logarithm.

**14.** Income also depends on age, hours and luck, and retired households with high schooling have pensions rather than earnings; the relation may also be steeper at high schooling than a line allows.

**15.** No: it describes; people with more schooling may differ in other ways that raise income.

**16.** Under 50: 25,301; 50 or over: 24,519 dalens.

**17.** Not working: 9,353 (under 50) and 18,370 (50 or over). Working: 26,240 and 31,098.

**18.** $94.4\%$ under 50, $48.3\%$ at 50 or over.

**19.** $\tfrac{968}{1025} \times 26{,}240 + \tfrac{57}{1025} \times 9{,}353 = 25{,}301$; $\tfrac{471}{975} \times 31{,}098 + \tfrac{504}{975} \times 18{,}370 = 24{,}519$ (with the shares rounded to $0.944$ and $0.483$ the sums are about 25,294 and 24,518).

**20.** $\tfrac{968}{1025} \times 31{,}098 + \tfrac{57}{1025} \times 18{,}370 = 30{,}390$ dalens.

**21.** The within-group comparison.

**22.** The overall comparison, if the question is about households as they are.

**23.** [Simpson’s paradox](#def-b1-describing-data-simpson), a [composition effect](#def-b1-describing-data-simpson).

**24.** That households get poorer with age at every stage, when the difference comes from retirement.

**25.** Within working and within non-working households, older heads’ households have more income, yet overall their mean is lower by 782 dalens, because half of them no longer work.
