Skip to ContentGo to accessibility pageKeyboard shortcuts menu
OpenStax Logo
Statistics

3.4 Contingency Tables

Statistics3.4 Contingency Tables

Menu
Table of contents
  1. Preface
  2. 1 Sampling and Data
    1. Introduction
    2. 1.1 Definitions of Statistics, Probability, and Key Terms
    3. 1.2 Data, Sampling, and Variation in Data and Sampling
    4. 1.3 Frequency, Frequency Tables, and Levels of Measurement
    5. 1.4 Experimental Design and Ethics
    6. 1.5 Data Collection Experiment
    7. 1.6 Sampling Experiment
    8. Key Terms
    9. Chapter Review
    10. Practice
    11. Homework
    12. Bringing It Together: Homework
    13. References
    14. Solutions
  3. 2 Descriptive Statistics
    1. Introduction
    2. 2.1 Stem-and-Leaf Graphs (Stemplots), Line Graphs, and Bar Graphs
    3. 2.2 Histograms, Frequency Polygons, and Time Series Graphs
    4. 2.3 Measures of the Location of the Data
    5. 2.4 Box Plots
    6. 2.5 Measures of the Center of the Data
    7. 2.6 Skewness and the Mean, Median, and Mode
    8. 2.7 Measures of the Spread of the Data
    9. 2.8 Descriptive Statistics
    10. Key Terms
    11. Chapter Review
    12. Formula Review
    13. Practice
    14. Homework
    15. Bringing It Together: Homework
    16. References
    17. Solutions
  4. 3 Probability Topics
    1. Introduction
    2. 3.1 Terminology
    3. 3.2 Independent and Mutually Exclusive Events
    4. 3.3 Two Basic Rules of Probability
    5. 3.4 Contingency Tables
    6. 3.5 Tree and Venn Diagrams
    7. 3.6 Probability Topics
    8. Key Terms
    9. Chapter Review
    10. Formula Review
    11. Practice
    12. Bringing It Together: Practice
    13. Homework
    14. Bringing It Together: Homework
    15. References
    16. Solutions
  5. 4 Discrete Random Variables
    1. Introduction
    2. 4.1 Probability Distribution Function (PDF) for a Discrete Random Variable
    3. 4.2 Mean or Expected Value and Standard Deviation
    4. 4.3 Binomial Distribution (Optional)
    5. 4.4 Geometric Distribution (Optional)
    6. 4.5 Hypergeometric Distribution (Optional)
    7. 4.6 Poisson Distribution (Optional)
    8. 4.7 Discrete Distribution (Playing Card Experiment)
    9. 4.8 Discrete Distribution (Lucky Dice Experiment)
    10. Key Terms
    11. Chapter Review
    12. Formula Review
    13. Practice
    14. Homework
    15. References
    16. Solutions
  6. 5 Continuous Random Variables
    1. Introduction
    2. 5.1 Continuous Probability Functions
    3. 5.2 The Uniform Distribution
    4. 5.3 The Exponential Distribution (Optional)
    5. 5.4 Continuous Distribution
    6. Key Terms
    7. Chapter Review
    8. Formula Review
    9. Practice
    10. Homework
    11. References
    12. Solutions
  7. 6 The Normal Distribution
    1. Introduction
    2. 6.1 The Standard Normal Distribution
    3. 6.2 Using the Normal Distribution
    4. 6.3 Normal Distribution—Lap Times
    5. 6.4 Normal Distribution—Pinkie Length
    6. Key Terms
    7. Chapter Review
    8. Formula Review
    9. Practice
    10. Homework
    11. References
    12. Solutions
  8. 7 The Central Limit Theorem
    1. Introduction
    2. 7.1 The Central Limit Theorem for Sample Means (Averages)
    3. 7.2 The Central Limit Theorem for Sums (Optional)
    4. 7.3 Using the Central Limit Theorem
    5. 7.4 Central Limit Theorem (Pocket Change)
    6. 7.5 Central Limit Theorem (Cookie Recipes)
    7. Key Terms
    8. Chapter Review
    9. Formula Review
    10. Practice
    11. Homework
    12. References
    13. Solutions
  9. 8 Confidence Intervals
    1. Introduction
    2. 8.1 A Single Population Mean Using the Normal Distribution
    3. 8.2 A Single Population Mean Using the Student's t-Distribution
    4. 8.3 A Population Proportion
    5. 8.4 Confidence Interval (Home Costs)
    6. 8.5 Confidence Interval (Place of Birth)
    7. 8.6 Confidence Interval (Women's Heights)
    8. Key Terms
    9. Chapter Review
    10. Formula Review
    11. Practice
    12. Homework
    13. References
    14. Solutions
  10. 9 Hypothesis Testing with One Sample
    1. Introduction
    2. 9.1 Null and Alternative Hypotheses
    3. 9.2 Outcomes and the Type I and Type II Errors
    4. 9.3 Distribution Needed for Hypothesis Testing
    5. 9.4 Rare Events, the Sample, and the Decision and Conclusion
    6. 9.5 Additional Information and Full Hypothesis Test Examples
    7. 9.6 Hypothesis Testing of a Single Mean and Single Proportion
    8. Key Terms
    9. Chapter Review
    10. Formula Review
    11. Practice
    12. Homework
    13. References
    14. Solutions
  11. 10 Hypothesis Testing with Two Samples
    1. Introduction
    2. 10.1 Two Population Means with Unknown Standard Deviations
    3. 10.2 Two Population Means with Known Standard Deviations
    4. 10.3 Comparing Two Independent Population Proportions
    5. 10.4 Matched or Paired Samples (Optional)
    6. 10.5 Hypothesis Testing for Two Means and Two Proportions
    7. Key Terms
    8. Chapter Review
    9. Formula Review
    10. Practice
    11. Homework
    12. Bringing It Together: Homework
    13. References
    14. Solutions
  12. 11 The Chi-Square Distribution
    1. Introduction
    2. 11.1 Facts About the Chi-Square Distribution
    3. 11.2 Goodness-of-Fit Test
    4. 11.3 Test of Independence
    5. 11.4 Test for Homogeneity
    6. 11.5 Comparison of the Chi-Square Tests
    7. 11.6 Test of a Single Variance
    8. 11.7 Lab 1: Chi-Square Goodness-of-Fit
    9. 11.8 Lab 2: Chi-Square Test of Independence
    10. Key Terms
    11. Chapter Review
    12. Formula Review
    13. Practice
    14. Homework
    15. Bringing It Together: Homework
    16. References
    17. Solutions
  13. 12 Linear Regression and Correlation
    1. Introduction
    2. 12.1 Linear Equations
    3. 12.2 The Regression Equation
    4. 12.3 Testing the Significance of the Correlation Coefficient (Optional)
    5. 12.4 Prediction (Optional)
    6. 12.5 Outliers
    7. 12.6 Regression (Distance from School) (Optional)
    8. 12.7 Regression (Textbook Cost) (Optional)
    9. 12.8 Regression (Fuel Efficiency) (Optional)
    10. Key Terms
    11. Chapter Review
    12. Formula Review
    13. Practice
    14. Homework
    15. Bringing It Together: Homework
    16. References
    17. Solutions
  14. 13 F Distribution and One-way Anova
    1. Introduction
    2. 13.1 One-Way ANOVA
    3. 13.2 The F Distribution and the F Ratio
    4. 13.3 Facts About the F Distribution
    5. 13.4 Test of Two Variances
    6. 13.5 Lab: One-Way ANOVA
    7. Key Terms
    8. Chapter Review
    9. Formula Review
    10. Practice
    11. Homework
    12. References
    13. Solutions
  15. A | Appendix A Review Exercises (Ch 3–13)
  16. B | Appendix B Practice Tests (1–4) and Final Exams
  17. C | Data Sets
  18. D | Group and Partner Projects
  19. E | Solution Sheets
  20. F | Mathematical Phrases, Symbols, and Formulas
  21. G | Notes for the TI-83, 83+, 84, 84+ Calculators
  22. H | Tables
  23. Index

A two-way table provides a way of portraying data that can facilitate calculating probabilities. When used to calculate probabilities, a two-way table is often called a contingency table. 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. We used two-way tables in Chapters 1 and 2 to calculate marginal and conditional distributions. These tables organize data in a way that supports the calculation of relative frequency and, therefore, experimental (empirical) probability. Later on, we will use contingency tables again, but in another manner.

Example 3.20

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

Speeding Violation in the Last Year No Speeding Violation in the Last Year Total
Uses a cell phone while driving 25 280 305
Does not use a cell phone while driving 45 405 450
Total 70 685 755
Table 3.3

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 = 755 and 70 + 685 = 755.

Using the table, calculate the following probabilities:

Problem

  1. Find P(Person uses a cell phone while driving).
  2. Find P(Person had no violation in the last year).
  3. Find P(Person had no violation in the last year and uses a cell phone while driving).
  4. Find P(Person uses a cell phone while driving or person had no violation in the last year).
  5. Find P(Person uses a cell phone while driving given person had a violation in the last year).
  6. Find P(Person had no violation last year given person does not use a cell phone while driving).

Try It 3.20

Table 3.4 shows the number of athletes who stretch before exercising and how many had injuries within the past year.

Injury in Past Year No Injury in Past Year Total
Stretches 55 295 350
Does not stretch 231 219 450
Total 286 514 800
Table 3.4
  1. What is P(Athlete stretches before exercising)?
  2. What is P(Athlete stretches before exercising|no injury in the last year)?

Example 3.21

Table 3.5 shows a random sample of 100 hikers and the areas of hiking they prefer.

Sex The Coastline Near Lakes and Streams On Mountain Peaks Total
Female 18 16 ___ 45
Male ___ ___ 14 55
Total ___ 41 ___ ___
Table 3.5 Hiking Area Preference

Problem

a. Complete the table.

Problem

b. Are the events being female and preferring the coastline independent events?

Let F = being female and let C = preferring the coastline.

  1. Find P(F AND C).
  2. Find P(F)P(C).

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

Problem

c. Find the probability that a person is male given that the person prefers hiking near lakes and streams. Let M = being male, and let L = prefers hiking near lakes and streams.

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

Problem

d. Find the probability that a person is female or prefers hiking on mountain peaks. Let F = being female, and let P = prefers mountain peaks.

  1. Find P(F).
  2. Find P(P).
  3. Find P(F AND P).
  4. Find P(F OR P).

Try It 3.21

Table 3.7 shows a random sample of 200 cyclists and the routes they prefer. Let M = males and H = hilly path.

Gender Lake Path Hilly Path Wooded Path Total
Female 45 38 27 110
Male 26 52 12 90
Total 71 90 39 200
Table 3.7
  1. Out of the males, what is the probability that the cyclist prefers a hilly path?
  2. Are the events being male and preferring the hilly path independent events?

Example 3.22

Muddy Mouse lives in a cage with three 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 .

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
Table 3.8 Door Choice
  • The first entry 1 15 = ( 1 5 ) ( 1 3 ) 1 15 = ( 1 5 )( 1 3 ) is 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).

