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$
358358and $\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
381381is 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
384384optimal choices using the right side of {eq}` optdec ` .
385385
386386This 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)
511511def 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
561561We 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)
566566def 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
598598fig, 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 ')
601601ax.plot(wf.π_grid, cost_L1, label='choose f1')
602602ax.plot(wf.π_grid, cost_L0, label='choose f0')
603603ax.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
607607ax.annotate(r"$\beta$", xy=(β + 0.01, 0.5), fontsize=14)
608608ax.annotate(r"$\alpha$", xy=(α + 0.01, 0.5), fontsize=14)
@@ -611,19 +611,19 @@ plt.vlines(β, 0, β * wf.L0, linestyle="--")
611611plt.vlines(α, 0, (1 - α) * wf.L1, linestyle="--")
612612
613613ax.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
616616plt.legend(borderpad=1.1)
617617plt.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$
624624and $- 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
627627probability assigned to $f_0$ is in the indecisive region $\pi \in (\beta, \alpha)$.
628628
629629The decision-maker continues to sample until the probability that he attaches to
0 commit comments