3

I've run into a practice problem where $Y = \cos(\pi X)$, and $X$ is uniform on $[0, 1]$, and I'm supposed to prove that the PDF of $Y$ is $1/(\pi\sqrt{1 - y^2})$. I know that for derived distributions, you plug in the the equation for $Y$ in terms of $X$ into the PDF of $X$, integrate up to $y$, and then differentiate with respect to $y$. However, when I do this, I get the PDF of $Y = -1/(\pi\sqrt{1 - y^2})$.

I'm sure that the problem here is that there's some property of the cosine and its inverse that I don't know, so if someone could point out how to do this, that would be great, thanks!

Impossibility
  • 291
  • 4
  • 9

1 Answers1

6

If $Y=\cos \pi X$, $X\sim U(0,1)$, then the probability (for $y\in[-1,1]$)

$$\Pr(Y<y) = \Pr\left(X > \frac{\arccos y}\pi\right) = \int_{\frac{\arccos y}\pi}^{+\infty}f_X(x)\ dx = \int_{\frac{\arccos y}\pi}^{1}\frac{1}{1-0}dx = 1 - \frac{\arccos y}\pi$$

Then the PDF of Y is (for $y\in(-1,1)$)

$$f_Y(y) = \frac d{dy}\Pr(Y<y) = 0-\frac1\pi\cdot\frac{-1}{\sqrt{1-y^2}} = \frac{1}{\pi\sqrt{1-y^2}}$$

I am not sure which negative sign you have missed.


If you choose to jump a few steps between integration and differentiation, $$f_Y(y) = \frac d{dy}\int_{\frac{\arccos y}\pi}^{+\infty}f_X(x)\ dx = -f_X\left(\frac{\arccos y}\pi\right)\cdot\frac d{dy}\frac{\arccos y}\pi = \frac{1}{\pi\sqrt{1-y^2}}$$

(for $y\in(-1,1)$)

peterwhy
  • 22,256
  • Why does P(Y < y) = P(X > arccoss(y)/pi)? I'm confused as to why you switched the sign from < to >. – Impossibility Nov 24 '13 at 22:41
  • 1
    Because $\cos\pi X$ is decreasing in the range $X\in[0,1$]! For example, if I want $X$ such that $\cos\pi X<0.5$, then the corresponding $X$'s are those satisfying $X>\frac{\arccos 0.5}{\pi} = \frac13$. – peterwhy Nov 25 '13 at 04:28
  • 1
    Sweet, thanks. So I understand that if a function is decreasing, we switch the comparison operator? – Impossibility Nov 25 '13 at 17:41
  • 1
    You can say so, but what I do between the first two step was to solve $\cos\pi X<y$ to get the range of $X$: $X>\frac{\arccos y}{\pi}$. Say for an unrelated example, $W=Z^2$, then $$\Pr\left(W<w\right) = \Pr\left(Z^2<w\right) = \Pr\left(-\sqrt w<Z<\sqrt w\right) = \int_{-\sqrt w}^{\sqrt w}f_Z(z)\ dz$$ for $w\ge 0$. In general, the "second step" may consist of ranges and not only simple "greater than" or "smaller than" relations. – peterwhy Nov 26 '13 at 15:14