# OpenStax-CNX

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

### Lenses

What is a lens?

#### 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.

#### Endorsed by (What does "Endorsed by" mean?)

This content has been endorsed by the organizations listed. Click each link for a list of all content endorsed by the organization.
• College Open Textbooks

This module is included inLens: Community College Open Textbook Collaborative
By: CC Open Textbook CollaborativeAs a part of collection: "Collaborative Statistics"

"Reviewer's Comments: 'I recommend this book. Overall, the chapters are very readable and the material presented is consistent and appropriate for the course. A wide range of exercises introduces […]"

Click the "College Open Textbooks" link to see all content they endorse.

Click the tag icon to display tags associated with this content.

• JVLA Endorsed

This module is included inLens: Jesuit Virtual Learning Academy Endorsed Material
By: Jesuit Virtual Learning AcademyAs a part of collection: "Collaborative Statistics"

"This is a robust collection (textbook) approved by the College Board as a resource for the teaching of AP Statistics. "

Click the "JVLA Endorsed" link to see all content they endorse.

• WebAssign

This module is included inLens: WebAssign The Independent Online Homework and Assessment Solution
By: WebAssignAs a part of collection: "Collaborative Statistics"

"Online homework and assessment available from WebAssign."

Click the "WebAssign" link to see all content they endorse.

Click the tag icon to display tags associated with this content.

#### Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
• OrangeGrove

This module is included inLens: Florida Orange Grove Textbooks
By: Florida Orange GroveAs a part of collection: "Collaborative Statistics"

Click the "OrangeGrove" link to see all content affiliated with them.

Click the tag icon to display tags associated with this content.

• Bookshare

This module is included inLens: Bookshare's Lens
By: Bookshare - A Benetech InitiativeAs a part of collection: "Collaborative Statistics"

"DAISY and BRF versions of this collection are available."

Click the "Bookshare" link to see all content affiliated with them.

• Featured Content

This module is included inLens: Connexions Featured Content
By: ConnexionsAs a part of collection: "Collaborative Statistics"

"Collaborative Statistics was written by two faculty members at De Anza College in Cupertino, California. This book is intended for introductory statistics courses being taken by students at two- […]"

Click the "Featured Content" link to see all content affiliated with them.

Click the tag icon to display tags associated with this content.

#### Also in these lenses

• statistics

This module is included inLens: Statistics
By: Brylie OxleyAs a part of collection: "Collaborative Statistics"

Click the "statistics" link to see all content selected in this lens.

Click the tag icon to display tags associated with this content.

• Lucy Van Pelt

This module is included inLens: Lucy's Lens
By: Tahiya MaromeAs a part of collection: "Collaborative Statistics"

"Part of the Books featured on Community College Open Textbook Project"

Click the "Lucy Van Pelt" link to see all content selected in this lens.

Click the tag icon to display tags associated with this content.

• Educational Technology Lens

This module is included inLens: Educational Technology
By: Steve WilhiteAs a part of collection: "Collaborative Statistics"

Click the "Educational Technology Lens" link to see all content selected in this lens.

Click the tag icon to display tags associated with this content.

• Statistics

This module is included inLens: Mathieu Plourde's Lens
By: Mathieu PlourdeAs a part of collection: "Collaborative Statistics"

Click the "Statistics" link to see all content selected in this lens.

• statf12

This module is included inLens: Statistics Fall 2012
By: Alex KolesnikAs a part of collection: "Collaborative Statistics"

Click the "statf12" link to see all content selected in this lens.

• UTEP

This module is included inLens: Amy Wagler's Lens
By: Amy WaglerAs a part of collection: "Collaborative Statistics"

Click the "UTEP" link to see all content selected in this lens.

Click the tag icon to display tags associated with this content.

• Make Textbooks Affordable

This module is included inLens: Make Textbooks Affordable
By: Nicole AllenAs a part of collection: "Collaborative Statistics"

Click the "Make Textbooks Affordable" link to see all content selected in this lens.

• BUS204 Homework

This module is included inLens: Saylor BUS 204 Homework
By: David BourgeoisAs a part of collection: "Collaborative Statistics"

"Homework for Discrete Variables/Probability. "

Click the "BUS204 Homework" link to see all content selected in this lens.

Click the tag icon to display tags associated with this content.

• crowe

This module is included in aLens by: Chris RoweAs a part of collection: "Collaborative Statistics"

Click the "crowe" link to see all content selected in this lens.

• Bio 502 at CSUDH

This module is included inLens: Bio 502
By: Terrence McGlynnAs a part of collection: "Collaborative Statistics"

"This is the course textbook for Biology 502 at CSU Dominguez Hills"

Click the "Bio 502 at CSUDH" link to see all content selected in this lens.

Click the tag icon to display tags associated with this content.

### 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.

