I have the following Bayesian Network and need help with answering the following query.

enter image description here


Here are my solutions to questions a and b:


P(A,B,C,D,E) = P(A) * P(B) * P(C | A, B) * P(D | E) * P(E | C)


P(a, ¬b, c ¬d, e) = P(a) * P(¬b) * P(c | a, b) * P(¬d | ¬b) * P(e | c)

= 0.02 * 0.99 * 0.5 * 0.99 * 0.88 = 0.0086


P(e | a, c, ¬b)

This is my attempt:

a ×  ∑ P(a, ¬b, c, D = d, e) =

 a × ∑  { P(a) * P(¬b) * P(c | a, b) * P(d) * P(e | c) + P(a) * P(¬b) * P(c | a,b)    *P(¬d)
     d                                                                  + P(e | c) }

Note that a is the alpha constant and that a = 1/ P(a,¬b, c)

The problem I have is that I don't know how to compute the constant a that the sum is multiplied by. I would appreciate help because I'm preparing for an exam and have no solutions available to this old exam question.

  • $\begingroup$ What alpha constant? I don't see any alpha in the question or in your attempted answer. $\endgroup$
    – D.W.
    Aug 19, 2013 at 0:27
  • $\begingroup$ @D.W. the alpha constant is donoted "a". $\endgroup$
    – mrjasmin
    Aug 20, 2013 at 9:04
  • $\begingroup$ OK, got it. Thanks. So where did you get those equations from? You are trying to calculate $P(e|a,c,\neg b)$, and then some equations just appear from nowhere. I suggest editing the question to show us your reasoning and why you got to those equations. For instance, why did you introduce the constant $a$ into those equations? (what you called alpha) Do you know how to compute the answer to parts (a) and (b)? That would be an excellent warmup; why don't you edit the question to show us how you solved parts (a) and (b)? $\endgroup$
    – D.W.
    Aug 20, 2013 at 12:43
  • $\begingroup$ @D.W. Thanks for the feedback, the question is now edited :) $\endgroup$
    – mrjasmin
    Aug 20, 2013 at 19:51

2 Answers 2


You're on the right path. Here's my suggestion. First, apply the definition of conditional probability:

$$ \Pr[e|a,c,\neg b] = {\Pr[e,a,c,\neg b] \over \Pr[a,c,\neg b]}. $$

So, your job is to compute both $\Pr[e,a,c,\neg b]$ and $\Pr[a,c,\neg b]$. I suggest that you do each of them separately.

To compute $\Pr[a,\neg b,c,e]$, it is helpful to notice that

$$ \Pr[a,\neg b,c,e] = \Pr[a,\neg b,c,d,e] + \Pr[a,\neg b,c,\neg d,e]. $$

So, if you can compute terms on the right-hand side, then just add them up and you've got $\Pr[a,\neg b,c,e]$. You've already computed $\Pr[a,\neg b,c,\neg d,e]$ in part (b). So, just use the same method to compute $\Pr[a,\neg b,c,d,e]$, and you're golden.

Another way to express the last relation above is to write

$$ \Pr[a,\neg b,c,e] = \sum_d \Pr[a,\neg b,c,D=d,e]. $$

If you think about it, that's exactly the same equation as what I wrote, just using $\sum$ instead of $+$. You can think about whichever one is easier for you to think about.

Anyway, now you've got $\Pr[e,a,c,\neg b]$. All that remains is to compute $\Pr[a,c,\neg b]$. You can do that using exactly the same methods. I'll let you fill in the details: it is a good exercise. Finally, plug into the first equation at the top of my answer, and you're done.

  • $\begingroup$ Thank you so much, I really appreciate your effort. Can you take a look at my answer below to see if it's correct ? Thanks once again. $\endgroup$
    – mrjasmin
    Aug 20, 2013 at 20:51

$$ \Pr[e|a,c,\neg b] = {\Pr[e,a,c,\neg b] \over \Pr[a,c,\neg b]} $$

$$ \Pr[e,a,c,\neg b] = \sum_{d} Pr[a,\neg b,c, D = d, e] = Pr[a, \neg b, c, d, e] + Pr[a, \neg b, c, \neg d, e] = $$

$$ = P(a) * P(\neg b) * P(c | a,\neg b) * P(d | \neg b) * P(e|c) + $$

$$ P(a) * P(\neg b) * P(c | a,\neg b) * P(\neg d | \neg b) * P(e|c) = $$

$$ ..... = 0.0148 $$

$$ \Pr[a, \neg b, c] = P[a, \neg b, c, D, E] = \sum_{d} \sum_{e} P[a, \neg b, c, D= d, E = e] = $$

$$ P[a, \neg b, c, d, e] + P[a, \neg b, c, d, \neg e] + P[a, \neg b, c, \neg d, e] + P[a, \neg b, c, \neg d, \neg e] = $$

$$ = / ........ / = C $$

Now we have that:

$$ \Pr[e|a,c,\neg b] = {\Pr[e,a,c,\neg b] \over \Pr[a,c,\neg b]} = 0.0148 / C $$

  • $\begingroup$ You'd better keep going, to compute $C$ and make sure you get to a final answer. Your final answer should be a number (not an expression involving variables like $C$). $\endgroup$
    – D.W.
    Aug 20, 2013 at 22:11
  • $\begingroup$ But: Yes, it looks like you've got the right approach now. You've got the idea down. Well done! $\endgroup$
    – D.W.
    Aug 20, 2013 at 22:12
  • $\begingroup$ The only reason that i didn't computed the final expression was of laziness, that's why I introduced the constant C. Thanks again ! $\endgroup$
    – mrjasmin
    Aug 21, 2013 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.