9
$\begingroup$

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.

$\endgroup$
0

1 Answer 1

16
$\begingroup$

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}

$\endgroup$
1
  • 3
    $\begingroup$ Thank you very much. Your quick and detailed response was very helpful. $\endgroup$
    – M.H
    Commented Oct 23, 2017 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.