### Two Events and Conditional Probability

To hear the lecture, click here

Let event A be that the team makes the playoffs. Let event B be that the coach gets rehired for next season. Four possibilities:

A and B (team makes the playoffs, and the coach gets rehired)

A and not B (team makes the playoffs, but the coach does not get rehired)

B and not A (team does not make the playoffs, but the coach does get rehired)

not B and not A (team does not make the playoffs, the coach does not get rehired)

Other examples (name the four possible combinations):

• let A be the event that you go out to dinner and B be the event that you eat chicken for dinner.

• let A be the event that the accused murderer actually committed the crime and B be the event that the accused murderer is convicted

Two events can be represented in a tree diagram, a Venn Diagram, a contingency table, or a truth table.

A tree diagram is most helpful when one combination of events cannot occur, so that there are only three possibilities. For example, suppose that in order to get a driver's license, two events must occur: you must pass a written test; and you must pass an in-car test. However, if you flunk the written test, then you do not get to take the in-car test.

Suppose that there is a 90 percent chance that you pass the written test, and a 60 percent chance that you pass the in-car test. The first two branches of the tree are:

pass the written test (probability = .9)/flunk the written test (probability = .1)

If you pass the written test, then the next two branches of the tree are:

pass the in-car test (probability = .6)/flunk the in-car test (probability = .4)

To get the driver's license, you must pass both tests. Multiplying .9 times .6 gives you a .54 chance of getting your driver's license. There is a .10 chance that you fail because of the written test, and overall there is a .36 chance that you fail because of the in-car test.

### Two Events in a Venn Diagram

Suppose that the probability that the team makes the playoffs is .6, the probability that the coach gets rehired is .8, and the probability that the team makes the playoffs AND the coach gets rehired is .50. Call making the playoffs event A and call getting rehired event B. Draw a Venn diagram with two overlapping circles, A and B. Circle A has .6, circle B has .8, and the intersection of the two circles has .5.

### Two Events in a Contingency Table (or matrix)

Keeping the same example, we can put the events into a contingency table, and then figure out the probabilities of each possible combination of events.

Coach not rehiredCoach rehiredTotal
Team Makes Playoffs?.50.60
Team Does Not Make Playoffs?.??
Total?.801.0

Because of the ways that probabilities must sum, we can fill in the rest of the table. For example, if the probability that the team makes the playoffs is .6, what is the probability that they do not make the playoffs (the second row, third column)? Similarly, if the probability that the coach is rehired is .8, then what is the probability that the coach is not rehired (third row, first column)?

In the top left, we know that we need a value of .10, because the first two boxes have to add up to .60, the total on the right. That means that in the second row on the left we need a value of .1, because the two boxes on the left have to add to the total at the bottom, which we said was .2

Since the middle box on the left is .1 and the box on the right is .4, the box in the middle has to be .3 (note that .3 plus .5 = .8, so that that total at the bottom is correct).

Where do these various probabilities belong on a Venn Diagram?

### Conditional Probability and Truth Tables

If the team makes the playoffs, what is the probability that the coach will be rehired? .50/.60 = .83333

If the coach is rehired, what is the probability that the team made the playoffs? .5/.8 = .625

The if...then formulation is called conditional probability

The conditional probability of A given B (e.g., the probability of the coach being rehired given that they make the playoffs) is written as P(A|B). The definition of P(A|B) is P(A&B)/P(B). That is, P(A|B) = P(A&B)/P(B). If event A is that the coach is rehired and event B is that the team makes the playoffs, then P(A&B) = .5 and P(B) = .6, so P(A|B) = .5/.6 = .83333

Words that suggest conditional probability are "if," "given" and "of." Words that suggest joint probability are "both" and "and."

For example, if event A is "He has strep throat" and event B is "He tests positive for strep throat," then what would you write for the probability that he tests positive given that he has strep throat? P(B|A). What would you write for the probability that he has strep throat and he tests positive for strep throat? P(A&B).

More examples. Let A be the event that the Democrat leads according to the exit polls and B be the event that the Democrat gets the most votes when they are counted. Put in notation the following events: the probability that both events occur; the probability that if the Democrat gets the most votes that the Democrat will lead according to the exit polls. Given that the Democrat leads in the exit poll, the probability that the Democrat wins the election.

### Truth Tables

The most fool-proof way to represent two events and conditional probability is with a truth table. For example, let A be the event that the Democrat leads in the exit poll and let B be the event that the Democrat wins the election. There are four possibilities:

ProbabilityEvent AEvent B
wtruetrue
xtruefalse
yfalsetrue
zfalsefalse

Line w = both true--Democrat leads poll and wins the election

Line x = Democrat leads poll, but does not win election

Conditional probability in the truth table is represented by ratios. The ratio w/(w+y) is P(A|B). The ratio w/(w+x) is P(B|A).

Bayes' Theorem: P(A|B) = w/(w+y) = [w/(w+x)]*[(w+x)/(w+y)] = P(B|A)[P(A)/P(B)]

Suppose that the probability that a Democrat leads in the exit poll is .5, and the probability that the Democrat wins the election is .4. Suppose that the probability that the Democrat wins the election given that the Democrat leads in the exit poll is .7. What is the probability that the Democrat is behind in the election poll and does not win the election?

0.5 = w+x
0.4 = w+y
0.7 = w/(w+x)

What are we trying to find?

w = .7*.5 = .35. So x = .15, y = .05, z = .45

New Problem: suppose that the team has a 60 percent chance of making the playoffs, and if they make the playoffs the coach has a 90 percent chance of being rehired. Suppose that the coach has a 70 percent chance of being rehired overall. If you find out after the season that the coach was rehired, what was the probability that the team made the playoffs?