I have a Bayes' net
A-->C<--B
I want to calculate the Probability of B given C. Since C is the effect of B, I am looking at B as a cause, hence, a diagnostic inference.
using Bayes Theorem
P(B|C) = P(C|B)P(B) / P(C)
I see that C is also affected by A that's way have to take A into consideration.
P(B|C) = ∑A P(C|A,B) P(A) P(B) / (∑A'B' P(C|A',B') P(A') P(B'))
I get the numerator but I don't understand the denominator , should it not be just P(C), which is given and what is P(A') is it P(not A)? I am not sure what this notation is referring to.
$$\begin{align}\mathsf P(B{=}b\mid C{=}c)~&=\dfrac{\mathsf P(B{=}b)~\mathsf P(C{=}c\mid B{=}b)}{\mathsf P(C{=}c)}&&\text{Bayes' Rule} \\[2ex]&=~\dfrac{\mathsf P(B{=}b)~\sum_a\mathsf P(A{=}a,C{=}c\mid B{=}b)}{\sum_a\sum_b\mathsf P(A{=}a,B{=}b,C{=}c)}&&\text{Total Probability} \\[2ex]&=~\dfrac{\mathsf P(B{=}b)~\sum_a\mathsf P(A{=}a\mid B{=}b)~\mathsf P(C{=}c\mid A{=}a,B{=}b)}{\sum_a\sum_b\mathsf P(A{=}a)~\mathsf P(B{=}b\mid A{=}a)~\mathsf P(C{=}c\mid A{=}a,B{=}b)}&& \\[2ex]&=~\dfrac{\mathsf P(B{=}b)~\sum_a\mathsf P(A{=}a)~\mathsf P(C{=}c\mid A{=}a,B{=}b)}{\sum_a\sum_b\mathsf P(A{=}a)~\mathsf P(B{=}b)~\mathsf P(C{=}c\mid A{=}a,B{=}b)}&&A\perp B\text{ from the diagram} \end{align}$$