<s>[INST] Find the value of $P(X < KY)$ The random variables X and Y are independent and have the pdf's as follows:
$f_X(x) = \begin{cases}
  xe^{-\frac{1}{2}x^2}& \text{if $x\geq0$} \\
  0 & \text{otherwise}
\end{cases}$
and
$f_Y(y) = \begin{cases}
  ye^{-\frac{1}{2}y^2}& \text{if $y\geq0$} \\
  0 & \text{otherwise}
\end{cases}$
Find the probability that X is less than or equal to KY where K is a constant.
My Approach:
\begin{align*}
P(X \leq KY) &= \int_0^{KY}\int_0^{Y}xe^{-\frac{1}{2}x^2}ye^{-\frac{1}{2}y^2}\,dx\,dy
\\ & = \frac{Y^2}{2}\int_{0}^{KY} xe^{-x^2}\,dx 
\\ & = \frac{-1}{2}e^{-K^2Y^2} + \frac{1}{2}
\end{align*}
I just want to know whether my approach is correct or not. Thanks in advance.
 [/INST] if $K \leq 0$, $P(X \leq KY ) = 0$.
If $K>0$, the integral should be
\begin{align*}
P(X \leq KY) &= \color{blue}{\int_0^\infty}\color{red}{\int_0^{Ky}}xe^{-\frac{1}{2}x^2}ye^{-\frac{1}{2}y^2}\, \color{red}{dx}\,\color{blue}{dy}
\end{align*}
Your final solution should be an expression that is depending only on $K$, it shouldn't involve $Y$.
</s>