What is the probability distribution of a function of a uniform random variable?

103 Views Asked by At

Suppose random variable $X$ has a uniform distribution: $X\sim U[-x_0, x_0]$.

What is the probability distribution function (pdf) of $Y$ where

\begin{equation} Y= \begin{cases} \cos^2\left(\frac{aX}{2}\right) & \hspace{4mm} \text{for} \hspace{4mm} |X|\leq \frac{\pi}{a}\\ 0 & \hspace{4mm} \text{for} \hspace{4mm} \frac{\pi}{a} < |X|<\pi\qquad? \end{cases} \end{equation}

Here is the approach I followed to solve this problem:

1) Find the cumulative distribution function (CDF) of Y: $F_Y(y)=P(Y \leq y)$

2) pdf function is the derivative of the cdf function $f_Y(y)=\frac{d}{dy}F_Y(y)$

(I am not sure about the rest)

If $|x_0|<\frac{\pi}{a}$ then,

$$ \cos^2\left(\frac{ax_0}{2}\right)\leq y \leq 1$$

\begin{align} F_Y(y)&=P(Y \leq y) \\&= P\left\{\cos^2\left(\frac{aX}{2}\right)\leq y\right\} \\&=P\left( \frac{2}{a} \arccos(\sqrt {y})\leq X \leq x_0\right)+P\left( -x_0\leq X \leq -\frac{2}{a} \arccos (\sqrt {y})\right) \end{align}

So,

$$F_Y(y)=1-\frac{2}{ax_0}\arccos (\sqrt {y})$$

Therefore, the pdf function can be written as

$$f_Y(y)=\frac{d}{dy}F_Y(y)=\frac{1}{ax_0\sqrt {y}\sqrt {1-y}},\hspace{2mm} \text{for}\hspace{2mm} \cos^2\left(\frac{ax_0}{2}\right)< y <1,$$

which I believe is not correct as it does not integrate to $1$ (WHY?).

If $|x_0|\geq \frac{\pi}{a} $ then, $ 0 \leq y \leq 1$

And I believe the CDF function can be obtained the same as above.