Presentation is loading. Please wait.

Presentation is loading. Please wait.

Objectives Given a contingency table of counts, construct a marginal distribution. Given a contingency table of counts, create a conditional distribution.

Similar presentations


Presentation on theme: "Objectives Given a contingency table of counts, construct a marginal distribution. Given a contingency table of counts, create a conditional distribution."— Presentation transcript:

1 Objectives Given a contingency table of counts, construct a marginal distribution. Given a contingency table of counts, create a conditional distribution. Evaluate a contingency table to determine if the variables are dependent or independent.

2 Contingency Tables A contingency table displays counts or percentages of individuals falling into named categories on two or more variables. The table categorizes the individuals on all variables at once to reveal possible patterns in one variable that may be contingent on the category of the other

3 The Titanic: Women and Children First? The contingency table shows the class of ticket and whether a ticket holder survived or died. FirstSecondThirdCrewTotal Alive203118178212711 Dead1221675286731490 Total3252857068852201 Survival Class of Ticket

4 The Titanic: Women and Children First? When presented like this the frequency distribution of one of the variables is called its marginal distribution FirstSecondThirdCrewTotal Alive203118178212711 Dead1221675286731490 Total3252857068852201 Survival Class of Ticket

5 FirstSecondThirdCrewTotal Alive203118178212711 Dead1221675286731490 Total3252857068852201 Survival Class of Ticket Looking at second-class ticket holders we see 118 survived, third-class ticket holders had 178 survivors. Were third-class passengers more likely to survive?

6 FirstSecondThirdCrewTotal Alive % of Row % of Column % of Table 203 28.6% 62.5% 9.2% 118 16.6% 41.4% 5.4% 178 25.0% 25.2% 8.1% 212 29.8% 24.0% 9.6% 711 100% 32.3% Dead % of Row % of Column % of Table 122 8.2% 37.5% 5.6% 167 11.2% 58.6% 7.6% 528 35.4% 74.8% 24.0% 673 45.2% 76.0% 30.6% 1490 100% 67.7% Total % of Row % of Column % of Total 325 14.8% 100% 14.8% 285 12.9% 100% 12.9% 706 32.1% 100% 32.1% 885 40.2% 100% 40.2% 2201 100% Survival Class of Ticket There is more information in this table than we need. Lets just look at the percent of table values.

7 Were third-class passengers more likely to survive? FirstSecondThirdCrewTotal Alive 9.2%5.4%8.1%9.6%32.3% Dead 5.6%7.6%24.0%30.6%67.7% Total 14.8%12.9%32.1%40.2%100% Survival Class of Ticket

8 Percent of What? The English language can be tricky when we talk about percentages. –What percent of the survivors were in second-class? –What percent were second-class passengers who survived? –What percent of the second-class passengers survived? Always be sure to ask “percent of what?”

9 Conditional Distributions Its more interesting to consider questions like, “Did the chance of surviving the sinking of the Titanic depend on ticket class? It is also a bit trickier to answer as well.

10 Conditional Distribution- shows the distribution of one variable for just those cases that satisfy a condition on another variable. FirstSecondThirdCrewTotal Alive203 28.6% 118 16.6% 178 25% 212 29.8% 711 100% Dead122 8.2% 167 11.2% 528 35.4% 673 45.2% 1490 100% Total3252857068852201 Survival Class of Ticket

11 Is the chance of survival the same for each of the four classes of passengers? FirstSecondThirdCrewTotal Alive % of column 203 62.5% 118 41.4% 178 25.2% 212 24.0% 711 32.3% Dead % of column 122 37.5% 167 58.6% 528 74.8% 673 76.0% 1490 67.7% Total325 100% 285 100% 706 100% 885 100% 2201 100% Survival Class of Ticket

12 We see that the survival rates differ substantially across the ticket classes. So survival may have depended on ticket class. In other words Class and Survival are associated. FirstSecondThirdCrewTotal Alive % of column 203 62.5% 118 41.4% 178 25.2% 212 24.0% 711 32.3% Dead % of column 122 37.5% 167 58.6% 528 74.8% 673 76.0% 1490 67.7% Total325 100% 285 100% 706 100% 885 100% 2201 100% Survival Class of Ticket

13 On the second day, we did the following graphs in order and kept considering whether a relationship existed between the variables. Use colored Chalk as much as possible to make the graphs standout based on ticket class.

14 Creating Graphs Bar Graph for the number of people on the Titanic by ticket class. Ticket ClassFreq First325 Second285 Third706 Crew885

15 Creating Graphs Create two pie charts using the table based on Alive or Dead by Class of Ticket FirstSecondThirdCrewTotal Alive203 28.6% 118 16.6% 178 25% 212 29.8% 711 100% Dead122 8.2% 167 11.2% 528 35.4% 673 45.2% 1490 100% Total3252857068852201

16 Creating Graphs Create two segmented bar graphs using Alive versus Dead on horizontal axis, percents on vertical axis FirstSecondThirdCrewTotal Alive203 28.6% 118 16.6% 178 25% 212 29.8% 711 100% Dead122 8.2% 167 11.2% 528 35.4% 673 45.2% 1490 100% Total3252857068852201

17 Create Graphs Create a side-by-side bar graph Two bars for each class of ticket... Use Ticket Class on horizontal axis and percentages on vertical axis. FirstSecondThirdCrewTotal Alive % of column 203 62.5% 118 41.4% 178 25.2% 212 24.0% 711 32.3% Dead % of column 122 37.5% 167 58.6% 528 74.8% 673 76.0% 1490 67.7% Total325 100% 285 100% 706 100% 885 100% 2201 100%


Download ppt "Objectives Given a contingency table of counts, construct a marginal distribution. Given a contingency table of counts, create a conditional distribution."

Similar presentations


Ads by Google