3.4: Contingency Tables
- Page ID
- 29596
\( \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}}\)
\( \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{\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}\)15
Contingency Tables
jkesler
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 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 cell phone while driving | 25 | 280 | 305 |
Does not use cell phone while driving | 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.
- Find P(Driver is a cell phone user).
- Find P(driver had no violation in the last year).
- Find P(Driver had no violation in the last year AND was a cell phone user).
- Find P(Driver is a cell phone user OR driver had no violation in the last year).
- Find P(Driver is a cell phone user GIVEN driver had a violation in the last year).
- Find P(Driver had no violation last year GIVEN driver was not a cell phone user)
Solutions:
- $\frac{\text{number of cell phone users}}{\text{total number in study}}= \frac{305}{755} = 0.404$
- $\frac{\text{number that had no violation}}{\text{total number in study}}= \frac{685}{755} = 0.9073$
- $\frac{280}{755} = 0.3709$
- $\left(\frac{305}{755}+\frac{685}{755}\right)-\frac{280}{755} = \frac{710}{755}=0.9404$
- $\frac{25}{70}=0.3571$
- $\frac{405}{450}=0.9$
Try It 3.20
Table 3.3 below shows the number of athletes who stretch before exercising and how many had injuries within the past year.
Injury in last year | No injury in last year | Total | |
---|---|---|---|
Stretches | 55 | 295 | 350 |
Does not stretch | 231 | 219 | 450 |
Total | 286 | 514 | 800 |
- What is P(athlete stretches before exercising)?
- What is P(athlete stretches before exercising|no injury in the last year)?
Example 3.21
Table 3.4 below 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 | ___ | ___ |
- Complete the table.
- Are the events “being female” and “preferring the coastline” independent events?
Let F = being female and let C = preferring the coastline.- Find P(F AND C).
- 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.
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.
- What word tells you this is a conditional?
- Fill in the blanks and calculate the probability: P(___|___) = ___.
- Is the sample space for this problem all 100 hikers? If not, what is it?
- Find the probability that a person is female or prefers hiking on mountain peaks. Let F = being female, and let P = prefers mountain peaks.
- Find P(F).
- Find P(P).
- Find P(F AND P).
- Find P(F OR P).
Try It 3.21
Table 3.6 below 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 |
- Out of the males, what is the probability that the cyclist prefers a hilly path?
- Are the events “being male” and “preferring the hilly path” independent events?
Example 3.22
Caught or Not | Door One | Door Two | Door Three | Total |
---|---|---|---|---|
Caught | $\frac{1}{15}$ | $\frac{1}{12}$ | $\frac{1}{6}$ | ____ |
Not Caught | $\frac{4}{15}$ | $\frac{3}{12}=\frac{1}{4}$ | $\frac{1}{6}$ | ____ |
Total | ____ | ____ | ____ | 1 |
- The first entry $\frac{1}{15}=\left( \frac{1}{5} \right) \left( \frac{1}{3}\right)$ is $P(\text{Door One AND Caught})$
- The entry $\frac{4}{15}=\left( \frac{4}{5} \right) \left( \frac{1}{3}\right)$ is $P(\text{Door One AND Not Caught})$
Verify the remaining entries.
- Complete the probability contingency table. Calculate the entries for the totals. Verify that the lower-right corner entry is 1.
- What is the probability that Alissa does not catch Muddy?
- What is the probability that Muddy chooses Door One OR Door Two given that Muddy is caught by Alissa?
Solution
Caught or Not Door One Door Two Door Three Total Caught $\frac{1}{15}$ $\frac{1}{12}$ $\frac{1}{6}$ $\frac{19}{60}$ Not Caught $\frac{4}{15}$ $\frac{3}{12}=\frac{1}{4}$ $\frac{1}{6}$ $\frac{41}{60}$ Total $\frac{5}{15}=\frac{1}{3}$ $\frac{4}{12}=\frac{1}{3}$ $\frac{2}{6}=\frac{1}{3}$ 1 - $\frac{41}{60}=0.6833$
- $\frac{9}{19}=0.4737$
Example 3.23
Table 3.9 below contains the number of crimes per 100,000 inhabitants from 2008 to 2011 in the U.S.
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
- Find P(2009 AND Robbery).
- Find P(2010 AND Burglary).
- Find P(2010 OR Burglary).
- Find P(2011|Rape).
- Find P(Vehicle|2008).
Solution
- 0.0294
- 0.1551
- 0.7165
- 0.2365
- 0.2575
Try It 3.23
Table 3.10 below relates the weights and heights of a group of individuals participating in an observational study.
Weight/Height | Tall | Medium | Short | Totals |
---|---|---|---|---|
Obese | 18 | 28 | 14 | |
Normal | 20 | 51 | 28 | |
Underweight | 12 | 25 | 9 | |
Totals |
- Find the total for each row and column
- Find the probability that a randomly chosen individual from this group is Tall.
- Find the probability that a randomly chosen individual from this group is Obese and Tall.
- Find the probability that a randomly chosen individual from this group is Tall given that the idividual is Obese.
- Find the probability that a randomly chosen individual from this group is Obese given that the individual is Tall.
- Find the probability a randomly chosen individual from this group is Tall and Underweight.
- Are the events Obese and Tall independent?