5

There is a formula for the density of the cosine of random variable that's a uniform on $(-\pi,\pi)$ as discussed in this page: $f_{Y}(y) = \dfrac{1}{\pi \sin(\cos^{-1}y)}, y \in\ [-1,1]$

Can anyone please show how this formula is derived in detail.

Ferdi
  • 4,882
  • 7
  • 42
  • 62
M.H
  • 53
  • 1
  • 6

1 Answers1

11

First note that $\cos$ is an even function; $\cos(-X)=\cos(X)$. Consequently it's the same as taking $\cos(W)$ where $W=|X|$ (or indeed you could work instead with $\cos(-W)$). Now $W$ is uniform on $[0,\pi)$. This is easier because the $\cos$ function is now monotonic over the values taken by the new variable and is now invertible.

Let $Y=\cos(W)$. Note that $P(W\leq w) = w/\pi$

\begin{eqnarray} F_Y(y)&=&P(Y\leq y)\\ &=&P(\cos(W)\leq y) \\ &=& P(W\geq \cos^{-1}(y)) \\ &=& P(W\leq \cos^{-1}(-y)) \\ &=&\cos^{-1}(-y)/\pi \\[20pt] f_Y(y)&=&\frac{d}{dy}F_Y(y)\\ &=&\frac{1}{\pi}\frac{d}{dy}\cos^{-1}(-y) \end{eqnarray}

Now $\frac{d}{dx} g^{-1}(x) = \frac{1}{g'(g^{-1}(x))}$, so

\begin{eqnarray} \frac{1}{\pi}\frac{d}{dy}\cos^{-1}(-y)&=& -\frac{1}{\pi}\frac{d}{dy}\cos^{-1}(y)\\ &=& \frac{1}{\pi}\cdot\frac{1}{\sin(\cos^{-1}(y))}\,,\:-1<y<1 \end{eqnarray}

Or, using the fact that $\frac{d}{dx}\cos^{-1}(x)=-\frac{1}{\sqrt{1-x^2}}$,

\begin{eqnarray} -\frac{1}{\pi}\frac{d}{dy}\cos^{-1}(-y)&=&\frac{1}{\pi}\cdot \frac{1}{\sqrt{1-y^2}}\,,\:-1<y<1 \end{eqnarray}

Glen_b
  • 257,508
  • 32
  • 553
  • 939