Skip to main content
Statistics LibreTexts

4.6: Joint and Marginal Probabilities and Contingency Tables

  • Page ID
    26050
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    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.

    Example \(\PageIndex{1}\)

    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
    Cell phone user 25 280 305
    Not a cell 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 = 755 and 70 + 685 = 755.

    Calculate the following probabilities using the table.

    1. Find \(P(\text{Person is a cell phone user})\).
    2. Find \(P(\text{person had no violation in the last year})\).
    3. Find \(P(\text{Person had no violation in the last year AND was a cell phone user})\).
    4. Find \(P(\text{Person is a cell phone user OR person had no violation in the last year})\).
    5. Find \(P(\text{Person is a cell phone user GIVEN person had a violation in the last year})\).
    6. Find \(P(\text{Person had no violation last year GIVEN person was not a cell phone user})\)

    Answer

    1. \(\dfrac{\text{number of cell phone users}}{\text{total number in study}}\) = \(\dfrac{305}{755}\)
    2. \(\dfrac{\text{number that had no violation}}{\text{total number in study}} = \dfrac{685}{755}\)
    3. \(\dfrac{280}{755}\)
    4. \(\left(\dfrac{305}{755} + \dfrac{685}{755}\right) - \dfrac{280}{755} = \dfrac{710}{755}\)
    5. \(\dfrac{25}{70}\) (The sample space is reduced to the number of persons who had a violation.)
    6. \(\dfrac{405}{450}\) (The sample space is reduced to the number of persons who were not cell phone users.)

    Example \(\PageIndex{2}\)

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

    Hiking Area Preference
    Sex The Coastline Near Lakes and Streams On Mountain Peaks Total
    Female 18 16 ___ 45
    Male ___ ___ 14 55
    Total ___ 41 ___ ___
    1. Complete the table.
    2. 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)
      3. 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.
    3. Find the probability that a person is male given that the person prefers hiking near lakes and streams. Let \(\text{M} =\) being male, and let \(\text{L} =\) prefers hiking near lakes and streams.
      1. What word tells you this is a conditional?
      2. Fill in the blanks and calculate the probability: \(P\)(___|___) = ___.
      3. Is the sample space for this problem all 100 hikers? If not, what is it?
    4. Find the probability that a person is female or prefers hiking on mountain peaks. Let \(\text{F} =\) being female, and let \(\text{P} =\) prefers mountain peaks.
      1. Find \(P(\text{F})\).
      2. Find \(P(\text{P})\).
      3. Find \(P(\text{F AND P})\).
      4. Find \(P(\text{F OR P})\).

    Answers

    a.

    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

    b.

    \(P(\text{F AND C}) = \dfrac{18}{100} = 0.18\)

    \(P(\text{F})P(\text{C}) = \left(\dfrac{45}{100}\right) \left(\dfrac{34}{100}\right) = (0.45)(0.34) = 0.153\)

    \(P(\text{F AND C}) \neq P(\text{F})P(\text{C})\), so the events \(\text{F}\) and \(\text{C}\) are not independent.

    c.

    1. The word 'given' tells you that this is a conditional.
    2. \(P(\text{M|L}) = \dfrac{25}{41}\)
    3. No, the sample space for this problem is the 41 hikers who prefer lakes and streams.

    d.

    1. Find \(P(\text{F})\).
    2. Find \(P(\text{P})\).
    3. Find \(P(\text{F AND P})\).
    4. Find \(P(\text{F OR P})\).

    d.

    1. \(P(\text{F}) = \dfrac{45}{100}\)
    2. \(P(\text{P}) = \dfrac{25}{100}\)
    3. \(P(\text{F AND P}) = \dfrac{11}{100}\)
    4. \(P(\text{F OR P}) = \dfrac{45}{100} + \dfrac{25}{100} - \dfrac{11}{100} = \dfrac{59}{100}\)

    Example \(\PageIndex{3}\)

    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 \(\dfrac{1}{5}\) and the probability he is not caught is \(\dfrac{4}{5}\). If he goes out the second door, the probability he gets caught by Alissa is \(\dfrac{1}{4}\) and the probability he is not caught is \(\dfrac{3}{4}\). The probability that Alissa catches Muddy coming out of the third door is \(\dfrac{1}{2}\) and the probability she does not catch Muddy is \(\dfrac{1}{2}\). It is equally likely that Muddy will choose any of the three doors so the probability of choosing each door is \(\dfrac{1}{3}\).

    Door Choice
    Caught or Not Door One Door Two Door Three Total
    Caught \(\dfrac{1}{15}\) \(\dfrac{1}{12}\) \(\dfrac{1}{6}\) ____
    Not Caught \(\dfrac{4}{15}\) \(\dfrac{3}{12}\) \(\dfrac{1}{6}\) ____
    Total ____ ____ ____ 1
    • The first entry \(\dfrac{1}{15} = \left(\dfrac{1}{5}\right) \left(\dfrac{1}{3}\right)\) is \(P(\text{Door One AND Caught})\)
    • The entry \(\dfrac{4}{15} = \left(\dfrac{4}{5}\right) \left(\dfrac{1}{3}\right)\) is \(P(\text{Door One AND Not Caught})\)

    Verify the remaining entries.

    1. Complete the probability contingency table. Calculate the entries for the totals. Verify that the lower-right corner entry is 1.
    2. What is the probability that Alissa does not catch Muddy?
    3. What is the probability that Muddy chooses Door One OR Door Two given that Muddy is caught by Alissa?

    Solution

    Door Choice
    Caught or Not Door One Door Two Door Three Total
    Caught \(\dfrac{1}{15}\) \(\dfrac{1}{12}\) \(\dfrac{1}{6}\) \(\dfrac{19}{60}\)
    Not Caught \(\dfrac{4}{15}\) \(\dfrac{3}{12}\) \(\dfrac{1}{6}\) \(\dfrac{41}{60}\)
    Total \(\dfrac{5}{15}\) \(\dfrac{4}{12}\) \(\dfrac{2}{6}\) 1

    b. \(\dfrac{41}{60}\)

    c. \(\dfrac{9}{19}\)

    Example \(\PageIndex{4}\)

    Table contains the number of crimes per 100,000 inhabitants from 2008 to 2011 in the U.S.

    United States Crime Index Rates Per 100,000 Inhabitants 2008–2011
    Year Robbery Burglary Rape Vehicle 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          

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

    1. Find \(P(\text{2009 AND Robbery})\).
    2. Find \(P(\text{2010 AND Burglary})\).
    3. Find \(P(\text{2010 OR Burglary})\).
    4. Find \(P(\text{2011|Rape})\).
    5. Find \(P(\text{Vehicle|2008})\).

    Answer

    a. 0.0294, b. 0.1551, c. 0.7165, d. 0.2365, e. 0.2575

     

    References

    1. “Blood Types.” American Red Cross, 2013. Available online at www.redcrossblood.org/learn-a...od/blood-types (accessed May 3, 2013).
    2. Data from the National Center for Health Statistics, part of the United States Department of Health and Human Services.
    3. Data from United States Senate. Available online at www.senate.gov (accessed May 2, 2013).
    4. Haiman, Christopher A., Daniel O. Stram, Lynn R. Wilkens, Malcom C. Pike, Laurence N. Kolonel, Brien E. Henderson, and Loīc Le Marchand. “Ethnic and Racial Differences in the Smoking-Related Risk of Lung Cancer.” The New England Journal of Medicine, 2013. Available online at http://www.nejm.org/doi/full/10.1056/NEJMoa033250 (accessed May 2, 2013).
    5. “Human Blood Types.” Unite Blood Services, 2011. Available online at www.unitedbloodservices.org/learnMore.aspx (accessed May 2, 2013).
    6. Samuel, T. M. “Strange Facts about RH Negative Blood.” eHow Health, 2013. Available online at www.ehow.com/facts_5552003_st...ive-blood.html (accessed May 2, 2013).
    7. “United States: Uniform Crime Report – State Statistics from 1960–2011.” The Disaster Center. Available online at http://www.disastercenter.com/crime/ (accessed May 2, 2013).

    WeBWork Problems

    Query \(\PageIndex{1}\)

     

    Query \(\PageIndex{2}\)

     

    Query \(\PageIndex{3}\)

    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.
     

    This page titled 4.6: Joint and Marginal Probabilities and Contingency Tables is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by OpenStax via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.