Skip to content

Commit 9d7c1a8

Browse files
Tom's April 4 edits of composite matching lecture
1 parent 2abace4 commit 9d7c1a8

File tree

1 file changed

+38
-21
lines changed

1 file changed

+38
-21
lines changed

lectures/match_transport.md

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,33 @@ kernelspec:
1717

1818
## Overview
1919

20-
Optimal transport theory is studies how one (marginal) probabilty measure can be related to another (marginal) probability measure in an ideal way.
20+
Optimal transport theory studies how a marginal probabilty measure can be related to another marginal probability measure in an ideal way.
21+
22+
* here ideal means to minimize some cost criterion.
2123

2224
The output of such a theory is a **coupling** of the two probability measures, i.e., a joint probabilty
2325
measure having those two marginal probability measures.
2426

2527
This lecture describes how Job Boerma, Aleh Tsyvinski, Ruodo Wang,
26-
and Zhenyuan Zhang {cite}`boerma2023composite` used optimal transport theory to formulate and solve an equilibrium of a model in which wages and allocations of workers across jobs adjust to match measures of different types with measures of different types of occupations.
27-
28-
Production technologies allow firms to affect shape costs of mismatch with the consequence
29-
that costs of mismatch can be concave.
28+
and Zhenyuan Zhang {cite}`boerma2023composite` used optimal transport theory to formulate and compute an equilibrium of a model in which wages and allocations of workers across jobs adjust to match measures of different types with measures of different types of occupations.
3029

31-
That means that it is possible that equilibrium there is neither **positive assortive** nor **negative assorting** matching, an outcome that {cite}`boerma2023composite` call **composite assortive** matching.
30+
Production technologies allow firms to reshape costs of mismatch so that they become concave.
3231

33-
For example, in an equilibrium with composite matching, identical *workers* can sort into different *occupations*, some positively and some negatively.
32+
It is then possible that in equilibrium there is neither **positive assortive** nor **negative assorting** matching, an outcome that {cite}`boerma2023composite` call **composite assortive** matching.
3433

35-
{cite}`boerma2023composite` show how this can generate distinct distributions of labor earnings within and across occupations.
34+
For example, with composite matching in an equilibrium model with workers of different types, ex ante identical *workers* can sort into different *occupations*, some positively and some negatively.
3635

36+
{cite}`boerma2023composite` show how composite matching can generate distinct non-trivial frequency distributions of labor earnings within and across occupations.
3737

3838
This lecture describes the {cite}`boerma2023composite` model and presents Python code for computing equilibria.
3939

40-
The lecture applies the code to the {cite}`boerma2023composite` model of labor markets.
40+
The lecture then applies the code to the {cite}`boerma2023composite` model of labor markets.
4141