Verify the remaining entries.

Problem

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

Problem

b. What is the probability that Alissa does not catch Muddy?

Problem

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

Example 3.23

Table 3.10 contains the number of crimes per 100,000 inhabitants from 2008 to 2011 in the United States.

Year Crime A Crime B Crime C Crime D Total
2008 145.7 732.1 29.7 314.7
2009 133.1 717.7 29.1 259.2
2010 119.3 701 27.7 239.1
2011 113.7 702.2 26.8 229.6
Total
Table 3.10 U.S. Crime Index Rates Per 100,000 Inhabitants 2008–2011

Problem

TOTAL each column and each row. Total data = 4,520.7.

  1. Find P(2009 AND Crime A).
  2. Find P(2010 AND Crime B).
  3. Find P(2010 OR Crime B).
  4. Find P(2011|Crime A).
  5. Find P(Crime D|2008).

Try It 3.23

Table 3.11 relates the weights and heights of a group of individuals participating in an observational study.

Ages Tall Medium Short Totals
Under 18 18 28 14
18–50 20 51 28
51+ 12 25 9
Totals
Table 3.11
  1. Find the total for each row and column.
  2. Find the probability that a randomly chosen individual from this group is tall.
  3. Find the probability that a randomly chosen individual from this group is Under 18 and tall.
  4. Find the probability that a randomly chosen individual from this group is tall given that the individual is Under 18.
  5. Find the probability that a randomly chosen individual from this group is Under 18 given that the individual is tall.
  6. Find the probability a randomly chosen individual from this group is tall and age 51+.
  7. Are the events under 18 and tall independent?
Order a print copy

As an Amazon Associate we earn from qualifying purchases.

Citation/Attribution

Want to cite, share, or modify this book? This book uses the Creative Commons Attribution License and you must attribute Texas Education Agency (TEA). The original material is available at: https://www.texasgateway.org/book/tea-statistics . Changes were made to the original material, including updates to art, structure, and other content updates.

Attribution information
  • If you are redistributing all or part of this book in a print format, then you must include on every physical page the following attribution:
    Access for free at https://openstax.org/books/statistics/pages/1-introduction
  • If you are redistributing all or part of this book in a digital format, then you must include on every digital page view the following attribution:
    Access for free at https://openstax.org/books/statistics/pages/1-introduction
Citation information

© Apr 5, 2023 Texas Education Agency (TEA). The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.