$f_U(t)=f_{X,Z}(t,1)+f_{Y,Z}(t,0)$ if $U=X $ if $Z=1$ and $U=Y$ if $Z=0$

22 Views Asked by At

Suppose $Z$ is a bernouli variable with parameter $p$. $Z,X,Y$ are independent random variables. Now $U$ be a random variable such that

$$U(\omega)=\begin{cases}X(\omega) & \text{when }Z(\omega)=1\\ Y(\omega) & \text{when }Z(\omega)=0\end{cases}$$

From this can we say that

$f_U(t)=f_{X,Z}(t,1)+f_{Y,Z}(t,0)$

1

There are 1 best solutions below

4
On

Assuming that $X$ and $Y$ have densities $f_X$ and $f_Y$ we can compute $f_U$ as follows:

$$P(U \leq t)=P(X\leq t, Z=1) +P(Y\leq t, Z=0)$$ $$=pP(X\leq t)+(1-p)P(Y\leq t).$$ Differentiating this we get $f_U(t)=pf_X(t)+(1-p)f_Y(t)$ almost everywhere (w.r.t. Lebesgue measure).