Skip to content

Commit e51ac00

Browse files
committed
minor updates
1 parent 666442c commit e51ac00

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

lectures/likelihood_ratio_process_2.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,18 +1299,22 @@ So do consumption shares.
12991299
```{exercise}
13001300
:label: lr_ex6
13011301
1302-
Two agents with different beliefs about three possible models.
1302+
Two agents have different beliefs about three possible models.
13031303
13041304
Assume $f(x) \geq 0$, $g(x) \geq 0$, and $h(x) \geq 0$ for $x \in X$ with:
13051305
- $\int_X f(x) dx = 1$
13061306
- $\int_X g(x) dx = 1$
13071307
- $\int_X h(x) dx = 1$
13081308
13091309
We'll consider two agents:
1310-
* Agent 1: $\pi^g_0 = 1 - \pi^f_0$, $\pi^f_0 \in (0,1)$ (believes only in models $f$ and $g$)
1311-
* Agent 2: $\pi^g_0 = \pi^f_0 = 1/3$ (equally weights all three models)
1310+
* Agent 1: $\pi^g_0 = 1 - \pi^f_0$, $\pi^f_0 \in (0,1), \pi^h_0 = 0$
1311+
(believes only in models $f$ and $g$)
1312+
* Agent 2: $\pi^g_0 = \pi^f_0 = 1/3$, $\pi^h_0 = 1/3$
1313+
(equally weights all three models)
13121314
1313-
Set $h = \pi^f_0 f + (1-\pi^f_0) g$ (a mixture of $f$ and $g$).
1315+
Let $f$ and $g$ be two beta distributions with $f \sim \text{Beta}(1, 1)$ and
1316+
$g \sim \text{Beta}(3, 1.2)$, and
1317+
set $h = \pi^f_0 f + (1-\pi^f_0) g$ (a mixture of $f$ and $g$).
13141318
13151319
Simulate and visualize the evolution of consumption allocations when:
13161320
* Nature permanently draws from $f$
@@ -1443,7 +1447,7 @@ def plot_three_model_results(c1_data, π_data, nature_labels, λ=0.5,
14431447
if n_scenarios == 1:
14441448
axes = axes.reshape(2, 1)
14451449
1446-
colors = ['blue', 'green', 'orange'] # For different nature scenarios
1450+
colors = ['blue', 'green', 'orange']
14471451
14481452
for i, (nature_label, c1, π_tuple) in enumerate(
14491453
zip(nature_labels, c1_data, π_data)):
@@ -1534,7 +1538,7 @@ fig, axes = plot_three_model_results(c1_data, π_data, nature_labels, λ)
15341538
plt.show()
15351539
```
15361540

1537-
The results show interesting dynamics:
1541+
The results show interesting dynamics.
15381542

15391543
In the top panel, Agent 1 (orange line) who initially puts weight only on $f$ (solid line) and $g$ (dashed line) eventually dominates consumption as they learn the truth faster than Agent 2 who spreads probability across all three models.
15401544

@@ -1544,6 +1548,8 @@ For both cases, the belief on $h$ (dotted line) eventually goes to 0.
15441548

15451549
The agent with the simpler (but correct) model structure learns faster and eventually dominates consumption allocation.
15461550

1551+
In other words, the model penalizes complexity and rewards accuracy.
1552+
15471553
```{solution-end}
15481554
```
15491555

@@ -1554,9 +1560,10 @@ Two agents with extreme priors about three models.
15541560
15551561
Consider the same setup as the previous exercise, but now:
15561562
* Agent 1: $\pi^g_0 = \pi^f_0 = \frac{\epsilon}{2} > 0$, where $\epsilon$ is close to $0$ (e.g., $\epsilon = 0.01$)
1557-
* Agent 2: $\pi^g_0 = \pi^f_0 = 0$ (dogmatic belief in model $h$)
1563+
* Agent 2: $\pi^g_0 = \pi^f_0 = 0$ (rigid belief in model $h$)
15581564
1559-
Choose $h$ to be close but not equal to either $f$ or $g$ as measured by KL divergence. For example, set $h \sim \text{Beta}(1.2, 1.1)$.
1565+
Choose $h$ to be close but not equal to either $f$ or $g$ as measured by KL divergence.
1566+
For example, set $h \sim \text{Beta}(1.2, 1.1)$.
15601567
15611568
Simulate and visualize the evolution of consumption allocations when:
15621569
* Nature permanently draws from $f$
@@ -1603,12 +1610,12 @@ Now we can set the belief models for the two agents
16031610
λ = 0.5
16041611
16051612
# Agent 1: π_f = ε/2, π_g = ε/2, π_h = 1-ε
1606-
# (almost dogmatic about h)
1613+
# (almost rigid about h)
16071614
π_f_1 = ε/2
16081615
π_g_1 = ε/2
16091616
16101617
# Agent 2: π_f = 0, π_g = 0, π_h = 1
1611-
# (fully dogmatic about h)
1618+
# (fully rigid about h)
16121619
π_f_2 = 1e-10
16131620
π_g_2 = 1e-10
16141621
```
@@ -1645,7 +1652,9 @@ plt.show()
16451652

16461653
In the top panel, observe how slowly agent 1 is adjusting to the truth -- the belief is rigid but still updating.
16471654

1648-
However, since agent 2 is dogmatic about $h$, and $f$ is very hard to distinguish from $g$ as measured by $KL(f, g)$, we can see that the belief is almost standing still.
1655+
The belief about $h$ slowly shifts towards 0 crossing the belief about $f$ moving up to 1 at $t = 500$.
1656+
1657+
However, since agent 2 is rigid about $h$, and $f$ is very difficult to distinguish from $h$ as measured by $KL(f, h)$, we can see that the belief is almost stationary due to the difficulty of realizing the belief is incorrect.
16491658

16501659
In the bottom panel, since $g$ is further away from $h$, both agents adjust toward the truth very quickly, but agent 1 acts faster given the slightly higher weight on $f$ and $g$.
16511660

0 commit comments

Comments
 (0)