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
Replace \textrm{Prob}(...) with \mathbb{P}{...} and E[...] with
\mathbb{E}[...] following QuantEcon.manual#84.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@@ -106,7 +106,7 @@ f_k^I = \frac{\textrm{number of samples of length n for which } \sum_{h=1}^n y_h
106
106
I}
107
107
$$
108
108
109
-
The probability $\textrm{Prob}(X = k | \theta)$ answers the following question:
109
+
The probability $\mathbb{P}\{X = k \mid \theta\}$ answers the following question:
110
110
111
111
* As $I$ becomes large, in what fraction of $I$ independent draws of $n$ coin flips should we anticipate $k$ heads to occur?
112
112
@@ -118,9 +118,9 @@ As usual, a law of large numbers justifies this answer.
118
118
1. Please write a Python class to compute $f_k^I$
119
119
120
120
2. Please use your code to compute $f_k^I, k = 0, \ldots , n$ and compare them to
121
-
$\textrm{Prob}(X = k | \theta)$ for various values of $\theta, n$ and $I$
121
+
$\mathbb{P}\{X = k \mid \theta\}$ for various values of $\theta, n$ and $I$
122
122
123
-
3. With the Law of Large Numbers in mind, use your code to describe the relationship between $f_k^I$ and $\textrm{Prob}(X = k | \theta)$ as $I$ grows
123
+
3. With the Law of Large Numbers in mind, use your code to describe the relationship between $f_k^I$ and $\mathbb{P}\{X = k \mid \theta\}$ as $I$ grows
124
124
```
125
125
126
126
```{solution-start} pm_ex1
@@ -293,20 +293,20 @@ From the above graphs, we can see that **$I$, the number of independent sequence
293
293
When $I$ becomes larger, the difference between theoretical probability and frequentist estimate becomes smaller.
294
294
295
295
Also, as long as $I$ is large enough, changing $\theta$ or $n$ does not substantially change the accuracy of the observed fraction
296
-
as an approximation of $\textrm{Prob}(X = k | \theta)$.
296
+
as an approximation of $\mathbb{P}\{X = k \mid \theta\}$.
297
297
298
298
The Law of Large Numbers is at work here.
299
299
300
-
For each draw of an independent sequence, $\textrm{Prob}(X_i = k | \theta)$ is the same, so aggregating all draws forms an IID sequence of a binary random variable $\rho_{k,i},i=1,2,...I$, with a mean of $\textrm{Prob}(X = k | \theta)$ and a variance of
300
+
For each draw of an independent sequence, $\mathbb{P}\{X_i = k \mid \theta\}$ is the same, so aggregating all draws forms an IID sequence of a binary random variable $\rho_{k,i},i=1,2,...I$, with a mean of $\mathbb{P}\{X = k \mid \theta\}$ and a variance of
301
301
302
302
$$
303
-
\textrm{Prob}(X = k | \theta) \cdot (1-\textrm{Prob}(X = k | \theta)).
303
+
\mathbb{P}\{X = k \mid \theta\} \cdot (1-\mathbb{P}\{X = k \mid \theta\}).
304
304
$$
305
305
306
306
So, by the LLN, the average of $\rho_{k,i}$ converges to:
\theta | Y \sim \textrm{Beta}(\alpha + Y, \, \beta + (1-Y))
409
+
\theta \mid Y \sim \textrm{Beta}(\alpha + Y, \, \beta + (1-Y))
410
410
$$
411
411
412
412
**c)**
@@ -656,7 +656,7 @@ So posterior and prior are both beta distributions, albeit ones with different p
656
656
657
657
When a likelihood function and prior fit together like hand and glove in this way, we can say that the prior and posterior are **conjugate distributions**.
658
658
659
-
In this situation, we also sometimes say that we have **conjugate prior** for the likelihood function $\textrm{Prob}(X | \theta)$.
659
+
In this situation, we also sometimes say that we have **conjugate prior** for the likelihood function $\mathbb{P}\{X \mid \theta\}$.
660
660
661
661
Typically, the functional form of the likelihood function determines the functional form of a **conjugate prior**.
0 commit comments