@@ -362,8 +362,9 @@ the worker cannot change careers without changing jobs.
362362
363363## Exercises
364364
365- (career_ex1)=
366- ### Exercise 1
365+ ``` {exercise-start}
366+ :label: career_ex1
367+ ```
367368
368369Using the default parameterization in the class ` CareerWorkerProblem ` ,
369370generate and plot typical sample paths for $\theta$ and $\epsilon$
@@ -372,13 +373,16 @@ when the worker follows the optimal policy.
372373In particular, modulo randomness, reproduce the following figure (where the horizontal axis represents time)
373374
374375``` {figure} /_static/lecture_specific/career/career_solutions_ex1_py.png
375-
376376```
377377
378378Hint: To generate the draws from the distributions $F$ and $G$, use ` quantecon.random.draw() ` .
379379
380- (career_ex2)=
381- ### Exercise 2
380+ ``` {exercise-end}
381+ ```
382+
383+
384+ ``` {exercise}
385+ :label: career_ex2
382386
383387Let's now consider how long it takes for the worker to settle down to a
384388permanent job, given a starting point of $(\theta, \epsilon) = (0, 0)$.
402406Collect 25,000 draws of this random variable and compute the median (which should be about 7).
403407
404408Repeat the exercise with $\beta=0.99$ and interpret the change.
409+ ```
410+
405411
406- (career_ex3)=
407- ### Exercise 3
412+ ``` {exercise}
413+ :label: career_ex3
408414
409415Set the parameterization to `G_a = G_b = 100` and generate a new optimal policy
410416figure -- interpret.
417+ ```
411418
412419## Solutions
413420
414- ### Exercise 1
421+ ``` {solution-start} career_ex1
422+ :class: dropdown
423+ ```
415424
416425Simulate job/career paths.
417426
@@ -455,7 +464,13 @@ plt.legend()
455464plt.show()
456465```
457466
458- ### Exercise 2
467+ ``` {solution-end}
468+ ```
469+
470+
471+ ``` {solution-start} career_ex2
472+ :class: dropdown
473+ ```
459474
460475The median for the original parameterization can be computed as follows
461476
@@ -498,7 +513,13 @@ The medians are subject to randomness but should be about 7 and 14 respectively.
498513
499514Not surprisingly, more patient workers will wait longer to settle down to their final job.
500515
501- ### Exercise 3
516+ ``` {solution-end}
517+ ```
518+
519+
520+ ``` {solution-start} career_ex3
521+ :class: dropdown
522+ ```
502523
503524``` {code-cell} python3
504525cw = CareerWorkerProblem(G_a=100, G_b=100)
@@ -522,3 +543,6 @@ In the new figure, you see that the region for which the worker
522543stays put has grown because the distribution for $\epsilon$
523544has become more concentrated around the mean, making high-paying jobs
524545less realistic.
546+
547+ ``` {solution-end}
548+ ```
0 commit comments