# Conditional Probability: Part 2

The conditional probability of event B given that event A has occurred, P(B/A), was introduced in Chances Are…?.

Here we provide additional examples of conditional probability with a special emphasis on applications of the general multiplication rule P(A and B) = P(A) x P(B/A),

An extension of the general multiplication rule {P(A and B) = P(A) x P(B/A)} is extremely helpful in solving certain conditional probability questions called Bayes problems. Named after their discoverer, Reverend T. Bayes, Bayes problems involve determining the final outcome of a chance experiment or process which consists of two or more stages.

Suppose, for example, your Uncle is worried that he has AIDS and tests positive for it. What is the probability that he actually has the disease? This clearly is a Bayes type problem consisting of two stages; the division of the population into members with or without AIDS, followed by the testing of each of these groups. Suppose it is known that in the “general” population one person in a thousand has AIDS. This allows us to visualize the first stage of the process as follows:

general pop ->aids or ->notaids

If the event “having AIDS in the general population” is designated with the letter B, we know from the information above that P(B) = 0.001.

Therefore, P(notB)

= 1 – P(B)

= 1 – 0.001

= 0.999.

This is the probability of a person in the general population not having AIDS, which we will keep for future reference. If a review of complementary events, such as {B, notB}, is needed here, the reader is directed to Chances Are…?.

Now we consider Bayes’ method in full detail. The method shows how to calculate the conditional probability of event B (such as having AIDS, given evidence related to the event) when you know

1. the probability of B in the absence of evidence (such as the frequency of AIDS in the general population), P(B),

2. the evidence for B (such as an AIDS test result),

3. the reliability of the evidence for B (such as the accuracy of an AIDS test).

The simplest type of Bayes problem involves just two stages where each stage has only two possible outcomes. This is the situation for the Uncle who may or may not have AIDS. The probability that he actually has AIDS, given that he tests positive, may be denoted P(B/TP). By the definition of conditional probability, this is

P(B/TP)

= P(B and TP)/P(TP)

= P(B) x P(TP/B)/P(TP),

where we have applied the general multiplication rule to the numerator P(B and TP).

Before calculating P(B/TP), we need to pause and consider the three quantities referred to above: P(B), the probability of AIDS in the general population; the evidence for B; and the reliability of the evidence for B. From the information provided above, we know that P(B) = 0.001. We also know that your Uncle has tested positive; this is the evidence for B. We now need to know the reliability of the evidence, which is the accuracy of the test. Suppose this accuracy is such that when AIDS is present the test is positive with a probability of 0.97. This is a conditional probability which we may denote as P(TP/B) and visualize as follows…

Thus P(TP/B) lies along one of four end branches of the overall process. There are four such branches because the overall process consists of two stages, with two choices at each stage. Thus by the Fundamental Counting Principle there are 2 x 2 = 4 possible outcomes for the overall process.

We next need to consider a different branch of the two-stage process. In particular, we need to account for the probability that your Uncle tests positive even though he is free of the disease: we may denote this probability as P(notB and TP). At this point it is helpful to visualize P(notB and TP) using another diagram:…

By the general multiplication rule, P(notB and TP) = P(notB) x P(TP/notB). We know from the information above that P(notB) = 0.999.

Therefore,

P(notB and TP)

= P(notB) x P(TP/notB)

= 0.999 x P(TP/notB).

Here we see that in order to compute P(notB and TP), we also need to know P(TP/notB). This is another aspect of the reliability of the evidence, or accuracy of the AIDS test. Suppose this accuracy is such that when AIDS is absent the test is positive with a probability of 0.06. At this point it is helpful to visualize the overall process using a probability tree diagram

aids(.001)->[.97(TP/B) or .03(notTP/B)] or notaids(.999) -> [.06(TP/notB) or .94(notTP/notB)];

[.97(TP/B)->.00097 or .03(notTP/B)-> .00003] or [.06(TP/notB)->.05994 or .94(notTP/notB)->.93906]

The numbers in the diagram tell us that P(TP) is the sum of P(B and TP) and P(notB and TP).

In symbols,

P(TP)

= P(B and TP) + P(notB and TP)

= P(B) x P(TP/B) + P(notB) x P(TP/notB)

= .00097 + .05994

= .06091,

by applying the general multiplication rule to both P(B and TP) and P(notB and TP).

We are now finally in a position to compute P(B/TP), the probability that your Uncle actually has AIDS, given that he tests positive.

It is P(B/TP)

= P(B and TP)/P(TP)

= P(B) x P(TP/B)/P(TP)

= P(B) x P(TP/B)/[P(B and TP) + P(notB and TP)]

= .00097/.06091

= .015925…

~ 1.6 %.

Now let us reflect on this number. First, how does it fit with our expectations? Most of us would expect the positive test result to increase the probability, P(B/TP), that your Uncle has AIDS from the 1/1000 (0.1%) level in the general population. Given a positive test accuracy of 97%, some of us might expect P(B/TP) to be 97%. But it is not so. Bayes’ method tells us that P(B/TP) is well under 2%; a much safer chance than 97%!

As a second point of reflection, we remind the reader that the probability value P(B/TP) ~ 1.6 % relates to one (B and TP) of four possible outcomes of the AIDS-testing process. The other outcomes are; (notB and TP), (B and notTP), and (notB and notTP).

From these outcomes three more conditional probabilities may be computed. They are: P(notB/TP), the probability of not having AIDS given that the test result is positive; P(B/notTP), the probability of having AIDS given that the test result is negative; and P(notB/notTP), the probability of not having AIDS given that the test result is negative. The reader should be able to compute each of these by examining different branches of the same probability tree used in computing P(B/TP).

The first is the easiest to compute, since

P(notB/TP)

= P(notB and TP)/P(TP)

= P(notB) x P(TP/notB)/P(TP),

and we already know P(TP) = .06091.

Continuing with the calculation we have;

P(notB/TP)

= P(notB) x P(TP/notB)/P(TP)

= P(notB) x P(TP/notB)/.06091

= .999 x P(TP/notB)/.06091.

At this point we reexamine the probability tree and find that P(TP/notB) is .06.

Therefore,

P(notB/TP)

= (.999 x .06)/.06091.

= .05994/.06091

= .984…

~ 98.4%. Note the complementarity!

The remaining probabilities require a knowledge of P(notTP) Here again it is appropriate to examine the probability tree…

The numbers in the diagram tell us that P(notTP) is the sum of P(B and notTP) and P(notB and notTP).

The third is:

P(notB/notTP)

= .93906/.93909 ~ 99.99%.

P(B/notTP)

= P(B and notTP)/P(TP)

= P(B) x P(notTP/B)/P(notTP)

= P(B) x P(notTP/B)/[P(B and notTP) + P(notB and notTP)]

= [.001 x .03]/[.001 x .03 + .999 x .94]

= .00003/.93909

= .00003194582…

~ 0.003 %.

In summary,

given an event A, its complement A’, and a compounding event B applied to A and A’, then

P(A/B) = P(A)P(B/A)/[P(A)P(B/A) + P(A’)P(B/A’)].

Extensions, post-secondary e.g.’s

If A and B are mutually exclusive events, then P(B/A) = 0. If A and B are independent events, then P(B/A) = P(B) and the general multiplication rule simplifies to the special rule, P(A and B) = P(A) x P(B).