# Probability - Change of Variables

Below is my solution to a problem from one of the Schaum's books. However, I come up with the wrong answer. I am hoping somebody here can tell me what I am doing wrong. Thanks.

Bob

Question Let $Y=\sin(X)$ where $X$ is uniformly distributed over $[0,2\pi]$. Find the pdf of $Y$.

\begin{eqnarray*} P(Y<=y_0) &=& P(\sin(x) <= y_0) = P( X <= \arcsin(y_0))\\ P(Y<=y_0) &=& \int_0^{\arcsin(y_0)} 1 / { 2 \pi }dx \\ P(Y<=y_0) &=& {\arcsin(y_0)} / { 2 \pi } \\ \end{eqnarray*} This gives us the following distribution function \begin{eqnarray*} F(Y) &=& {\arcsin(y_0)} / { 2 \pi } \\ \end{eqnarray*} To find the pdf, we differentiate and get: \begin{eqnarray*} f(y) &=& \frac{1}{ 2 \pi \sqrt { (1-y^2) } } \\ \end{eqnarray*} However, the book gets: \begin{eqnarray*} f(y) &=& \frac{1}{ \pi \sqrt { (1-y^2) } } \\ \end{eqnarray*}

• $[\sin X\leqslant y_0]\ne[X\leqslant\arcsin y_0]$, for example $[\sin X\leqslant0]=[\pi\leqslant X\leqslant2\pi]\ne[X\leqslant0]$. – Did May 31 '14 at 13:19

$F_{X}x = 0 ; x<0$

$F_{X}x = \frac{x}{2\pi} ; 0<=x<=2\pi$

$F_{X}=1 ; x>2\pi$ Y takes on values on [-1,1]

$P(Y<y) = 0$ for $y <-1$ $P(Y<y) = 1$ for $y>1$

For y{-1,1], $F_{Y}(y) = P(Y\leq y) = P(sin(X) <y)$

$sinx = y$ has two solutions in $(0,2\pi) x = sin^{-1}y$ and $x = \pi - sin^{-1}y$ for y>0

and $x = \pi - sin^{-1}y$ and $2\pi + sin^{-1}y$ for y<0

For y = -1, $F_{Y}(y) = 0$

For y = 0, $F_{Y}(y) = 1/2$

For y = 1, $F_{Y}(y) = 1$. The below CDF of Y will satisfy the above conditions.

Thus $F_{Y}(y) = \dfrac{\pi + 2sin^{-1}y}{2\pi}$, y = [-1,1]

$F_{Y}(y) = 0;$ otherwise

Differentiating this you get

$f_{Y}y = \dfrac{1}{\pi \sqrt{1-y^2}}$, y (-1,1)

$f_{Y}y = 0$; otherwise.

• Thanks for the response. I have no way of finding out if there is a typo in the book. Sorry. In terms of your solution, my understanding is that the method you picked will not work if h(y) is both increasing and decreasing on the interval. In this case, I believe it is. – Bob May 31 '14 at 14:49
• @Bob, See the changed solution. Hope this makes sense. – Satish Ramanathan May 31 '14 at 16:49
• Satish, thanks for your responses. Your new response makes a lot of sense to me. It has been very educational for me. Bob – Bob May 31 '14 at 21:23
• If it is useful, could you accept and vote, Thanks – Satish Ramanathan May 31 '14 at 21:54

$Y=\sin X$ where $X\in[0;2\pi)$ uniformly.

Then $Y\in[-1;1]$ but almost every value for $Y$ in that support corresponds to two values for $X$ in its support.   Eg $\forall x\in[0;\pi]~\sin(x)=\sin(\pi-x)$ and $\forall x\in(\pi;2\pi)~\sin(x)=\sin(3\pi-x)$.   Thus interval for $X$ is folded onto the interval for $Y$, making the distribution for $Y$ twice as dense as you calculated.