Let $\theta$ is a random variable which uniform distributed $(-\pi,\pi)$, with probability density function $$f(\theta)=\begin{cases}\dfrac{1}{2\pi}, -\pi<\theta<\pi\\ 0, \text{otherwise}\end{cases}.$$

Let $Y=\cos\theta $. Find the probability density function of $Y$.

To answer this question I'm using Jacobian transformation like this.

$Y=\cos\theta$ imply $\theta=\arccos Y$.

The Jacobian is $$\vert J\vert = \left\vert\dfrac{d\theta}{dy}\right\vert= \left\vert-\dfrac{1}{\sqrt{1-y^2}}\right\vert=\dfrac{1}{\sqrt{1-y^2}}.$$ So I have $$g_Y(y)=f(\theta)\vert J\vert=f(\arccos Y)\vert J\vert=\dfrac{1}{2\pi\sqrt{1-y^2}}.$$

To find the range of $y$, I try to plot the cosine graphics from $\theta=-\pi$ to $\theta=\pi$ like this. enter image description here

We can see that the range of $y$ is $-1<y<1$. So I have

$$ g_Y(y)=\begin{cases}\dfrac{1}{2\pi\sqrt{1-y^2}}, -1<y<1\\ 0, \text{otherwise}\end{cases}. $$

Now I want to check that $g(y)$ is a probability density function with the property of pdf.

\begin{eqnarray} \int\limits_{-1}^{1} \dfrac{1}{2\pi\sqrt{1-y^2}} dy &=& \left[-\dfrac{1}{2\pi} \arccos y\right]_{-1}^1\\ &=& -\dfrac{1}{2\pi} \arccos (1)+\dfrac{1}{2\pi} \arccos (-1)\\ &=& -\dfrac{1}{2\pi} (0)+\dfrac{1}{2\pi} (\pi)\\ &=& \dfrac{1}{2}. \end{eqnarray}

If $g(y)$ is p.d.f. the integral should be $1$.

What is my mistake in my work? Did I make a mistake in determining the range of $y$ or the transformation?

  • 2
    $\begingroup$ As what you plot the transformation, it is not a one-to-one transformation for the entire domain, but it is a one-to-one transformation on $[-\pi, 0]$ and $[0, \pi]$ individually if you split them. You may think about when does $Y = \cos \theta \Rightarrow \theta = \arccos Y$ holds - the principal domain. Essentially, you have done the transformation, for half of the domain, so you got $1/2$ in the process. The another half is the same, so you add them up and will get $1$. $\endgroup$ – BGM Jul 10 '19 at 12:44
  • $\begingroup$ @BGM Yes, I understand what you mean. Thank you very much for your help. $\endgroup$ – Ongky Denny Wijaya Jul 10 '19 at 14:05

The reason for the discrepancy is the following: The connection between the $\theta$-domain and the $y$-domain is not bijective, but $2:1$.

I'd argue as follows: When $Y=\cos\Theta$ then we know that $-1\leq Y\leq 1$. Let $G$ be the cumulative distribution function of $Y$. Then $$G(y)=P(Y\leq y)=P(\cos\Theta\leq y)=P(\arccos y\leq|\Theta|\leq\pi)=2{\pi-\arccos y\over2\pi}\ .$$ This gives $$g_Y(y)=G'(y)={1\over\pi\sqrt{1-y^2}}\qquad(-1\leq y\leq1)\ .$$

  • $\begingroup$ Thank you very much @Christian Blatter $\endgroup$ – Ongky Denny Wijaya Jul 10 '19 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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