probability

May 2006

Probabilities and Tables

I was titillated and tickled pink when I came across the following problem in the exercises section of a textbook. It's one of those things that nerds just can't resist making a stab at. You may want to give it a try before checking out my solution below.

Professor French forgets to set his alarm with a probability of 0.3. If he sets the alarm it rings with a probability of 0.8. If the alarm rings, it will wake him on time to make his first class with a probability of 0.9. If the alarm does not ring, he wakes in time for his first class with a probability of 0.2. What is the probability that Professor French wakes in time to make his first class tomorrow? (Johnson & Kuby. p. 230)

After perusing the problem a while and tackling it head-on using the multiplication rule (see the first table below) I found that approach a bit cumbersome and confusing. So I organized everything into tables. That made solving this problem a breeze, and fun too.

Before diving in you may want to review the basics of probability.

Let's introduce the type of table we're going to be using and what the various cells will contain. The table we'll be using can accomodate two pairs of events, with each pair being an event and its complement. The rows and columns for the totals (green font) is a direct application of Rule A1, while the grand total of 1 (i.e., probability = 1) follows from the complement rule. The eight conditional probabilities are derived using the multiplication rule.

  Event   Conditional Probabilities
A A' total
Event B P(A ∩ B) P(A' ∩ B) P(B) P(A|B) = P(A ∩ B)/P(B) P(A'|B) = P(A' ∩ B)/P(B)
B' P(A ∩ B') P(A' ∩ B') P(B') P(A|B') = P(A ∩ B')/P(B') P(A'|B') = P(A' ∩ B')/P(B')
  total P(A) P(A') 1
Conditional Probabilities P(B|A) = P(A ∩ B)/P(A) P(B|A') = P(A' ∩ B)/P(A')
P(B'|A) = P(A ∩ B')/P(A) P(B'|A') = P(A' ∩ B')/P(A')

Let's now tackle the problem. First, let's summarize the givens.

P(alarm was not set) = 0.3
P(the alarm rings | he set the alarm) = 0.8
P(he wakes up | alarm rings) = 0.9
P(he wakes up) | alarm does not ring) = 0.2

We are looking for: P(he wakes up)

Letting
S = alarm was set
S' = alarm was not set
R = alarm rings
R' = alarm does not ring
W = he wakes up
W' = he does not wake up

we have

P(S') = 0.3
P(R|S) = 0.8
P(W|R) = 0.9
P(W|R') = 0.2
We need to find P(W)

From the complement rule P(S) + P(S') = 1, therefore P(S) = 1 - 0.3 = 0.7

Let's first tabulate the probabilities for events S and R. Using the following table

  Alarm  
S S' total
Alarm R P(S ∩ R) P(S' ∩ R) P(R)
R' P(S ∩ R') P(S' ∩ R') P(R')
  total P(S) P(S') 1

and plugging in the appropriate givens we have:

  Alarm  
S S' total
Alarm R P(S ∩ R) P(S' ∩ R) P(R)
R' P(S ∩ R') P(S' ∩ R') P(R')
  total 0.7 0.3 1

Since if the alarm is not set it definitely will not ring then P(R|S') = 0. Using the multiplication rule, P(R ∩ S') is therefore = 0. Given that and applying Rule A1, P(S' ∩ R') = 0.3.

Given P(S) and P(R|S) and using the multiplication rule, P(R ∩ S) = 0.56

Plugging in those values we have:

  Alarm  
S S' total
Alarm R 0.56 0 P(R)
R' P(S ∩ R') 0.3 P(R')
  total 0.7 0.3 1

We can now obtain the values for all the other cells:

P(R) = P(S ∩ R) + P(S' ∩ R) = 0.56.

P(R') = 1 - P(R) = 0.44

P(S ∩ R') = P(S) - P(S ∩ R) = P(R') - P(S' ∩ R') = 0.14.

The completed table is as follows.

  Alarm  
S S' total
Alarm R 0.56 0 0.56
R' 0.14 0.3 0.44
  total 0.7 0.3 1

Now let's move on to a new table having the events alarm ringing/not ringing and the professor waking/not waking.

  Waking  
W W'
Alarm R P(W ∩ R) P(W' ∩ R) P(R)
R' P(W ∩ R') P(W' ∩ R') P(R')
  total P(W) P(W') 1

From the previous table we already have the values for P(R) and P(R') so we can plug those in directly. Given P(W|R) = 0.9 and using the multiplication rule, P(W ∩ R) = P(R)·P(W|R) = (0.56)(0.9) = 0.504. Given P(W|R') = 0.2 and using the multiplication rule, P(W ∩ R') = P(R')·P(W|R') = (0.44)(0.2) = 0.088. With those values our table now becomes:

  Waking  
W W'
Alarm R 0.504 P(W' ∩ R) 0.56
R' 0.088 P(W' ∩ R') 0.44
  total P(W) P(W') 1

There is now enough data to derive the values for the rest of the cells. But if we don't want to know all that information we can just solve for what the problem is asking for: P(W). And that is, from Rule A1, simply P(W ∩ R) + P(W ∩ R') = 0.592. Hence, on the average the professor will wake up 59.2% of the time to make it to his class.

The completed table is as follows:

  Waking  
W W'
Alarm R 0.504 0.056 0.56
R' 0.088 0.352 0.44
  total 0.592 0.408 1

As you may have noticed, we didn't have to find the values for all the cells in the alarm set-ring table either. All we needed was P(R) so we could plug that into the ringing-waking table.

Here's a solution that doesn't use tables. It's actually shorter, but you have to be rather slick with the various rules of probability (not that you can use tables unthinkingly).

From the multiplication rule P(S ∩ R) = P(S)·P(R|S) = (0.7)(0.8) = 0.56

The same rule tells us that P(S ∩ R) = P(R)·P(S|R)

Since the alarm can only go off if it had been set, the probability that the alarm was set given that it rang P(S|R) must be 1. Therefore, P(R) = P(S ∩ R) = 0.56

Again from the multiplication rule P(R ∩ W) = P(R)·P(W|R) = (0.56)(0.9) = 0.504

Since we're given P(W|R') the multiplication tells us that P(R' ∩ W) = P(R')·P(W|R') = (1 - 0.56)(0.2) = 0.088

Rule A1 tells us that P(R ∩ W) + P(R' ∩ W) = P(W). Therefore P(W) = 0.504 + 0.088 = 0.592 or 59.2%

References