Proving a conditional probability relevant to Bayesian Inference

60 Views Asked by At

Is it possible to prove the following?

$p(A|B,D)=\int{p(A|B,C})p(C|D)dC$

I have made a following attempt to expand the RHS for an intuitive feel. While it appears intuitively like some sort of marginalisation hence the LHS equates to RHS, I am unable to mathematically simplify the RHS to equate to LHS.

$p(A|B,D)=p(A|B,C=0)p(C=0|D) + ... + p(A|B,C=j)p(C=j|D) $ for $C=0,...,j$

The motivation for my question is the equation in the following link regarding the first equation under the section Bayesian Inference.

Thank you in advance!

1

There are 1 best solutions below

3
On BEST ANSWER

Technically it should be $\displaystyle p(A|B,D)=\int p(A|B,C,D)P(C|D)dC$ because you are still given $D$.

I read a little bit about the article and it talks about estimating $y^*$ based on a new observed $x^*$ and observed data $D$. The true parameter $\theta$ is not known, and based on the data $D$, there is a certain probability of every single $\theta$, i.e. $\theta$ has a "posterior distribution" depending on the observed $D$. The formula is obtained by marginalizing the distribution of $y^*$ given $\theta$ over the posterior distribution of $\theta$ given $D$.

So: $\underbrace{p(y^*|x^*,D)}_{\text{density of $y^*$ given a new data point $x^*$}}=\displaystyle \int \underbrace{p(y^*|x^*,D,\theta)}_{\text{density of $y^*$ given $\theta$}}\underbrace{p(\theta|D)}_{\text{density of $\theta$ given observed Data}}\underbrace{d\theta}_{\text{over all possible $\theta$}}$.


Note that you can always marginalize out a random variable by summing/integrating all its possible values.

If C is discrete:

$P(A|B,D)=\displaystyle \sum_C P(A|B,C,D)P(C|D)$

If C is continuous:

$f(A|B,D)=\displaystyle \int_C f(A|B,C,D)f(C|D)dC$

This is called the law of total probability for random variables.

$\displaystyle f_X(x)=\sum_yf_{X|Y}(x|y)f_Y(y)$

$\displaystyle f_X(x)=\int_yf_{X|Y}(x|y)f_Y(y)dy$