This is the problem i'm currently tackling from my textbook:
Let $P$ have a uniform distribution on $[0,1]$, and, conditional on $P=p$, let $X$ have a Bernoulli distribution with parameter $p$. Find the conditional distribution of $P$ given $X$.
However, while I would be grateful for the solution to this question as a means to check when I (hopefully) finish the question. I'm more interested in the general approach to questions like these. Something of the sort: Let $X$ have a [distribution], conditional on $X=x$, let $Y$ have a [different distribution]. Find the conditional distribution of $X$ given $Y$.
Maybe i'm being too vague, but is there a general/systematic approach to these sort of questions? Like, I know that we can have it so that:
$f_{X|Y}(x|y)=\frac{f_{X,Y}(x,y)}{f_Y(y)}$
but then what would you do afterwards and how would you get a solution from that? Would you just sub in the appropriate density into $f_Y(y)$, e.g. if $Y$ had an exponential distribution, would $f_Y(y)=λe^{-λy}$? And what would you do with the joint distribution?
I hope what i'm saying makes sense...please let me know if there's anything I should clarify.
We have $$ X\sim f_X$$ and $$ Y|X=x \sim f_{Y|X}(\cdot|x).$$ We want $$ X|Y=y\sim f_{X|Y}(\cdot|y)=?$$
We know $$ f_{X|Y}(\cdot|y)=\frac{f_{X,Y}(\cdot,y)}{f_Y(y)}.$$ It is enough to determine the joint distribution.
Of (1) we have $$ f_{X,Y}(x,\cdot)= f_{Y|X}(\cdot|x)f_X(x).$$ Thus $$ f_{X|Y}(\cdot|y)= \frac{ f_{Y|X}(y|\cdot) }{f_Y(y)} f_X(\cdot). $$