You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 36bc72e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: lectures/likelihood_ratio_process.md
+256-4Lines changed: 256 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ jupytext:
4
4
extension: .md
5
5
format_name: myst
6
6
format_version: 0.13
7
-
jupytext_version: 1.17.2
7
+
jupytext_version: 1.17.1
8
8
kernelspec:
9
9
display_name: Python 3 (ipykernel)
10
10
language: python
@@ -57,6 +57,7 @@ from scipy.optimize import brentq, minimize_scalar
57
57
from scipy.stats import beta as beta_dist
58
58
import pandas as pd
59
59
from IPython.display import display, Math
60
+
import quantecon as qe
60
61
```
61
62
62
63
## Likelihood Ratio Process
@@ -1764,6 +1765,260 @@ From the figure above, we can see:
1764
1765
1765
1766
**Remark:** Think about how laws of large numbers are applied to compute error probabilities for the model selection problem and the classification problem.
1766
1767
1768
+
## Special case: Markov chain models
1769
+
1770
+
Consider two $n$-state irreducible and aperiodic Markov chain models on the same state space $\{1, 2, \ldots, n\}$ with positive transition matrices $P^{(f)}$, $P^{(g)}$ and initial distributions $\pi_0^{(f)}$, $\pi_0^{(g)}$.
1771
+
1772
+
In this section, we assume nature chooses $f$.
1773
+
1774
+
For a sample path $(x_0, x_1, \ldots, x_T)$, let $N_{ij}$ count transitions from state $i$ to $j$.
- The first term: $\frac{1}{T}\log \frac{\pi_{0,x_0}^{(f)}}{\pi_{0,x_0}^{(g)}} \to 0$
1812
+
- The second term: $\frac{1}{T}\sum_{i,j}N_{ij}\log \frac{P_{ij}^{(f)}}{P_{ij}^{(g)}} \xrightarrow{a.s.} \sum_{i,j}\pi_i^{(f)}P_{ij}^{(f)}\log \frac{P_{ij}^{(f)}}{P_{ij}^{(g)}}$
We are now ready to simulate paths and visualize how likelihood ratios evolve.
1938
+
1939
+
We'll verify $\frac{1}{T}E_f\left[\log \frac{L_T^{(f)}}{L_T^{(g)}}\right] = h_{KL}(f, g)$ starting from the stationary distribution by plotting both the empirical average and the line predicted by the theory
0 commit comments