4242
As with an [earlier QuantEcon lecture on optimal transport](https://python.quantecon.org/opt_transport.html), a key tool will be [linear programming](https://intro.quantecon.org/lp_intro.html).
4343

44+
As we'll see, {cite}`boerma2023composite` also deploy dynamic programming in creative ways at important points in
45+
their analysis. So as you read this lecture, please watch for Bellman equations that might remind
46+
you of ideas encountered in this [earlier QuantEcon lecture](https://python.quantecon.org/mccall_model.html) and this [QuantEcon book](https://dp.quantecon.org).
4447

4548

4649
## Setup
@@ -286,7 +289,7 @@ We now indicate important properties that are satisfied by an optimal solution.
286289

287290
+++ {"user_expressions": []}
288291

289-
**(Maximal number of perfect pairs)**
292+
**Maximal number of perfect pairs**
290293

291294
If $(z,z) \in X \times Y$ for some $z \in \mathbb{R}$ then in each optimal solution there are $\min\{n_z,m_z\}$ matches between type $z \in X$ and $z \in Y$.
292295

@@ -444,13 +447,21 @@ example_off_diag.plot_marginals(title='Distributions of types: off-diagonal')
444447

445448
+++ {"user_expressions": []}
446449

447-
**(No intersecting pairs)** This property summarizes the following fact:
450+
To prepare the way for the second property, represent both types on the real line and draw semicirles that join $(x,y)$ for all pairs $(x,y) \in X \times Y$ that are matched in a solution.
451+
452+
In terms of these semicircles we assert the
453+
448454

449-
* represent both types on the real line and draw a semicirle joining $(x,y)$ for all pairs $(x,y) \in X \times Y$ that are matched in a solution
450455

451-
* these semicirles do not intersect (unless they share one of the endpoints).
456+
**No intersecting pairs property**
457+
458+
459+
460+
* unless they share one of the endpoints, the semicirles do not intersect.
452461

453-
A proof proceeds by contradiction.
462+
463+
464+
To prove the property, we reason by contradiction.
454465

455466
Let's consider types $x,x' \in X$ and $y,y' \in Y.$
456467

@@ -504,7 +515,11 @@ We conclude that if a matching features intersecting pairs, it can be modified v
504515

505516
+++ {"user_expressions": []}
506517

507-
**(Layering)** Recall that there are $2N$ individual agents, each agent $i$ having type $z_i \in X \sqcup Y.$
518+
We now consider the third property.
519+
520+
**Layering**
521+
522+
Recall that there are $2N$ individual agents, each agent $i$ having type $z_i \in X \sqcup Y.$
508523

509524
When we introduce the off diagonal matching, to stress that the types sets are disjoint now.
510525

@@ -668,7 +683,7 @@ print(layers_list_example)
668683

669684
+++ {"user_expressions": []}
670685

671-
The following method gives a graphical representation of the layers.
686+
The following method provides a graphical representation of the layers.
672687

673688
From the picture it is easy to spot two key features described above:
674689

@@ -799,15 +814,15 @@ Let $V_{ij}$ be the optimal value of matching agents in $[i,j]$ with $i,j \in [
799814

800815
Suppose that we computed the value $V_{ij}$ for all $i,j \in [N_\ell]$ with $i-j \in \{1,3,\dots,t-2\}$ for some odd natural number $t$.
801816

802-
Then, for $i,j \in [N_\ell]$ with $i-j= t$ we have
817+
Then for $i,j \in [N_\ell]$ with $i-j= t$
803818

804819
$$
805820
V_{ij} = \min_{k \in \{i+1,i+3,\dots,j\}} \left\{ c_{ik} + V_{i+1,k-1} + V_{k+1,j}\right\}
806-
$$
821+
$$ (eq:Bellman101)
807822
808823
with the RHS depending only on previously computed values.
809824
810-
We set the boundary conditions at $t=-1$: $V_{i+1,i} = 0$ for each $i \in [N_\ell],$ so that we can apply the same Bellman equation at $t =1.$
825+
We set the boundary conditions at $t=-1$: $V_{i+1,i} = 0$ for each $i \in [N_\ell],$ so that we can apply the same Bellman equation {eq}`eq:Bellman101` at $t =1.$
811826
812827
The following method takes as input the layer types indices and computes the value function as a matrix $[V_{ij}]_{ i \in [N_\ell+1], j \in [N_\ell ]}$.
813828
@@ -865,7 +880,9 @@ print(V_i_j.round(2)[:min(10, V_i_j.shape[0]),
865880
866881
+++ {"user_expressions": []}
867882
868-
Having computed the value function, we can proceed to compute the optimal matching as the *policy* that attains the value function that solves the Bellman equation (*policy evaluation*).
883+
**Policy evaluation**
884+
885+
Having computed the value function, we can proceed to compute the optimal matching as the *policy* that attains the value function that solves the Bellman equation {eq}`eq:Bellman101`.
869886
870887
We start from agent $1$ and match it with the $k$ that achieves the minimum in the equation associated with $V_{1,2N_\ell}.$
871888
@@ -1006,7 +1023,7 @@ Visually, the arc joining $(i',j')$ surmounts the arc joining $(i,j).$
10061023
10071024
As a consequence, there exists a more efficient way to compute the value function within a layer.
10081025
1009-
It can be shown that the solving the following second-order difference equations delivers the same result as the Bellman equations above:
1026+
It can be shown that the solving the following second-order difference equations delivers the same result as the Bellman equations {eq}`eq:Bellman101` presented above:
10101027
10111028
$$
10121029
V_{ij} = \min \{ c_{ij} + V_{i+1,j-1}, V_{i+2,j} + V_{i,j-2} - V_{i+2,j-2}\}

0 commit comments

Comments
 (0)