Let $X$ and $Y$ be $N(0,1)$, show that $Z$ is $SN(\lambda)$. Let $X$ and $Y$ be $N(0,1)$ and let $Z$ be


*

*$Z = Y$ if $\lambda Y ≥ X$

*$Z = -Y$ if $\lambda Y < X$. 


Show that $Z$ is $SN(\lambda)$, (skew normal distribution). 
I've tried using the transformation theorem without success, and I'm realizing that I'm probably setting up the problem wrong. Grateful for all tips and/or solutions! 
 A: Start with the obvious decomposition:
$$
P(Z\leq z)=P(\lambda Y\geq X)P(Z\leq z|\lambda Y\geq X)+P(\lambda Y< X)P(Z\leq z|\lambda Y< X).
$$
Now:
$$
P(Z\leq z,\lambda Y\geq X)=P(Y\leq z,\lambda Y\geq X).
$$
$$
P(Z\leq z,\lambda Y< X)=P(-Y\leq z,\lambda Y< X).
$$
Since $X$ and $Y$ are both normally distributed, denote their densiy by the function $f$ with $\int_{-\infty}^{y}f(x)\mathrm dx=F(y)$.
\begin{split}
P(Y\leq z,\lambda Y\geq X)&=\int_{-\infty}^z f(y)\int_{-\infty}^{\lambda y}f(x)\mathrm dx\mathrm dy \\
&=\int_{-\infty}^z f(y)F(\lambda y)\mathrm dy .
\end{split}
Similarly:
\begin{split}
P(-Y\leq z,\lambda Y< X)&=\int_{-z}^\infty f(y)\int^{\infty}_{\lambda y}f(x)\mathrm dx\mathrm dy \\
&=\int_{-z}^\infty f(y)(1-F(\lambda y))\mathrm dy .
\end{split}
So:
$$
P(Z\leq z)=\int_{-z}^\infty f(y)(1-F(\lambda y))\mathrm dy +\int_{-\infty}^z f(y)F(\lambda y)\mathrm dy.
$$
Finding the density amounts to taking a derivative with respect to $z$:
$$
f_Z(z)=f(-z)(1-F(-\lambda z))+f(z)F(\lambda z).
$$
Using the evenness of $f$, we have $f(-z)=f(z)$ and 
$$
1-F(-z)=\int_{-z}^\infty f(y)\mathrm dy =\int_{-\infty}^z f(y)\mathrm dy=F(z).
$$
This leads to the skew normal distribution:
$$
f_Z(z)=2f(z)F(\lambda z).
$$
Interestingly we have only used the evenness of $f$ and that's all you need. 
