GitHub

@@ -15,46 +15,60 @@ kernelspec:

15151616

## Overview

171718-

In this section we

18+

In the lecture {doc}`long_run_growth` we studied how GDP per capita has changed

19+

for certain countries and regions.

20+21+

Per capital GDP is important because it gives us an idea of average income for

22+

households in a given country.

23+24+

However, when we study income and wealth, averages are only part of the story.

25+26+

For example, imagine two societies, each with one million people, where

27+28+

* in the first society, the yearly income of one man is $100,000,000 and the income of the

29+

others is zero

30+

* in the second society, the yearly income of everyone is $100

31+32+

These countries have the same income per capita (average income is $100) but the lives of the people will be very different (e.g., almost everyone in the first society is

33+

starving, even though one person is fabulously rich).

34+35+

The example above suggests that we should go beyond simple averages when we study income and wealth.

36+37+

This leads us to the topic of economic inequality, which examines how income and wealth (and other quantities) are distributed across a population.

38+39+

In this lecture we study inequality, beginning with measures of inequality and

40+

then applying them to wealth and income data from the US and other countries.

41+194220-

* provide motivation for the techniques deployed in the lecture and

21-

* import code libraries needed for our work.

22432344

### Some history

244525-

Many historians argue that inequality played a key role in the fall of the

26-

Roman Republic.

46+

Many historians argue that inequality played a role in the fall of the Roman Republic (see, e.g., {cite}`levitt2019did`).

27472848

Following the defeat of Carthage and the invasion of Spain, money flowed into

2949

Rome from across the empire, greatly enriched those in power.

30503151

Meanwhile, ordinary citizens were taken from their farms to fight for long

3252

periods, diminishing their wealth.

335334-

The resulting growth in inequality caused political turmoil that shook the

35-

foundations of the republic.

54+

The resulting growth in inequality was a driving factor behind political turmoil that shook the foundations of the republic.

365537-

Eventually, the Roman Republic gave way to a series of dictatorships, starting

38-

with Octavian (Augustus) in 27 BCE.

56+

