# OpenStax-CNX

You are here: Home » Content » Probability Topics: Contingency Tables

### Recently Viewed

This feature requires Javascript to be enabled.

### Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

# Probability Topics: Contingency Tables

Summary: This module introduces the contingency table as a way of determining conditional probabilities. Note: This module is currently under revision, and its content is subject to change. This module is being prepared as part of a statistics textbook that will be available for the Fall 2008 semester.

Note: You are viewing an old version of this document. The latest version is available here.

A contingency table provides a different way of calculating probabilities. The table helps in determining conditional probabilities quite easily. The table displays sample values in relation to two different variables that may be dependent or contingent on one another. Later on, we will use contingency tables again, but in another manner.

## Example 1

Suppose a study of speeding violations and drivers who use car phones produced the following fictional data:

Table 1: The total number of people in the sample is 755. The row totals are 305 and 450. The column total are 70 and 685. Notice that 305 + 450 = 755 and 70 + 685 = 755.
Speeding violation in the last year No speeding violation in the last year Total
Car phone user 25 280 305
Not a car phone user 45 405 450
Total 70 685 755

Calculate the following probabilities using the table

• a: P(person is a car phone user) = number of car phone users total number in study = 305 755 P(person is a car phone user) = number of car phone users total number in study = 305 755
• b: P(person had no violation in the last year) = number that had no violation total number in study = 685 755 P(person had no violation in the last year) = number that had no violation total number in study = 685 755
• c: P(person had no violation in the last year AND was a car phone user) = 280 755 P(person had no violation in the last year AND was a car phone user) = 280 755
• d: P(person is a car phone user OR person had no violation in the last year) = ( 305 755 + 685 755 )- 280 755 = 710 755 P(person is a car phone user OR person had no violation in the last year) =( 305 755 + 685 755 )- 280 755 = 710 755
• e: P(person is a car phone user GIVEN person had a violation in the last year) = 25 70 P(person is a car phone user GIVEN person had a violation in the last year) = 25 70 (The sample space is reduced to the number of persons who had a violation.)
• f: P(person had no violation last year GIVEN person was not a car phone user) = 405 450 P(person had no violation last year GIVEN person was not a car phone user) = 405 450

(The sample space is reduced to the number of persons who were not car phone users.)

## Example 2

The following table shows a random sample of 100 hikers and the areas of hiking preferred. What should the blanks be?

Table 2: Hiking Area Preference
Sex The Coastline Near Lakes and Streams On Mountain Peaks Total
Female 18 16 ___ 45
Male ___ ___ 14 55
Total ___ 41 ___ ___
• a: Are the events being female and preferring the coastline independent events?
• i: Let FF = being female and let C=C= preferring the coastline.
• ii: P(F and C)=P(F and C)=
• iii: P(F)P(F) P(C)=P(C)=
• iv: Are the two numbers the same? If they are, then FF and CC are independent. If they are not, then FF and CC are not independent.
• b: Find the probability that a person is male given that the person prefers hiking near lakes and streams.
• i: What word tells you this is a conditional?
• ii: Let MM = being male and let LL = prefers hiking near lakes and streams
• iii: Find P(_______|_______)P(_______|_______). Is the sample space for this problem all 100 hikers? If not, what is it?
• c:
• i: Find the probability that a person is female or prefers hiking on mountain peaks.
• ii: Let FF = being female and let PP = prefers mountain peaks.
• iii:
• P(F)=P(F)= _______
• P(P)=P(P)= = _______
• iv: P(F and P)=P(F and P)=
• v: Therefore, P(F or P)=P(F or P)=

## Example 3

Muddy Mouse lives in a cage with 3 doors. If Muddy goes out the first door, the probability that he gets caught by Alissa the cat is 1 5 1 5 and the probability he is not caught is 4 5 4 5 . If he goes out the second door, the probability he gets caught by Alissa is 1 4 1 4 and the probability he is not caught is 3 4 3 4 . The probability that Alissa catches Muddy coming out of the third door is 1 2 1 2 and the probability she does not catch Muddy is 1 2 1 2 . It is equally likely that Muddy will choose any of the three doors so the probability of choosing each door is 1 3 1 3 .

• a: Construct a probability contingency table (shown below). The table entries are probabilities.
• b: The first entry 1 15 = ( 1 4 ) ( 1 3 ) 1 15 =( 1 4 )( 1 3 ) is P(Door One AND Caught)P(Door One AND Caught).
• c: The entry 4 15 = ( 4 5 )( 1 3 ) 4 15 =( 4 5 )( 1 3 ) is P(Door One AND Not Caught)P(Door One AND Not Caught).
• d: Verify the remaining entries.
• e: Calculate the entries for the totals.
• f: Verify that the lower left corner entry is 1
• g: What is the probability that Alissa does not catch Muddy? The answer is 41 60 41 60 .
• h: What is the probability that Muddy chooses Door One OR Door Two given that Muddy is caught by Alissa? The answer is 9 19 9 19 .

### Note:

You could also do this problem by using a probability tree. See Tree Diagrams (Optional) and Examples 3-15 and 3-16.
Table 3: Door Choice
Caught or Not Door One Door Two Door Three Total
Caught 1 15 1 15 1 12 1 12 1 6 1 6 ____
Not Caught 4 15 4 15 3 12 3 12 1 6 1 6 ____
Total ____ ____ ____ 1

## Glossary

Contingency Table:
The method of displaying a frequency distribution in case of dependable (contingent) variables; the table provides the easy way to calculate conditional probabilities.

## Content actions

### Give feedback:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks