Finding the conditional probability density using a joint PDF

303 Views Asked by At

I have a joint PDF $f_{X,Y}(x,y) = cxe^{-x}$ for $x > 0, |y| < x$

First, to determine $c$ I solved the double integral $$\int_0^\infty \int_{-x}^x cxe^{-x}dydx = 1$$ which gave me $c = 1/4$ (verification needed).

I am then asked to find $f_{X|Y}(x|y)$ and $f_{Y|X}(y|x)$.

Now I know that $$f_{X|Y}(x|y) = \frac{f_{X,Y}(x,y)}{f_Y(y)}$$

Also, $$f_Y(y) = \int_0^\infty \frac{1}{4}xe^{-x} dx = \frac{1}{4} $$

So, $$f_{X|Y}(x|y) = \frac{\frac{1}{4}xe^{-x}}{\frac{1}{4}} = xe^{-x}$$

Similarly, $$f_{Y|X}(y|x) = \frac{f_{X,Y}(x,y)}{f_X(x)}$$

And here $$f_X(x) = \int_{-x}^x \frac{1}{4}xe^{-x} dy = (-\frac{1}{4}e^{-x}(x+1)) - (-\frac{1}{4}e^x(-x+1))$$

I would simply like verification that I am on the right track, as I have no way of checking my answers.

2

There are 2 best solutions below

6
On

$c=1/4$ is correct.

Your calculation of $f_{Y\mid X}$ is also correct, but, the calculation of $f_{X\mid Y}$ is wrong, since your $f_Y$ is wrong.

First of all, note that $f_{X,Y}$ can be written as follows $$ f_{X,Y}(x,y) = cxe^{-x}1_{x>0}1_{\left|y\right|<x}. $$ I believe that this obvious "observation" simplifies the calculation.

We have by definition that \begin{align} f_Y(y) &= \int_{\mathbb{R}}cxe^{-x}1_{x>0}1_{\left|y\right|<x}dx \end{align} but $\left\{x\in\mathbb{R}:\ 1_{x>0}1_{\left|y\right|<x}\right\} = \left\{x\in\mathbb{R}:1_{x>\text{max}(0,\left|y\right|)}\right\}$. Thus, \begin{align} f_Y(y) &= \int_{\text{max}(0,\left|y\right|)}^\infty cxe^{-x}dx\\ &=c\cdot\left(\text{max}(0,\left|y\right|)+1\right)\cdot e^{-\text{max}(0,\left|y\right|)}. \end{align}

Finally, as Sudarsan pointed out, note that your $f_Y$ is not reasonable as it will not integrate to unity.

0
On

You can check if your answers for $f_{X|Y}(x|y)$ and $f_{Y|X}(y|x)$ are correct by verifying that they satisfy the 3 axioms of probability; particularly of interest are $\int_{x\in \Omega_X}f_{X|Y}(x|y)\mathrm{d}x=1$ and the other conditional $\int_{y\in \Omega_Y}f_{Y|X}(y|x)\mathrm{d}y=1$. Also you can verify if the Marginals also satisfy the axioms.