Let
- $(E,\mathcal E,\lambda)$ be a measure space;
- $p,q:E\to[0,\infty)$ be $\mathcal E$-measurable with $$\lambda p=\lambda q=1$$ and \begin{equation}\begin{split}\mu&:=p\lambda;\\ \nu&:=q\lambda;\end{split}\end{equation}
- $c>0$ with $$p\le cq$$ and $$r:=\frac{{\rm d}\mu}{{\rm d}\nu};$$
- $(\Omega,\mathcal A,\operatorname P)$ be a probability space;
- $(Y_n)_{n\in\mathbb N}$ be an $(E,\mathcal E)$-valued independent identically distribtued process on $(\Omega,\mathcal A,\operatorname P)$ with $Y_1\sim\nu$;
- $(U_n)_{n\in\mathbb N}$ be a real-valued independent identically distribtued process on $(\Omega,\mathcal A,\operatorname P)$ with $U_1\sim\mathcal U_{[0,\:1)}$.
I want to show that if $(Y_n)_{n\in\mathbb N}$ and $(U_n)_{n\in\mathbb N}$ are independent, then $$I:=\inf\left\{i\in\mathbb N:U_i<\frac rc(Y_i)\right\}$$ is geometrically distributed with parameter $c^{-1}$ and $$X:=Y_I\sim\mu.$$
It is easy to prove that $I$ is geometrically distributed with parameter $c^{-1}$, but I fail to prove $X\sim\mu$. A proof can be found on the web, but I don't get it.
Let $B\in\mathcal E$. Then we can clearly write $$\operatorname P\left[X\in B\right]=\sum_{n\in\mathbb N}\operatorname P\left[I=n,Y_n\in B\right]\tag1,$$ but how do we need to proceed? I guess we need to build the conditional expectation somewhere ...
$$[I=n~;X \in B] = \bigcap_{i=1}^{n-1} [U_i < c^{-1}r(Y_i)] \cap [U_n \ge c^{-1}r(Y_n) ; Y_n \in B].$$ Using independence, one gets
$$P[I=n~;X \in B] = \prod_{i=1}^{n-1} P[U_i < c^{-1}r(Y_i)] \times P[U_n \ge c^{-1}r(Y_n) ; Y_n \in B].$$ Since $U_n$ and $Y_n$ are independent, $$P[U_n \ge c^{-1}r(Y_n) ; Y_n \in B] = \int_E 1_B(y) \Big(\int_0^1 1_{u < c^{-1}r(y)} du \Big) d\nu(y).$$ Since $r=p/q \le c$ $\nu$-almost everywhere, we get $$P[U_n \ge c^{-1}r(Y_n) ; Y_n \in B] = \int_E 1_B(y) c^{-1}r(y)d\nu(y) = c^{-1}\mu(B).$$ The particular case where $B$ is $E$ yields $P[U_n \ge c^{-1}r(Y_n)] = c^{-1}$. Putting things together, we derive, by equidistribution, $$P[I=n~;X \in B] = (1-c^{-1})^{n-1}c^{-1}\mu(B).$$ As a result, $I$ and $X$ are independent, $I$ is geometric with parameter $c^{-1}$ and $X$ has law $\mu$.