Probability density function of $X = \frac{P}{\cos(\theta)} - y\tan(\theta)$.

135 Views Asked by At

Assume that we have two independent random variables:

  • $P$ is distributed on $(0,1)$ with $f_{P}(p) = 2p$.

  • $\theta$ is uniformly distributed on $(0,2\pi)$.

We then define $X,Y$ such that \begin{align*} P = X\cos(\theta) + Y\sin(\theta). \end{align*}

Now I want to find the distribution of the variable $X$ while given the value of $Y$.

In fact, given the value of $Y$, we have \begin{align*} X = \frac{P}{\cos(\theta)} - y\tan(\theta). \end{align*}

The cumulative distribution function of $X$ is

\begin{align*} \Pr\{X<x\} & = \Pr\Bigl\{\frac{P}{\cos(\theta)} - y\tan(\theta) < x\Bigr\} = \Pr\{P < x\cos(\theta) + y\sin(\theta) \} \\ & = \int^{2\pi}_{0}\int^{x\cos(\theta) + y\sin(\theta)}_{0} \left(2p\right)\left(\frac{1}{2\pi}\right)dPd\theta = \frac{1}{2\pi}\int^{2\pi}_{0} \left(x\cos(\theta) + y\sin(\theta)\right)^{2} d\theta\\ & = \frac{1}{2\pi}\int^{2\pi}_{0} \left(x^{2}\frac{1 + \cos(2\theta)}{2} + xy\sin(2\theta) + y^2\frac{1 - \cos(2\theta)}{2} \right) d\theta \\ & = \frac{1}{2\pi}\left( \pi \left(x^{2} + y^{2}\right) \right) = \frac{x^{2} + y^{2}}{2} \end{align*}

Then the pdf of $X$ can be calculated as

\begin{align*} f_{X}(x) = F'(x) = \left( \frac{x^{2} + y^{2}}{2} \right)'= x. \end{align*}

However, I felt that this result is wrong but could not figure out which is the problem.

Could you please check my derivations and point out what is the problem for me, or give me any hints to solve it? I am very appreciated. Thank you very much.