[Math] Probability density function and distribution of $Y=\cos X$

density functionprobabilityprobability distributionsuniform distribution

I have the following problem.

Let X be a random variable uniformly distributed on $[-1,1]$ and let be $Y=\cos(X)$.

a) Find the function of density and distribution of $Y$.

b) Find the expectation of $Y$.

For a), I put the following;

Let G be the function of distribution of Y, then

$$G(y)=P(Y\leq y)=P(\cos(X)\leq y)$$

But from here I don't know how to proceed! This is because cos is nos strictly inceasing or decreasing functon and I dont have any idea about how to use arccos function.

Any help would be appreciated.

Best Answer

Sketch the graph of $y=cos(x)$ for $-1\leq x\leq 1$.

The support of $Y$ will be $(\cos 1; 1]$.   This will be a fold of two halves of the support of $X$.   We map back to these intervals by two semiinversions: $x_1={+}\arccos(y)$ and $x_2={-}\arccos y$.

Thus use the change of variable transformation: $$f_Y(y) = f_X\big({+}\arccos(y)\big)\left\lvert\frac{{+}\mathrm d \arccos(y)}{\mathrm d y}\right\rvert + f_X\big({-}\arccos(y)\big)\left\lvert\frac{{-}\mathrm d \arccos (y)}{\mathrm d y}\right\rvert$$

Then : $\; \mathsf E(Y) = \int_{\cos 1}^1 y\;f_Y(y)\operatorname d y = \ldots $

And : $\; F_Y(y) = \int_{\cos 1}^y f_Y(t)\operatorname d t \mathbf 1_{y\in(\cos 1;1]}+\mathbf 1_{y\in(1;\infty)}$


Alternatively, we note that: $$\begin{align} F_Y(y) & = \mathsf P(Y\leq y) \\[1ex] & = \mathsf P( X\leq -\arccos (y) \cup X\geq \arccos (y)) \\[1ex] & = \left(\frac{-\arccos (y) +1}{2}+\frac{1-\arccos (y)}{2}\right)\mathbf 1_{y\in[\cos 1; 1]}+\mathbf 1_{y\in(1;\infty)} \\[1ex] & = 1-\arccos y \end{align}$$


Hint: $\frac{\mathrm d \arccos y}{\mathrm d y} = \frac {-1}{\sqrt{1-y^2}}$

Related Question