I have to write python code in jupyter due to sampling bivariate normal distribution with 3 sampling methods:
- Prior Sampling
- Gibbs Sampling
- Rejection Sampling
I have done the first two samplings and I also have clear understanding of what accept reject method or so-called rejection sampling is. yet I can not find any proposal distribution for it.
Rejection Sampling and proposal distribution
assume you have a distribution $f(x)$ which is not easy for you to sample. choose another distribution that is easy for you to sample wisely called $g(x)$ so that for some constant $C$ for all $x$ we have $C.g(x) > f(x)$.
we call this $g(x)$ the proposal distribution.
sample from $g(x)$ and name it $X_i$ as you chose $g(x)$ because it was easy to sample. accept this sample with a probability of $p = f(X_i)/C.g(X_i)$.
As I said before I cant find any $g(x)$ easy enough to sample and yet bigger than bivariate normal distribution for some $C$.