Finding PDFs of conditional probability

44 Views Asked by At

$Y$ is a probability variable with only $0$ and $1$ as outcomes.

$$ P(Y = 0) = P(Y = 1) = \dfrac{1}{2} $$

$f_{X|Y}(x|y)$ means the conditional probability function based on $Y$.

$$ Y = 0, X \sim N(\mu, 1) \\ Y = 1, X \sim N(0,1) $$

Now, I would like to find $f_{X|Y}(x|y)$ and $f_X(x)$ in this condition. What comes to my mind at first is $f_{X|Y}(x|y) = \dfrac{f_{X,Y}(x,y)}{f_Y(y)}$. Yet, I have no idea where should be my next step to find the PDFs, this is a combination of discrete and continuous random variables, where should I start to find them?

1

There are 1 best solutions below

1
On BEST ANSWER

You are already given the conditional pdf $f(x|y)$.

i.e. $f(x|y)=\frac{1}{\sqrt{2\pi}}\exp(-\frac{(x-\mu)^{2}}{2})$ when $y=0$ and

and $f(x|y)=\frac{1}{\sqrt{2\pi}}\exp(-\frac{x^{2}}{2})\,$ when $y=1$

So just use law of total probability. \begin{align}f(x)&=\sum_{y}f(x|y)P(Y=y)\\\\ &=f(x|0)P(Y=0)+f(x|1)P(Y=1)\\\\ &=\frac{1}{2}\bigg(\frac{1}{\sqrt{2\pi}}\exp(-\frac{(x-\mu)^{2}}{2})+\frac{1}{\sqrt{2\pi}}\exp(-\frac{x^{2}}{2})\bigg)\end{align}