Find the posterior probability density function

243 Views Asked by At

I have an observation $z={x\over y}$. I have the probability density functions $$pdf(y)=\lambda_1e^{-\lambda_1y}, y\geq0$$ $$pdf(x)=\lambda_2e^{-\lambda_2x}, x\geq0$$ I found that the probability density function of $z$ is $$pdf(z)={\lambda_1\lambda_2\over{(\lambda_2z+\lambda_1)^2}}$$ or I can express this as $$pdf(z={x\over y})={\lambda_1\lambda_2\over{(\lambda_2{x\over y}+\lambda_1)^2}}$$. The posterior probability density function is $$pdf(x|z)={pdf(z|x)pdf(x)\over pdf(z)}$$. How do I compute the conditional probability density function $$pdf(z|x)=?$$

Is it $$pdf(z|x)={pdf(z)\over pdf(x)}$$

1

There are 1 best solutions below

12
On BEST ANSWER

Let $U=X$ and $Z=X/Y.$ We can compute the joint distribution of $U$ and $Z$ (which is the joint distribution of $X$ and $Z$ of course... we just renamed $X$ $U$ to avoid confusion) in the usual way with a change of variables: $$ X=U\;\;\;\;\;Y=U/Z\\ J = \pmatrix{1& 1/Z\\0& -U/Z^2}\\f_{U,Z}(u,z) = |J|f_{X,Y}(u,u/z) = \frac{u}{z^2} \lambda_2\lambda_1 e^{-\lambda_2u}e^{-\lambda_1u/z}$$ and we'll just call $u$ $x$ from now on.

As you correctly computed, $$ f_Z(z) = \frac{\lambda_1\lambda_2}{(\lambda_1+\lambda_2 z)^2},$$ so we have by definition of conditional density, $$ f_{X\mid Z} (x\mid z)= \frac{f_{X,Z}(x,z)}{f_Z(z)}=\frac{\frac{x}{z^2} \lambda_2\lambda_1 e^{-\lambda_2x}e^{-\lambda_1x/z}}{\frac{\lambda_1\lambda_2}{(\lambda_1+\lambda_2 z)^2}}= x(\lambda_2+\lambda_1/z)^2e^{-(\lambda_2+\lambda_1/z)x},$$ a Gamma distribution.

To find the $x$ that maximizes this, observe it is proportional to $xe^{-ax}$ where $a=(\lambda_2+\lambda_1/z).$ The derivative is $e^{-ax}-axe^{-ax},$ which is zero at $x=1/a,$ so the mode of the conditional distribution for $x$ given $z$ is $ \frac{1}{(\lambda_2+\lambda_1/z)}.$