Equation for Bayesian update with two parameters

34 Views Asked by At

I am trying to understand a certain model, but I have no real training in probability. I was wondering whether this is correct...

$$ P\left( A \mid B, C \right) = \frac{ P\left( B \mid A, C \right) P\left(A \right) } { \sum_{i=1}^{ n } P \left( B \mid A_i, C \right) P \left( A_i \right) } $$

...or whether it should rather be:

$$ P\left( A \mid B, C \right) = \frac{ P\left( B \mid A, C \right) P\left(A \mid C \right) } { \sum_{i=1}^{ n } P \left( B \mid A_i, C \right) P \left( A_i\mid C \right) } $$

...or whether both are just wrong (Clearly it is assumed here that we know $P \left( B \mid A, C \right) $ for all $A$s). I am not sure how to approach finding out whether one is right and if so which one.

1

There are 1 best solutions below

2
On BEST ANSWER

The second equation is correct, since conditioning on the events $A_i$ and $C$ gives:

\begin{equation} P(A \mid B,C) = \frac{P(B \mid A,C) P(A,C)}{\sum_{i=1}^n P(B \mid A_i,C) P(A_i,C)} \end{equation}

Now, using that $P(A,C) = P(A \mid C)P(C)$, and canceling the $P(C)$ in numerator and denominator, we arrive at the second equation.