Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently taking a free on-line AI class offered by Stanford ( It is the first time I am exposed to Bayes Network/Probability. I am having a little problem with the following Quiz problem:

  / \
 /   \
T1   T2

Given C is known and T1 and T2 are conditional independence

P(C) = 0.01
P(+ | C) = 0.9
P(- | not C) = 0.8
P(C | T1=+) = 0.043

P(T2=+ | T1=+) = ?

The solution to the problem is given below:

P(T2=+ | T1=+) = P(T2=+ | T1=+, C) * P(C | T1=+) + P(T2=+ | T1=+, not C) * P(not C | T1=+)

My question to the solution above is:

1) Why do we use total probability approach to solve the problem?

2) During the expansion, why do we add "C" and "| T1=+" to the whole equation?

The quiz question can be found here:

The answer to the quiz is here:

I would really appreciate it if someone can help me to understand the solution.


share|cite|improve this question
up vote 0 down vote accepted

Imagine you have a big population to start with (100000). Some have cancer (1000) and rest don't (99000). For both tests, those with cancer will test + with probability .9 (900 true positives) and those without with probability .2 (19 800 false positives). The total population of positives is 19800+900=20700

As the video explains, you know T1 and T2 are conditionally independent. This means that given C (that is, on a subpopulation with cancer), the probability of T2=+ is not changed by whether you get + or - on T1. That is, of the 900 true positives for T1 0.9*900=810 will be positive for T2 (out of 20700). This is the P(T2=+ | T1=+, C) * P(C | T1=+) term.

This is the key point. Conditional independence tells you how to get the number of T2=+ people out of people with C and T1=+ (and, similarly, out of people with notC and T1=+, see next paragraph). Without restricting to the subpopulation with C, you can not immediately say how many of the T1=+ people will also have T2=+, as T1 and T2 are not independent, but only conditionally independent (conditional on C).

Similarly, given not C, the probability of T2=+ is not changed by whether you get + or - on T1. So the number of false positives for both T2 and T1 is .2*19 800=3 960 (out of 20700). This is the second term.

The total is (3 960 + 810) / 20 700 = 0.23043

share|cite|improve this answer
That makes a lot of sense now. Thanks for the great explanation! – Shih-gian Lee Oct 24 '11 at 20:14
In addition to the great post by Max, here is the response from my AI class professor -… – Shih-gian Lee Oct 24 '11 at 23:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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