[Math] Distribution of arcsin of a uniform random variable

probability distributions

Question: Find the law of $\arcsin(X)$ where $X\sim Unif[0,1]$ and where $X\sim Unif[-1,1]$

My attempt: We say $f_X(x)=Unif[0,1]$, and that $Y=\arcsin(X)$

We say $x=\phi^{-1}(y)=\sin(y)$ and have $\frac{d}{dy}\phi^{-1}(y)=\cos(y)$

Then by following a standard process we say: $f_Y(y)=f_X(\sin(y))\,\cos(y)$ for $0\leq y\leq \frac{\pi}{2}$, $0$ otherwise. As $X\sim Unif$, $f_X(something)$ is just $something$, so here is just $\sin(y)$, I think.

The only difference for the second part appears to be the valid range, so for $X\sim Unif[-1,1]$ we have $F_Y(y)=f_X\sin(y)\cos(y)$ where $-\frac{\pi}{2}\leq y\leq \frac{\pi}{2}$, $0$ otherwise.

Surely this can't be right? Integrating an odd function ( $\sin(y)\cos(y)$ ) over symmetric limits would give zero, not one?

N.B. To check part one I have tried integrating by substituting $u=\sin(y)$, $\frac{du}{dy}=\cos(y)dy$:

$$\int_0^{\frac{\pi}{2}} \sin(y)\cos(y) dy = \int_0^1u \;du = \left.\frac{u^2}{2}\right|^1_0 = \frac{1}{2}$$

so I guess my $f_X$ needs to be doubled?

Update Following the comments provided I think I have identified my errors.

Firstly taking $X\sim Unif[0,1]$, $f_X(\sin(y))= 1$ (not $\sin(y)$. Therefore we have

$$f_Y(y)=f_X(\sin(y))\,\cos(y) = \cos(y)\text{ for }0\leq y\leq \frac{\pi}{2},\;0\text{ otherwise.}$$
To check this integrate over the limits: $\int_0^{\frac{\pi}{2}}\cos(y)\,dy$ $ = \sin\frac{\pi}{2}-\sin 0 =1$, as expected.

Secondly takings $X\sim Unif[-1,1]$ , $f_X(\sin(y))= \frac{1}{2}$. Repeating the same process $f_Y(y)=f_X(\phi^{-1}(y)). \frac{d}{dy}\phi^{-1}(y) = \frac{1}{2} \cos(y) $ where $-\frac{\pi}{2}\leq y\leq \frac{\pi}{2}$

To check this we integrate again as follows:
$$\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{1}{2} \cos(y)\,dy
= \left. \frac{1}{2}\sin(y)\right|_{-\frac{\pi}{2}}^{\frac{\pi}{2}}
= \frac{1}{2} \left[\sin({\frac{\pi}{2}})-(\sin({-\frac{\pi}{2}})\right]
= \frac{1}{2}[1 – (-1)] =1$$

Best Answer

Let us deal with the case $X$ is uniform on $[-1,1]$, and calculate $F_Y(y)$, going back to basics.

Lest we forget, note first that $F_Y(y)=0$ if $y\lt \pi/2$, and $F_Y(y)=1$ for $y\gt \pi/2$. From now on assume that $-\pi/2\le y\le \pi/2$.

We have $$F_Y(y)=\Pr(Y\le y)=\Pr(\arcsin X\le y)=\Pr(X\le \sin y).$$ Since $X$ is uniform on $[-1,1]$, it has density $\frac{1}{2}$ over this interval. The length of the interval from $-1$ to $\sin y$ is $\sin y-(-1)$. It follows that $F_Y(y)=\frac{\sin y+1}{2}$ on the interval $-\pi/2\le y\le \pi/2$.

If we are interested in $f_Y(y)$ we can differentiate.