Question:
Let $X_1$ and $X_2$ denote independent real-valued random variables with distribution functions $F_1$, $F_2$, and characteristic functions $\varphi_1$, $\varphi_2$, respectively. Let Y denote a random variable such that $X_1$, $X_2$, and Y are independent and
$$ Pr(Y = 0)= 1 - Pr(Y = 1) = \alpha$$
for some 0 < $\alpha$ < 1. Define
$$ Z = \begin{cases} X_1 & \text{if } Y = 0 \\[.2cm] X_2 & \text{if } Y = 1 \end{cases} $$ Find the characteristic function of $Z$ in terms of $\varphi_1$, $\varphi_2$, and $\alpha$.
I am not sure how to proceed with this problem.
Note that we can write $Z=X_1(1-Y)+X_2Y$. Now, let $g(x_1,x_2,y)=\exp(itx_1(1-y)+itx_2y)$ and
find ${\rm E}[g(X_1,X_2,Y)\mid Y=y]$ in terms of $\varphi_1$,$\varphi_2$ and $y$,
use that ${\rm E}[g(X_1,X_2,Y)]={\rm E}[{\rm E}[g(X_1,X_2,Y)\mid Y]]$ to obtain an expression of $\varphi_Z$ in terms of $\varphi_1$, $\varphi_2$ and $\alpha$.