Skip to main content

Registration is now open for this year's LibreFest! Join us virtually the week of July 13.

Register here
Medicine LibreTexts

4.5: Contingency Tables and Probability Trees

  • Page ID
    140378
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \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}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    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.

    Exercise \(\PageIndex{1}\)

    Suppose a public health study on the effectiveness of a campus-wide vaccination clinic produced the following data:

    Contracted the Flu Did NOT contract the Flu Total
    Received Flu Vaccine 25 280 305
    Did NOT receive Flu Vaccine 45 405 450
    Total 70 685 755
    Table \(\PageIndex{1}\)

    The total number of people in the sample is 755. The row totals (vaccination status) 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.

    a. Find P(Person was vaccinated).

    b. Find P(Person did not contract the flu).

    c. Find P(Person did not contract the flu AND was vaccinated).

    d. Find P(Person was vaccinated OR did not contract the flu).

    e. Find P(Person was vaccinated GIVEN they contracted the flu).

    f. Find P(Person did not contract the flu GIVEN they were NOT vaccinated).

    Answer
    a. Find P(Person was vaccinated): 305/755 = 0.4040

    b. Find P(Person did not contract the flu): 685/755 = 0.9073

    c. Find P(Person did not contract the flu AND was vaccinated): 280/755 = 0.3709

    d. Find P(Person was vaccinated OR did not contract the flu): (305/755) + (685/755) - (280/755) = 710/755 = 0.9404

    e. Find P(Person was vaccinated GIVEN they contracted the flu): 25/70 = 0.3571

    f. Find P(Person did not contract the flu GIVEN they were NOT vaccinated): 405/450 = 0.9000

    Exercise \(\PageIndex{2}\)

    Table (\PageIndex{3}\) 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
    Women 18 16   45
    Men     14 55
    Total   41    
    Table \(\PageIndex{3}\) Hiking Area Preference

    a. Complete the table.

    b. Are the events "being a woman" and "preferring the coastline" independent events?

    Let \(F=\) being a woman and let \(C=\) preferring the coastline.
    1. Find \(P(F \cap 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.

    c. Find the probability that a person is a man given that the person prefers hiking near lakes and streams. Let \(M=\) being a man, and let \(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\) ( \(\qquad\) | \(\qquad\) ) = \(\qquad\).
    3. Is the sample space for this problem all 100 hikers? If not, what is it?

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

    1. Find \(P(F)\).
    2. Find \(P(P)\).
    3. Find \(P(F \cap P)\).
    4. Find \(P(F \cup P)\).

    Answer

    a.

    Sex The coastline Near lakes and streams On mountain peaks Total
    Women 18 16 11 45
    Men 16 25 14 55
    Total 34 41 25 100

    Table \(\PageIndex{4}\) Hiking Area Preference

    b.

    1. \(P(F \cap C)=\dfrac{18}{100}=0.18\)
    2. \(P(F) P(C)=\left(\dfrac{45}{100}\right)\left(\dfrac{34}{100}\right)=(0.45)(0.34)=0.153\)
    \(P(F \cap C) \neq P(F) P(C)\), so the events \(F\) and \(C\) are not independent.

    c.

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

    d.

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

    Exercise \(\PageIndex{4}\)

    Table \(\PageIndex{9}\) contains the number of Hospitalization incidents per 100,000 individuals in the United States over the span of several years.

    Year Flu COVID Injury Cardiovascular Total
    1 145.7 732.1 29.7 314.7  
    2 133.1 717.7 29.1 259.2  
    3 119.3 701 27.7 239.1  
    4 113.7 702.2 26.8 229.6  
    Total          
    Table \(\PageIndex{9}\) United States Hospitalization rates Per 100,000 individuals

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

    a. P(Year 2 AND Flu)

    b. P(Year 3 AND COVID)

    c. P(Year 4 AND Injury)

    d. P(Cardiovascular AND Year 1)

    Answer

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


    This page titled 4.5: Contingency Tables and Probability Trees is shared under a CC BY-NC 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.