Skip to content

Commit ac0af6f

Browse files
Merge branch 'main' of https://github.com/QuantEcon/lecture-python.myst into main
2 parents a2f76db + 573ab63 commit ac0af6f

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

lectures/prob_matrix.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ for which $f_{i} \in [0,1]$ for each $i$ and $\sum_{i=0}^{I-1}f_i=1$.
224224
This vector defines a **probability mass function**.
225225
226226
The distribution {eq}`eq:discretedist`
227-
has **parameters** $\{f_{i}\}_{i=0,1,...,I-2}$ since $f_{I-1} = 1-\sum_{i=0}^{I-2}f_{i}$.
227+
has **parameters** $\{f_{i}\}_{i=0,1, \cdots ,I-2}$ since $f_{I-1} = 1-\sum_{i=0}^{I-2}f_{i}$.
228228
229229
230230
These parameters pin down the shape of the distribution.
@@ -660,7 +660,7 @@ plt.show()
660660
## Some Discrete Probability Distributions
661661
662662
663-
Let's write some Python code to compute means and variances of soem univariate random variables.
663+
Let's write some Python code to compute means and variances of some univariate random variables.
664664
665665
We'll use our code to
666666
@@ -715,7 +715,7 @@ $$
715715
\textrm{Prob}\{X=d\}=\log _{10}(d+1)-\log _{10}(d)=\log _{10}\left(1+\frac{1}{d}\right)
716716
$$
717717
718-
where $d\in\{1,2,...,9\}$ can be thought of as a **first digit** in a sequence of digits.
718+
where $d\in\{1,2,\cdots,9\}$ can be thought of as a **first digit** in a sequence of digits.
719719
720720
This is a well defined discrete distribution since we can verify that probabilities are nonnegative and sum to $1$.
721721
@@ -1531,8 +1531,8 @@ Start with a joint distribution
15311531
$$
15321532
\begin{aligned}
15331533
f_{ij} & =\textrm{Prob}\{X=i,Y=j\}\\
1534-
i& =0,……,I-1\\
1535-
j& =0,……,J-1\\
1534+
i& =0, \cdots,I-1\\
1535+
j& =0, \cdots,J-1\\
15361536
& \text{stacked to an }I×J\text{ matrix}\\
15371537
& e.g. \quad I=1, J=1
15381538
\end{aligned}
@@ -1561,8 +1561,8 @@ Let's start with marginal distributions
15611561

15621562
$$
15631563
\begin{aligned}
1564-
\textrm{\textrm{Prob}}\{X=i\} &= \sum_{j}f_{ij}=\mu_{i}, i=0,……,I-1\\
1565-
\textrm{\textrm{Prob}}\{Y=j\}&= \sum_{j}f_{ij}=\nu_{j}, j=0,……,J-1
1564+
\text{Prob} \{X=i\} &= \sum_{j}f_{ij}=\mu_{i}, i=0, \cdots, I-1\\
1565+
\text{Prob} \{Y=j\}&= \sum_{j}f_{ij}=\nu_{j}, j=0, \cdots, J-1
15661566
\end{aligned}
15671567
$$
15681568

@@ -1574,11 +1574,11 @@ Consider the following bivariate example.
15741574

15751575
$$
15761576
\begin{aligned}
1577-
{\textrm{Prob}}\{X=0\}= & 1-q =\mu_{0}\\
1578-
{\textrm{Prob}}\{X=1\}=& q =\mu_{1}\\
1579-
{\textrm{Prob}}\{Y=0\}=& 1-r =\nu_{0}\\
1580-
{\textrm{Prob}}\{Y=1\}= & r =\nu_{1}\\
1581-
\textrm{where }0≤q<r≤1
1577+
\text{Prob} \{X=0\}= & 1-q =\mu_{0}\\
1578+
\text{Prob} \{X=1\}=& q =\mu_{1}\\
1579+
\text{Prob} \{Y=0\}=& 1-r =\nu_{0}\\
1580+
\text{Prob} \{Y=1\}= & r =\nu_{1}\\
1581+
\text{where } 0 \leq q < r \leq 1
15821582
\end{aligned}
15831583
$$
15841584

@@ -1677,10 +1677,10 @@ For example, consider two random variables $X, Y$ with distributions
16771677

16781678
$$
16791679
\begin{aligned}
1680-
\textrm{\textrm{Prob}}(X = 0)& = 0.6,\\
1681-
\textrm{\textrm{Prob}}(X = 1) &= 0.4,\\
1682-
\textrm{\textrm{Prob}}(Y = 0)& = 0.3,\\
1683-
\textrm{\textrm{Prob}}(Y = 1) &= 0.7,
1680+
\text{Prob}(X = 0)& = 0.6,\\
1681+
\text{Prob}(X = 1) &= 0.4,\\
1682+
\text{Prob}(Y = 0)& = 0.3,\\
1683+
\text{Prob}(Y = 1) &= 0.7,
16841684
\end{aligned}
16851685
$$
16861686

@@ -1729,7 +1729,7 @@ ymtb.add_row([1, r_hat])
17291729
print(ymtb)
17301730
```
17311731

1732-
Let's now take our two margingal distributions, one for $X$, the other for $Y$, and construct two distinct couplings.
1732+
Let's now take our two marginal distributions, one for $X$, the other for $Y$, and construct two distinct couplings.
17331733

17341734
For the first joint distribution:
17351735

@@ -1906,7 +1906,7 @@ Suppose that
19061906

19071907
$$
19081908
\begin{aligned}
1909-
\textrm{\textrm{Prob}}\{X(0)=i,X(1)=j\} &=f_{ij}≥0,i=0,……,I-1\\
1909+
\text{Prob} \{X(0)=i,X(1)=j\} &=f_{ij}≥0,i=0,\cdots,I-1\\
19101910
\sum_{i}\sum_{j}f_{ij}&=1
19111911
\end{aligned}
19121912
$$
@@ -1915,7 +1915,7 @@ $f_{ij} $ is a joint distribution over $[X(0), X(1)]$.
19151915

19161916
A conditional distribution is
19171917

1918-
$$\textrm{\textrm{Prob}}\{X(1)=j|X(0)=i\}= \frac{f_{ij}}{ \sum_{j}f_{ij}}$$
1918+
$$\text{Prob} \{X(1)=j|X(0)=i\}= \frac{f_{ij}}{ \sum_{j}f_{ij}}$$
19191919

19201920
**Remark:**
1921-
- This is a key formula for a theory of optimally predict a time series.
1921+
- This is a key formula for a theory of optimally predicting a time series.

0 commit comments

Comments
 (0)