A two-way table, commonly called a matrix, organizes data which can be characterized two different ways. Data organized in a two-way table sometimes reveals overlooked relationships between the variables.
Consider the tables used in Example 18.6 from the previous Topic.
Passengers |
Fewer than 5 | 5 to 9 | 10 to 15 | More than 15 |
Crashes |
1815 | 77 | 55 | 10 |
and
Passengers |
Fewer than 5 | 5 to 9 | 10 to 15 | More than 15 |
Rollovers |
224 | 16 | 16 | 7 |
Now, we can coalesce both of these into one two-way table.
Passengers |
Fewer than 5 | 5 to 9 | 10 to 15 | More than 15 |
Rollover |
224 | 16 | 16 | 7 |
No Rollover |
1591 | 61 | 39 | 3 |
Total |
1815 | 77 | 55 | 10 |
The table in this example could be used to calculate conditional probabilities. A conditional probability consists of finding the probability of an event A given that an event B has occurred. It is important to know whether it's the proportion of A's that occur among the B's, or vice-versa.
For example, using the table above, in crashes involving vehicles with 15 or
more passengers, what is the probability of rollover?
Answer: 7 / 10 = 0.7
Similarly, for all rollover crashes, what is the probability they involve a
vehicle which can carry 15 or more passengers?
Answer: 7 / 263 = 0.027
For specific events A and B,
then "A or B" is the event that A occurs,
or B occurs, or both A and
B occur. This leads to the identity:
P( A or B ) = P(A) + P(B) - P(A and B).
This is more general that the formula in Topic 18, since P(A and B) will take care of events A and B not being disjoint.
Now, let's consider picking a card at random from a standard deck of cards. The probability that it is an ace is 4/52, since there are 4 aces in a deck. If we replace this card, shuffle, and choose another card at random, what is the probability of choosing an ace? Still 4/52. We say that these two events are independent.
In general, A and B are independent when P( A given B ) = P(A).