Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Connexions module: m16835 1 Probability Topics: Contingency Tables ∗ Susan Dean Barbara Illowsky, Ph.D. This work is produced by The Connexions Project and licensed under the Creative Commons Attribution License † Abstract This module introduces the contingency table as a way of determining conditional probabilities. A contingency table provides a dierent way of calculating probabilities. The table helps in determining conditional probabilities quite easily. The table displays sample values in relation to two dierent variables that may be dependent or contingent on one another. Later on, we will use contingency tables again, but in another manner. Example 1 Suppose a study of speeding violations and drivers who use car phones produced the following ctional data: Speeding violation in No speeding viola- Total the last year tion in the last year Car phone user Not a car phone user Total 25 45 70 280 405 685 305 450 755 Table 1 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 Problem 1 P(person is a car phone user) = Solution number of car phone users total number in study ∗ Version = 305 755 1.11: Feb 12, 2011 11:09 am US/Central † http://creativecommons.org/licenses/by/3.0/ Source URL: http://cnx.org/content/col10522/latest/ Saylor URL: http://www.saylor.org/courses/ma121/ http://cnx.org/content/m16835/1.11/ Attributed to: Barbara Illowsky and Susan Dean Saylor.org Page 1 of 5 Connexions module: m16835 2 Problem 2 P(person had no violation in the last year) = Solution 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) = Solution 280 755 Problem 4 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 Problem 5 P(person is a car phone user GIVEN person had a violation in the last year) = Solution (The sample space is reduced to the number of persons who had a violation.) 25 70 Problem 6 P(person had no violation last year GIVEN person was not a car phone user) = Solution 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: Hiking Area Preference Sex The Coastline Near Lakes and Streams On Mountain Peaks Total Female Male Total 18 ___ ___ 16 ___ 41 ___ 14 ___ 45 55 ___ Table 2 Problem 1 (Solution on p. 5.) Problem 2 (Solution on p. 5.) Complete the table. Are the events "being female" and "preferring the coastline" independent events? Let F = being female and let C = preferring the coastline. Source URL: http://cnx.org/content/col10522/latest/ Saylor URL: http://www.saylor.org/courses/ma121/ http://cnx.org/content/m16835/1.11/ Attributed to: Barbara Illowsky and Susan Dean Saylor.org Page 2 of 5 Connexions module: m16835 3 a. P(F AND C) = b. 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 3 (Solution on p. 5.) 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. a. What word tells you this is a conditional? b. Fill in the blanks and calculate the probability: P(___|___) = ___. c. Is the sample space for this problem all 100 hikers? If not, what is it? Problem 4 (Solution on p. 5.) Find the probability that a person is female or prefers hiking on mountain peaks. Let F = being female and let P = prefers mountain peaks. a. P(F) = b. P(P) = c. P(F AND P) = d. Therefore, P(F OR P) = Example 3 Muddy Mouse lives in a cage with 3 doors. If Muddy goes out the rst door, the probability that he gets caught by Alissa the cat is 15 and the probability he is not caught is 54 . If he goes out the second door, the probability he gets caught by Alissa is 14 and the probability he is not caught is 34 . The probability that Alissa catches Muddy coming out of the third door is 12 and the probability she does not catch Muddy is 21 . It is equally likely that Muddy will choose any of the three doors so the probability of choosing each door is 13 . Door Choice Caught or Not Door One Door Two Door Three Total Caught Not Caught Total 1 15 4 15 1 12 3 12 1 6 1 6 ____ ____ ____ ____ ____ 1 Table 3 1 • The rst entry 15 = 15 13 is P(Door One AND Caught). 4 • The entry 15 = 54 13 is P(Door One AND Not Caught). Verify the remaining entries. Problem 1 (Solution on p. 5.) Complete the probability contingency table. Calculate the entries for the totals. Verify that the lower-right corner entry is 1. Problem 2 What is the probability that Alissa does not catch Muddy? Source URL: http://cnx.org/content/col10522/latest/ Saylor URL: http://www.saylor.org/courses/ma121/ http://cnx.org/content/m16835/1.11/ Attributed to: Barbara Illowsky and Susan Dean Saylor.org Page 3 of 5 Connexions module: m16835 4 Solution 41 60 Problem 3 What is the probability that Muddy chooses Door One OR Door Two given that Muddy is caught by Alissa? Solution 9 19 You could also do this problem by using a probability tree. See the Tree Diagrams (Optional) section of this chapter for examples. note: 1 1 "Probability Topics: Tree Diagrams (optional)" <http://cnx.org/content/m16846/latest/> Source URL: http://cnx.org/content/col10522/latest/ Saylor URL: http://www.saylor.org/courses/ma121/ http://cnx.org/content/m16835/1.11/ Attributed to: Barbara Illowsky and Susan Dean Saylor.org Page 4 of 5 Connexions module: m16835 5 Solutions to Exercises in this Module Solution to Example 2, Problem 1 (p. 2) Hiking Area Preference Sex The Coastline Near Lakes and Streams On Mountain Peaks Female 18 16 11 Male 16 25 14 Total 34 41 25 Total 45 55 100 Table 4 Solution to Example 2, Problem 2 (p. 2) a. P(F AND C) = b. P (F) · P (C) = 18 100 45 100 = 0.18 34 · 100 = 0.45 · 0.34 = 0.153 P(F AND C) 6= P (F) · P (C), so the events F and C are not independent. Solution to Example 2, Problem 3 (p. 3) a. The word 'given' tells you that this is a conditional. 25 b. P(M|L) = 41 c. No, the sample space for this problem is 41. Solution to Example 2, Problem 4 (p. 3) 45 a. P(F) = 100 25 b. P(P) = 100 11 c. P(F AND P) = 100 45 d. P(F OR P) = 100 + 25 100 − 11 100 = 59 100 Solution to Example 3, Problem 1 (p. 3) Door Choice Caught or Not Door One Door Two Door Three Total Caught Not Caught Total 1 15 4 15 5 15 1 12 3 12 4 12 1 6 1 6 2 6 19 60 41 60 1 Table 5 Glossary Denition 1: 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. Source URL: http://cnx.org/content/col10522/latest/ Saylor URL: http://www.saylor.org/courses/ma121/ http://cnx.org/content/m16835/1.11/ Attributed to: Barbara Illowsky and Susan Dean Saylor.org Page 5 of 5