Eventually, the Roman Republic gave way to a series of dictatorships, starting with [Octavian](https://en.wikipedia.org/wiki/Augustus) (Augustus) in 27 BCE.

395740-

This history is fascinating in its own right, and we can see some

41-

parallels with certain countries in the modern world.

58+

This history tells us that inequality matters, in the sense that it can drive major world events.

425943-

Let's now look at inequality in some of these countries.

60+

There are other reasons that inequality might matter, such as how it affects

61+

human welfare.

446245-46-

### Measurement

63+

With this motivation, let us start to think about what inequality is and how we

64+

can quantify and analyze it.

4765486649-

Political debates often revolve around inequality.

50-51-

One problem with these debates is that inequality is often poorly defined.

52-53-

Moreover, debates on inequality are often tied to political beliefs.

67+

### Measurement

546855-

This is dangerous for economists because allowing political beliefs to shape our findings reduces objectivity.

69+

In politics and popular media, the word "inequality" is often used quite loosely, without any firm definition.

567057-

To bring a truly scientific perspective to the topic of inequality we must start with careful definitions.

71+

To bring a scientific perspective to the topic of inequality we must start with careful definitions.

58725973

Hence we begin by discussing ways that inequality can be measured in economic research.

6074

@@ -77,6 +91,8 @@ import wbgapi as wb

7791

import plotly.express as px

7892

```

799394+95+8096

## The Lorenz curve

81978298

One popular measure of inequality is the Lorenz curve.

@@ -197,7 +213,7 @@ households own just over 40\% of total wealth.

197213

---

198214

mystnb:

199215

figure:

200-

caption: Lorenz curve of simulated data

216+

caption: Lorenz curve of simulated wealth data

201217

name: lorenz_simulated

202218

---

203219

n = 2000

@@ -212,13 +228,16 @@ ax.plot(f_vals, f_vals, label='equality', lw=2)

212228

ax.vlines([0.8], [0.0], [0.43], alpha=0.5, colors='k', ls='--')

213229

ax.hlines([0.43], [0], [0.8], alpha=0.5, colors='k', ls='--')

214230

ax.set_xlim((0, 1))

215-

ax.set_xlabel("share of households (%)")

231+

ax.set_xlabel("share of households")

216232

ax.set_ylim((0, 1))

217-

ax.set_ylabel("share of income (%)")

233+

ax.set_ylabel("share of wealth")

218234

ax.legend()

219235

plt.show()

220236

```

221237238+239+240+222241

### Lorenz curves for US data

223242224243

Next let's look at US data for both income and wealth.

@@ -304,8 +323,8 @@ ax.plot(f_vals_nw[-1], l_vals_nw[-1], label=f'net wealth')

304323

ax.plot(f_vals_ti[-1], l_vals_ti[-1], label=f'total income')

305324

ax.plot(f_vals_li[-1], l_vals_li[-1], label=f'labor income')

306325

ax.plot(f_vals_nw[-1], f_vals_nw[-1], label=f'equality')

307-

ax.set_xlabel("share of households (%)")

308-

ax.set_ylabel("share of income/wealth (%)")

326+

ax.set_xlabel("share of households")

327+

ax.set_ylabel("share of income/wealth")

309328

ax.legend()

310329

plt.show()

311330

```

@@ -316,14 +335,15 @@ One key finding from this figure is that wealth inequality is more extreme than

316335317336318337338+339+319340

## The Gini coefficient

320341321-

The Lorenz curve is a useful visual representation of inequality in a distribution.

342+

The Lorenz curve provides a visual representation of inequality in a distribution.

322343323344

Another way to study income and wealth inequality is via the Gini coefficient.

324345325-

In this section we discuss the Gini coefficient and its relationship to the

326-

Lorenz curve.

346+

In this section we discuss the Gini coefficient and its relationship to the Lorenz curve.

327347328348329349

@@ -354,21 +374,19 @@ The idea is that $G=0$ indicates complete equality, while $G=1$ indicates comple

354374

---

355375

mystnb:

356376

figure:

357-

caption: Shaded Lorenz curve of simulated data

377+

caption: Gini coefficient (simulated wealth data)

358378

name: lorenz_gini

359379

---

360380

fig, ax = plt.subplots()

361381

f_vals, l_vals = lorenz_curve(sample)

362382

ax.plot(f_vals, l_vals, label=f'lognormal sample', lw=2)

363383

ax.plot(f_vals, f_vals, label='equality', lw=2)

364-

ax.vlines([0.8], [0.0], [0.43], alpha=0.5, colors='k', ls='--')

365-

ax.hlines([0.43], [0], [0.8], alpha=0.5, colors='k', ls='--')

366384

ax.fill_between(f_vals, l_vals, f_vals, alpha=0.06)

367385

ax.set_ylim((0, 1))

368386

ax.set_xlim((0, 1))

369387

ax.text(0.04, 0.5, r'$G = 2 \times$ shaded area')

370388

ax.set_xlabel("share of households (%)")

371-

ax.set_ylabel("share of income/wealth (%)")

389+

ax.set_ylabel("share of wealth (%)")

372390

ax.legend()

373391

plt.show()

374392

```

@@ -399,16 +417,16 @@ ax.set_ylim((0, 1))

399417

ax.set_xlim((0, 1))

400418

ax.text(0.55, 0.4, 'A')

401419

ax.text(0.75, 0.15, 'B')

402-

ax.set_xlabel("share of households (%)")

403-

ax.set_ylabel("share of income/wealth (%)")

420+

ax.set_xlabel("share of households")

421+

ax.set_ylabel("share of wealth")

404422

ax.legend()

405423

plt.show()

406424

```

407425408426409427410428

```{seealso}

411-

The World in Data project has a [nice graphical exploration of the Lorenz curve and the Gini coefficient](https://ourworldindata.org/what-is-the-gini-coefficient)

429+

The World in Data project has a [graphical exploration of the Lorenz curve and the Gini coefficient](https://ourworldindata.org/what-is-the-gini-coefficient)

412430

```

413431414432

### Gini coefficient of simulated data

@@ -527,7 +545,7 @@ To get a quick overview, let's histogram Gini coefficients across all countries

527545

---

528546

mystnb:

529547

figure:

530-

caption: Histogram of Gini coefficients

548+

caption: Histogram of Gini coefficients across countries

531549

name: gini_histogram

532550

---

533551

# Fetch gini data for all countries

@@ -585,21 +603,20 @@ As can be seen in {numref}`gini_usa1`, the income Gini

585603

trended upward from 1980 to 2020 and then dropped following at the start of the COVID pandemic.

586604587605

(compare-income-wealth-usa-over-time)=

588-

### Gini coefficient for wealth (US data)

606+

### Gini coefficient for wealth

589607590-

In the previous section we looked at the Gini coefficient for income using US data.

608+

In the previous section we looked at the Gini coefficient for income, focusing on using US data.

591609592610

Now let's look at the Gini coefficient for the distribution of wealth.

593611594-

We can use the {ref}`Survey of Consumer Finances data <data:survey-consumer-finance>` to look at the Gini coefficient

595-

computed over the wealth distribution.

612+

We will use US data from the {ref}`Survey of Consumer Finances<data:survey-consumer-finance>`

596613597614598615

```{code-cell} ipython3

599616

df_income_wealth.year.describe()

600617

```

601618602-

**Note:** This code can be used to compute this information over the full dataset.

619+

This code can be used to compute this information over the full dataset.

603620604621

```{code-cell} ipython3

605622

:tags: [skip-execution, hide-input, hide-output]

@@ -666,7 +683,6 @@ plt.show()

666683

The time series for the wealth Gini exhibits a U-shape, falling until the early

667684

1980s and then increasing rapidly.

668685669-670686

One possibility is that this change is mainly driven by technology.

671687672688

However, we will see below that not all advanced economies experienced similar growth of inequality.

@@ -677,7 +693,8 @@ However, we will see below that not all advanced economies experienced similar g

677693678694

### Cross-country comparisons of income inequality

679695680-

Earlier in this lecture we used `wbgapi` to get Gini data across many countries and saved it in a variable called `gini_all`

696+

Earlier in this lecture we used `wbgapi` to get Gini data across many countries

697+

and saved it in a variable called `gini_all`

681698682699

In this section we will use this data to compare several advanced economies, and

683700

to look at the evolution in their respective income Ginis.

@@ -821,7 +838,6 @@ the US exhibits persistent but stable levels around a Gini coefficient of 40.

821838822839

Another popular measure of inequality is the top shares.

823840824-825841

In this section we show how to compute top shares.

826842827843

Read the original on github.com ↗