Skip to content

Commit 7337136

Browse files
Tom's edits of two intermediate lectures
1 parent 19e420f commit 7337136

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

lectures/odu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ fact, it should be decreasing in $\pi$ because
251251
- larger $\pi$ means more weight on $f$ and less on
252252
$g$
253253

254-
Thus, s larger $\pi$ depresses the worker’s assessment of
254+
Thus, larger $\pi$ depresses the worker’s assessment of
255255
her future prospects, so relatively low current offers become more
256256
attractive.
257257

lectures/wald_friedman.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,10 @@ $$
354354
\end{aligned}
355355
$$
356356

357-
Our aim is to compute the value function $J$, and from it the associated cutoffs $\alpha$
357+
Our aim is to compute the cost function $J$, and from it the associated cutoffs $\alpha$
358358
and $\beta$.
359359

360-
To make our computations manageable, using {eq}`optdec`, we can write the continuation value $h(\pi)$ as
360+
To make our computations manageable, using {eq}`optdec`, we can write the continuation cost $h(\pi)$ as
361361

362362
```{math}
363363
:label: optdec2
@@ -380,7 +380,7 @@ c + \int \min \{ (1 - \kappa(z', \pi) ) L_0, \kappa(z', \pi) L_1, h(\kappa(z',
380380

381381
is a **functional equation** in an unknown function $h$.
382382

383-
Using the functional equation, {eq}`funceq`, for the continuation value, we can back out
383+
Using the functional equation, {eq}`funceq`, for the continuation cost, we can back out
384384
optimal choices using the right side of {eq}`optdec`.
385385

386386
This functional equation can be solved by taking an initial guess and iterating
@@ -510,7 +510,7 @@ To solve the key functional equation, we will iterate using `Q` to find the fixe
510510
@jit(nopython=True)
511511
def solve_model(wf, tol=1e-4, max_iter=1000):
512512
"""
513-
Compute the continuation value function
513+
Compute the continuation cost function
514514
515515
* wf is an instance of WaldFriedman
516516
"""
@@ -559,14 +559,14 @@ h_star = solve_model(wf) # Solve the model
559559
```
560560

561561
We will also set up a function to compute the cutoffs $\alpha$ and $\beta$
562-
and plot these on our value function plot
562+
and plot these on our cost function plot
563563

564564
```{code-cell} ipython3
565565
@jit(nopython=True)
566566
def find_cutoff_rule(wf, h):
567567
568568
"""
569-
This function takes a continuation value function and returns the
569+
This function takes a continuation cost function and returns the
570570
corresponding cutoffs of where you transition between continuing and
571571
choosing a specific model
572572
"""
@@ -597,12 +597,12 @@ cost_L1 = wf.π_grid * wf.L1
597597
598598
fig, ax = plt.subplots(figsize=(10, 6))
599599
600-
ax.plot(wf.π_grid, h_star, label='continuation value')
600+
ax.plot(wf.π_grid, h_star, label='sample again')
601601
ax.plot(wf.π_grid, cost_L1, label='choose f1')
602602
ax.plot(wf.π_grid, cost_L0, label='choose f0')
603603
ax.plot(wf.π_grid,
604604
np.amin(np.column_stack([h_star, cost_L0, cost_L1]),axis=1),
605-
lw=15, alpha=0.1, color='b', label='minimum cost')
605+
lw=15, alpha=0.1, color='b', label='$J(\pi)$')
606606
607607
ax.annotate(r"$\beta$", xy=(β + 0.01, 0.5), fontsize=14)
608608
ax.annotate(r"$\alpha$", xy=(α + 0.01, 0.5), fontsize=14)
@@ -611,19 +611,19 @@ plt.vlines(β, 0, β * wf.L0, linestyle="--")
611611
plt.vlines(α, 0, (1 - α) * wf.L1, linestyle="--")
612612
613613
ax.set(xlim=(0, 1), ylim=(0, 0.5 * max(wf.L0, wf.L1)), ylabel="cost",
614-
xlabel="$\pi$", title="Value function")
614+
xlabel="$\pi$", title="Cost function $J(\pi)$")
615615
616616
plt.legend(borderpad=1.1)
617617
plt.show()
618618
```
619619

620-
The value function equals $\pi L_1$ for $\pi \leq \beta$, and $(1-\pi )L_0$ for $\pi
620+
The cost function $J$ equals $\pi L_1$ for $\pi \leq \beta$, and $(1-\pi )L_0$ for $\pi
621621
\geq \alpha$.
622622

623-
The slopes of the two linear pieces of the value function are determined by $L_1$
623+
The slopes of the two linear pieces of the cost function $J(\pi)$ are determined by $L_1$
624624
and $- L_0$.
625625

626-
The value function is smooth in the interior region, where the posterior
626+
The cost function $J$ is smooth in the interior region, where the posterior
627627
probability assigned to $f_0$ is in the indecisive region $\pi \in (\beta, \alpha)$.
628628

629629
The decision-maker continues to sample until the probability that he attaches to

0 commit comments

Comments
 (0)