Conditional distribution in rejection sampling

226 Views Asked by At

Given a discrete random variable $X$ that takes on values ${1,2,3,4,5}$ and has respective pmf $p(x) = {1/6, 1/6, 1/6, 1/6, 1/3}$, sampling (proposal) distribution $s(x)$ is the discrete uniform distribution, and acceptance probability $a(x) = 1/2, 1/2, 1/2, 1/2, 1$

what is the conditional distribution of $X$ given it is accepted on the 3rd try?

so I got the constant for the acceptance probability is $c=0.6$ which is the minimum value of all possible $\frac{s(x)}{p(x)}$.

also, the number of trials until acceptance is geometric(c=0.6)

is my conditioning correct?

$P[accepted|3 trials] = \frac{\sum_{x=1}^{5}{[(1-a(x))^2}a(x)]}{(1-c)^2c}$

1

There are 1 best solutions below

0
On

Eh, not quite.

Let $S_1, S_2, S_3$ be the first three samples from the uniform distribution.   Let $A_1,A_2,A_3$ be the events of accepting these values.

Of note: $S_1,S_2,S_3$ are mutually independent, $A_1,A_2,A_3$ are too. Also, although for any $i$ we know $A_i,S_i$ are dependent, we do have that for any $i\neq j$ then $A_i, S_j$ are independent.

The probability mass for the values of $X$, when given that $S_1,S_2$ are not accepted but $S_3$ is, will be: $$\begin{align*}\mathsf P(X=x\mid A_1^\complement\cap A_2^\complement\cap A_3) &= \dfrac{\mathsf P(A_1^\complement\cap A_2^\complement\cap A_3\cap S_3=x)}{\mathsf P(A_1^\complement\cap A_2^\complement\cap A_3)} \\[1ex] &=\dfrac{\mathsf P(A_1^\complement)~\mathsf P(A_2^\complement)}{\mathsf P(A_1^\complement)~\mathsf P(A_2^\complement)}\cdot\dfrac{\mathsf P(S_3=x)\mathsf P(A_3\mid S_3=x)}{\mathsf P(A_3)} \\[1ex] &= \dfrac{p(x)a(x)}{\sum_{s=1}^5 p(s)a(s)} \\[1ex] &= \tfrac 53 p(x)a(x)\\[1ex] &=\begin{cases}\tfrac{1}{6}&:& x\in\{1,2,3,4\} \\ \tfrac 13 &:& x\in\{5\} \\ 0&:& \text{otherwise}\end{cases} \end{align*}$$

Which is exactly what we want to happen.


The probability that a sample is accepted is, of course: $~c~{= \sum_{s=1}^5 p(s)a(s) \\ = \tfrac 45\tfrac 12{+}\tfrac 15\tfrac 11 \\ = \tfrac 35 \\ =~0.6} \quad\checkmark$