A contingency table provides a way of portraying data that can facilitate 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. Contingincy tables provide a way of portraying data that can facilitate calculating probabilities.

## Example 1

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

Table 1
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

The total number of people in the sample is 755. The row totals are 305 and 450. The column totals are 70 and 685. Notice that 305 + 450 = 755305 + 450 = 755 and 70 + 685 = 75570 + 685 = 755.

Calculate the following probabilities using the table

### Problem 1

P(person is a car phone user) = P(person is a car phone user) =

#### Solution

number of car phone users total number in study = 305 755 number of car phone users total number in study = 305 755

### Problem 2

P(person had no violation in the last year) = P(person had no violation in the last year) =

#### Solution

number that had no violation total number in study = 685 755 number that had no violation total number in study = 685 755

### Problem 3

P(person had no violation in the last year AND was a car phone user) =P(person had no violation in the last year AND was a car phone user) =

280 755 280 755

### Problem 4

P(person is a car phone user OR person had no violation in the last year) =P(person is a car phone user OR person had no violation in the last year) =

#### Solution

( 305 755 + 685 755 ) - 280 755 = 710 755 ( 305 755 + 685 755 ) - 280 755 = 710 755

### Problem 5

P(person is a car phone user GIVEN person had a violation in the last year) = P(person is a car phone user GIVEN person had a violation in the last year) =

#### Solution

25 70 25 70 (The sample space is reduced to the number of persons who had a violation.)

### Problem 6

P(person had no violation last year GIVEN person was not a car phone user) = P(person had no violation last year GIVEN person was not a car phone user) =

#### Solution

405 450 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:

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 ___ ___

### Problem 1

Complete the table.

#### Solution

Table 3: Hiking Area Preference
Sex The Coastline Near Lakes and Streams On Mountain Peaks Total
Female 18 16 11 45
Male 16 25 14 55
Total 34 41 25 100

### Problem 2

Are the events "being female" and "preferring the coastline" independent events?

Let FF = being female and let CC = preferring the coastline.

• a. P(F AND C)P(F AND C) =
• b. P(F)P(C)P(F)P(C) =

Are these two numbers the same? If they are, then FF and CC are independent. If they are not, then FF and CC are not independent.

#### Solution

• a. P(F AND C) = 18 100 = 0.18 P(F AND C) = 18 100 = 0.18
• b. P(F)P(C) = 45 100 34 100 = 0.45 0.34 = 0.153 P(F)P(C) = 45 100 34 100 = 0.450.34 = 0.153

P(F AND C) P(F)P(C)P(F AND C)P(F)P(C), so the events FF and CC are not independent.

### Problem 3

Find the probability that a person is male given that the person prefers hiking near lakes and streams. Let MM = being male and let LL = prefers hiking near lakes and streams.

• a. What word tells you this is a conditional?
• b. Fill in the blanks and calculate the probability: P(___|___) = ___P(___|___) = ___.
• c. Is the sample space for this problem all 100 hikers? If not, what is it?

#### Solution

• a. The word 'given' tells you that this is a conditional.
• b. P(M|L) = 2541P(M|L) = 2541
• c. No, the sample space for this problem is 41.

### Problem 4

Find the probability that a person is female or prefers hiking on mountain peaks. Let FF = being female and let PP = prefers mountain peaks.

• a. P(F) = P(F) =
• b. P(P) = P(P) =
• c. P(F AND P) = P(F AND P) =
• d. Therefore, P(F OR P) = P(F OR P) =

#### Solution

• a. P(F) = 45100P(F) = 45100
• b. P(P) = 25100P(P) = 25100
• c. P(F AND P) = 11100P(F AND P) = 11100
• d. P(F OR P) = 45100 + 25100 - 11100 = 59100P(F OR P) = 45100 + 25100 - 11100 = 59100

## 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 .

Table 4: 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
• The first entry 1 15 = ( 1 5 ) ( 1 3 ) 1 15 =( 1 5 )( 1 3 ) is P(Door One AND Caught)P(Door One AND Caught).
• 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).

Verify the remaining entries.

### Problem 1

Complete the probability contingency table. Calculate the entries for the totals. Verify that the lower-right corner entry is 1.

#### Solution

Table 5: 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 19601960
Not Caught 4 15 4 15 3 12 3 12 1 6 1 6 41604160
Total 515515 412412 2626 1

### Problem 2

What is the probability that Alissa does not catch Muddy?

41604160

### Problem 3

What is the probability that Muddy chooses Door One OR Door Two given that Muddy is caught by Alissa?

919919

### Note:

You could also do this problem by using a probability tree. See the Tree Diagrams (Optional) section of this chapter for examples.

## Glossary

Contingency Table:
The method of displaying a frequency distribution as a table with rows and columns to show how two variables may be dependent (contingent) upon each other. The table provides an 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