Given $X\sim\text{Unif}(0,2\pi)$, find the probability density function of the derived RV $Y = \sin(X)$.
I attempted the equation as follows however I am confused how to get the range of the PDF as well as the integration limit.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityGiven $X\sim\text{Unif}(0,2\pi)$, find the probability density function of the derived RV $Y = \sin(X)$.
I attempted the equation as follows however I am confused how to get the range of the PDF as well as the integration limit.
Solution 1. The range of $Y=\sin X$ with $X\in[0,2\pi]$ is $[-1,1]$ not $[0,0]$ because $\sin$ is not monotone. You can draw the graph of $\sin$ with $X\in[0,2\pi]$ to see the range.
For $y\in[0,1]$, $$Y=\sin X\leq y\iff 0\leq X\leq\arcsin y\quad\text{or}\quad\pi-\arcsin y\leq X\leq 2\pi.$$ Thus, \begin{align*} F_Y(y)&=P(Y\leq y)=P(0\leq X\leq\arcsin y)+P(\pi-\arcsin y\leq X\leq 2\pi) \\ &=\frac{\arcsin y}{2\pi}+\frac{\pi+\arcsin y}{2\pi}=\frac{1}{2}+\frac{\arcsin y}{\pi}. \end{align*} For $y\in[-1,0)$, $$Y=\sin X\leq y\iff\pi-\arcsin y\leq x\leq 2\pi+\arcsin y.$$ Thus. \begin{align*} F_Y(y)&=P(Y\leq y)=P(\pi-\arcsin y\leq x\leq 2\pi+\arcsin y) \\ &=\frac{\pi+2\arcsin y}{2\pi}=\frac{1}{2}+\frac{\arcsin y}{\pi}. \end{align*} Therefore, $$F_Y(y)=\begin{cases} 1, & y>1; \\ \displaystyle\frac{1}{2}+\frac{\arcsin y}{\pi}, & y\in[-1,1]; \\ 0, & y<-1. \end{cases}$$ Consequently, $$f_Y(y)=\begin{cases} 1/(\pi\sqrt{1-y^2}), & y\in[-1,1]; \\ 0, & \text{Otherwise}. \end{cases}$$
Solution 2. Of course we can use the transformation formula on r.v.'s to obtain the density of $Y$. Nonetheless, since $sin$ is not monotone, we have to use a generalized version of transformation formula. Here is Theorem 2.1.8 abstracted from Statistical Inference by George Casella:
Theorem 2.1.8. Let $X$ have pdf $f_X(x)$, let $Y=g(X)$, and define the sample space $\mathcal{X}=\{x\mid f_X(x)>0\}$. Suppose there exists a partition $A_0,A_1,\ldots,A_k$ of $\mathcal{X}$ such that $P(X\in A_0)=0$ and $f_X(x)$ is continuous on each $A_i$. Further, suppose there exist functions $g_1(x),\ldots,g_k(x)$, defined on $A_1,\ldots,A_k$, respectively, satisfying: i) $g(x)=g_i(x)$ for $x\in A_i$, ii) $g_i(x)$ is monotone on $A_i$, iii) The set $\mathcal{Y}=\{y\mid y=g_i(x)\ \text{for some}\ x\in A_i\}$ is the same for each $i=1,\ldots,k$, and iv) $g_i^{-1}(y)$ has a continuous derivative on $\mathcal{Y}$ for each $i=1,\ldots,k$. Then $$f_Y(y)=\begin{cases} \sum_{i=1}^{k}{f_X(g_i^{-1}(y))}\left|\frac{d}{dy}g_i^{-1}(y)\right|, & y\in\mathcal{Y}; \\ 0, & \text{Otherwise}. \end{cases}$$
Intuitively we would observe that the function $\sin X$ is monotone on $A_1=[0,\pi/2]$, $A_2=(\pi/2,3\pi/2]$, $A_3=(3\pi/2,2\pi]$. However, the condition iii) is violated as the ranges for $x\in A_i$ are not equal: $\sin(A_1)=[0,1]$, $\sin(A_2)=[-1,1]$ and $\sin(A_3)=[-1,0]$. To apply the theorem, we have to split $A_2$ into $A_{2,1}=[\pi/2,\pi]$ and $A_{2,3}=[\pi,3\pi/2]$ so that we can apply theorem to $\mathcal{Y}_1=[0,1]$ ($A_1$ and $A_{2,1}$) and $\mathcal{Y}_3=[-1,0]$ ($A_{2,3}$ and $A_3$) separately.
For $y\in[0,1]$, we have \begin{align*} g_1^{-1}(y)&=\arcsin y; \\ g_{2,1}^{-1}(y)&=\pi-\arcsin y. \end{align*} Thus, $$f_Y(y)=\frac{1}{2\pi}\cdot\frac{1}{\sqrt{1-y^2}}+\frac{1}{2\pi}\cdot\left|-\frac{1}{\sqrt{1-y^2}}\right|=\frac{1}{\pi\sqrt{1-y^2}}.$$
Likewise for $y\in[-1,0]$, \begin{align*} g_{2,3}^{-1}(y)&=\pi-\arcsin y; \\ g_3^{-1}(y)&=2\pi+\arcsin y. \end{align*} This entails $$f_Y(y)=\frac{1}{2\pi}\cdot\left|-\frac{1}{\sqrt{1-y^2}}\right|+\frac{1}{2\pi}\cdot\frac{1}{\sqrt{1-y^2}}=\frac{1}{\pi\sqrt{1-y^2}}.$$
Together, we have the same result as before.
The following picture illustrates how I obtained the inverse function: