Presentation is loading. Please wait.

Presentation is loading. Please wait.

Slide 3- 1. Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 Displaying and Describing Categorical Data.

Similar presentations


Presentation on theme: "Slide 3- 1. Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 Displaying and Describing Categorical Data."— Presentation transcript:

1 Slide 3- 1

2 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 Displaying and Describing Categorical Data

3 Slide 3- 3 The Three Rules of Data Analysis The three rules of data analysis won’t be difficult to remember: 1. Make a picture—things may be revealed that are not obvious in the raw data. These will be things to think about. 2. Make a picture—important features of and patterns in the data will show up. You may also see things that you did not expect. 3. Make a picture—the best way to tell others about your data is with a well-chosen picture.

4 Slide 3- 4 Frequency Tables: Making Piles We can organize counts of the data values in each category of interest into a frequency table which records the totals and the category names

5 Slide 3- 5 Frequency Tables: Making Piles (cont.) A relative frequency table is similar, but gives the percentages (instead of counts) for each category.

6 Example: Fill in the chart

7 Slide 3- 7 What’s Wrong With This Picture? You might think that a good way to show the Titanic data is with this display:

8 Slide 3- 8 The Area Principle The ship display makes it look like most of the people on the Titanic were crew members, with a few passengers along for the ride. When we look at each ship, we see the area taken up by the ship, instead of the length of the ship. The ship display violates the area principle: – The area occupied by a part of the graph should correspond to the magnitude of the value it represents.

9 Slide 3- 9 Bar Charts A bar chart is often used to display categorical data. The height of each bar represents the count for each category. Bars are displayed next to each other for easy comparison. When constructing a bar chart, note that the bars do not touch each other. Categorical variables cannot be ordered in a meaningful way; therefore the order in which the bars are displayed are often meaningless.

10 Slide 3- 10 Bar Charts (cont.) A relative frequency bar chart displays the relative proportion of counts for each category. A relative frequency bar chart also stays true to the area principle. The sum of the relative frequency is 100%

11 Slide 3- 11 When you are interested in parts of the whole, a pie chart might be your display of choice. A circle is sliced into pieces whose size is proportional to the fraction of the whole in each category. Pie Charts

12 Slide 3- 12 Contingency Tables A contingency table allows us to look at two categorical variables together. It shows how individuals are distributed along each variable, contingent on the value of the other variable. – Example: we can examine the class of ticket and whether a person survived the Titanic:

13 Slide 3- 13 Contingency Tables (cont.) The margins of the table, both on the right and on the bottom, give totals and the frequency distributions for each of the variables. Each frequency distribution is called a marginal distribution of its respective variable. – The marginal distribution of Survival is:

14 Slide 3- 14 Contingency Tables (cont.) Each cell of the table gives the count for a combination of values of the two values.

15 Slide 3- 15 Conditional Distributions A conditional distribution shows the distribution of one variable for just the individuals who satisfy some condition on another variable. – The following is the conditional distribution of ticket Class, conditional on having survived:

16 Slide 3- 16 Conditional Distributions (cont.) – The following is the conditional distribution of ticket Class, conditional on having perished:

17 Example: Examine the class data about gender and political view – liberal, moderate, conservative.

18 What percent of the class are girls with liberal political views? What percent of liberals are girls? What percent of the girls are liberals?

19 What is the marginal distribution of gender? What is the marginal distribution of political views?

20 Show the conditional distribution of political preference, conditional on being male:

21 Show the conditional distribution of political preference, conditional on being female:

22 What is the conditional relative frequency distribution of gender among conservatives?

23 If the conditional distributions are the same, we can conclude that the variables are not associated. – Therefore, they are independent of one another. If the conditional distributions differ, we can conclude that the variables are somehow associated. Therefore, they are not independent of one another.

24 Slide 3- 24 Segmented Bar Charts A segmented bar chart displays the same information as a pie chart, but in the form of bars instead of circles. Here is the segmented bar chart for ticket Class by Survival status:

25


Download ppt "Slide 3- 1. Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 Displaying and Describing Categorical Data."

Similar presentations


Ads by Google