Presentation is loading. Please wait.

Presentation is loading. Please wait.

Section 2.6 Relations in Categorical Variables So far in chapter two we have dealt with data that is quantitative. In this section we consider categorical.

Similar presentations


Presentation on theme: "Section 2.6 Relations in Categorical Variables So far in chapter two we have dealt with data that is quantitative. In this section we consider categorical."— Presentation transcript:

1

2 Section 2.6 Relations in Categorical Variables So far in chapter two we have dealt with data that is quantitative. In this section we consider categorical data. Suppose we measure two variables in an individual, and both of those variables are categorical in nature. How can we display their association if there is any?

3 Section 2.6 Relations in Categorical Variables Consider the situation where 400 individuals are classified as having received a vaccine and whether the vaccine helped ward off the illness which it was intended for. One method is to display the information in a table. In the table we would write in the appropriate counts for each category. This table is known as a Two-Way Table, if we have measured two variables.

4 Section 2.6 Relations in Categorical Variables Consider the situation where 400 individuals are classified as having received a vaccine and whether the vaccine helped ward off the illness which it was intended for. Two - Way Table Margins The rows and columns that contain the totals are considered the margins.

5 Section 2.6 Relations in Categorical Variables Two - Way Table Margins A nice method of creating a picture with this table is to use bar graphs. However, a single bar graph can not capture all the information that is shown. We must choose what it is we want to see.

6 Section 2.6 Relations in Categorical Variables Marginal Distributions Margins If we create a bar graph that graphs the margins, this is known as a marginal distribution. And since we have two categories then we need to bar graphs to show both categories.

7 Section 2.6 Relations in Categorical Variables Marginal Distributions

8 Section 2.6 Relations in Categorical Variables Conditional Distributions If we only consider a particular row or column then the graph is considered a conditional distribution.

9 Section 2.6 Relations in Categorical Variables Conditional Distributions If we only consider a particular row or column then the graph is considered a conditional distribution. Suppose that we wish to consider only the medical condition where a person has been attacked, and find out if being vaccinated resulted in less cases of attacks compared to not being vaccinated.

10 Section 2.6 Relations in Categorical Variables Conditional Distributions This bar graph is based on the condition that we only are considering people who have been attacked.

11 Section 2.6 Relations in Categorical Variables Conditional Distributions This bar graph of the medical condition is based on the condition that the person is not vaccinated.

12 Section 2.6 Relations in Categorical Variables Conditional Distributions Usually percentages can add to the understanding of a distribution. We could create a table based on percentages of the total (marginal), or percentages based on a column or row (conditional).

13 Section 2.6 Relations in Categorical Variables Conditional Distributions

14 Section 2.6 Relations in Categorical Variables Marginal Distributions

15 Section 2.6 Relations in Categorical Variables Conditional Distributions

16 Section 2.6 Relations in Categorical Variables What percentage of the people who were attacked are vaccinated? 60/145 .414 rounded

17 Section 2.6 Relations in Categorical Variables What percentage of the people are vaccinated? 250/400 =.625

18 Section 2.6 Relations in Categorical Variables What percentage of the people who are not vaccinated were not attacked? 65/150 .433

19 Simpson’s Paradox An association or comparison that holds for several groups can reverse direction when the data are combined to form a single group. This reversal is called Simpson’s paradox (page 200).

20 Simpson’s Paradox Page 207 problem 96. This is a three-way table because there are three categories: race of defendant, race of victim, death penalty verdict. In order to show all three categories two tables are needed.

21 Simpson’s Paradox Page 207 problem 96. Let us look at the percentage of time the death penalty is given depending on the race of the defendant. Notice that the black defendant receives the death penalty more often, regardless of the race of the victim as compared to the white defendant.

22 Simpson’s Paradox Page 207 problem 96. When we remove the category “victims race” by combining the tables, the result of this is that the white defendant receives the death penalty more often, 11.88%, than the black defendant, 10.24%.

23 THE END


Download ppt "Section 2.6 Relations in Categorical Variables So far in chapter two we have dealt with data that is quantitative. In this section we consider categorical."

Similar presentations


Ads by Google