Skip to content

Commit

Permalink
303 class 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
SichangHe committed Apr 3, 2024
1 parent 5e88a48 commit ccbe4cd
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion src/notes/class_notes/stats303.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ where temperature
- stochastic matrix, because each row sum to 1
- $\{Q^n\}$ converge, stationary $\Leftarrow$
- all eigenvalue $|\lambda|≤1$
- $Q=A\Lambda A^{-1} ⇒ Q^n=A\Lambda^nA^{-1}$
- $Q=A\Lambda A^{-1} ⇒ Q^n=A\Lambda^nA^{-1}$
where $\Lambda^n$ is diagonal with entries $\lambda_i^n$
- $\vec\pi_t$ probability be at state $x=1\ldots N$ at time $t$
- [stationary distribution](stats210.html#stationary-distribution):
Expand All @@ -284,3 +284,41 @@ $$
$$

## Markov chain Monte Carlo (MCMC)

- work in high dimension
- honor probability dependency between sample

### metropolis hasting algorithm

want to sample target distribution $p$

design Markov chain w/ stationary distribution $\pi=p$:

1. get Markov chain w/ $Q$ s.t. not necessarily $\pi=p$
1. acceptance rate $\displaystyle α(x,x^*):=\min \left(
1, \frac{p(x^*)Q_{x^*,x}}{p(x)Q_{x,x^*}}
\right)$
- $⇒ p(x)Q_{x,x^*}α(x,x^*)=p(x^*)Q_{x^*,x}α(x^*,x)$
1. use new Markov chain w/ $Q'_{x,x^*}:=α(x,x^*)Q_{x,x^*},\quad x^*≠x$
- $Q_{x,x}$ take the rest of probability

- do not know when stationary

### Gibbs sampling

want to sample variable $x_i$ following different distribution

fix $x_{-i}:=\{x_1\ldots x_{i-1},x_{i+1}\ldots\}$ to previous value
when sampling $x_i$

a special case for metropolis hasting method $\Leftarrow$

$$
p(x_{-i}^*)=p(x_{-i})\\
⇒ α(x,x^*)=
\frac{p(x^*)p(x_i|x_{-i}^*)}{p(x)p(x_i^*|x_{-i})}=
\frac{p(x_i^*|x_{-i}^*)p(x_{-i}^*)p(x_i|x_{-i}^*)}
{p(x_i|x_{-i})p(x_{-i})p(x_i^*|x_{-i})}=1
\frac{p(x_i^*|x_{-i})p(x_{-i})p(x_i|x_{-i})}
{p(x_i|x_{-i})p(x_{-i})p(x_i^*|x_{-i})}=1
$$

0 comments on commit ccbe4cd

Please sign in to comment.