Displaying and Describing Categorical Data

Slides:



Advertisements
Similar presentations
Displaying and Describing Categorical Data 60 min.
Advertisements

Displaying & Describing Categorical Data Chapter 3.
Statistics: Categorical Variables. Do Now:  Give the context/ label the variables for the following situation:  The Federal Aviation Administration.
In 2007, deaths of a large number of pet dogs and cats were ultimately traced to contamination of some brands of pet food. The manufacturer NOW claims.
Slide Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 Displaying and Describing Categorical Data.
The Three Rules of Data Analysis
CHAPTER 1 STATISTICS Statistics is a way of reasoning, along with a collection of tools and methods, designed to help us understand the world.
. Chapter 3 Displaying and Describing Categorical Data.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 Displaying and Describing Categorical Data.
  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.
Copyright © 2010 Pearson Education, Inc. Chapter 3 Displaying and Describing Categorical Data.
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 2, Slide 1 Chapter 2 Displaying and Describing Categorical Data.
Do Now Have you: Read Harry Potter and the Deathly Hallows Seen Harry Potter and the Deathly Hallows (part 2)
Displaying & Describing Categorical Data Chapter 3.
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 2, Slide 1 Chapter 2 Displaying and Describing Categorical Data.
Chapter 3 Displaying and Describing Categorical Data
Chapters 1 and 2 Week 1, Monday. Chapter 1: Stats Starts Here What is Statistics? “Statistics is a way of reasoning, along with a collection of tools.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 3- 1.
Copyright ©2005 Brooks/Cole, a division of Thomson Learning, Inc. Plots, Graphs, and Pictures Chapter 9.
Plots, Graphs, and Pictures Thought Questions 1. Here is a plot that has some problems. Give two reasons why this is not a good plot. 2. Suppose you had.
Chapter 2 DISPLAYING AND DESCRIBING CATEGORICAL DATA.
Unit 3 Relations in Categorical Data. Looking at Categorical Data Grouping values of quantitative data into specific classes We use counts or percents.
Chapter 3: Displaying and Describing Categorical Data *Data Analysis *Frequency Tables, Bar Charts, Pie Charts Contingency Tables.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. - use pie charts, bar graphs, and tables to display data Chapter 3: Displaying and Describing Categorical.
1 Chapter 3 Displaying and Describing Categorical Data.
Slide 3-1 Copyright © 2004 Pearson Education, Inc.
Categorical Data! Frequency Table –Records the totals (counts or percentage of observations) for each category. If percentages are shown, it is a relative.
Unit 2 Descriptive Statistics Objective: To correctly identify and display sets of data.
Displaying & Describing Categorical Data Chapter 3.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 3- 1.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Unit 6, Module 15 – Two Way Tables (Part I) Categorical Data Comparing 2.
Copyright © 2009 Pearson Education, Inc. Chapter 3 Displaying and Describing Categorical Data.
Displaying and Describing Categorical Data
Displaying and Describing Categorical Data Chapter 3.
August 25,  Passengers on the Titanic by class of ticket. ClassCount 1 st nd rd th 885.
CATEGORICAL DATA CHAPTER 3 GET A CALCULATOR!. Slide 3- 2 THE THREE RULES OF DATA ANALYSIS won’t be difficult to remember: 1. Make a picture — things may.
Smart Start In June 2003, Consumer Reports published an article on some sport-utility vehicles they had tested recently. They had reported some basic.
Descriptive Statistics: Tabular and Graphical Methods
Displaying and describing categorical data
Smart Start In June 2003, Consumer Reports published an article on some sport-utility vehicles they had tested recently. They had reported some basic.
Displaying and Describing Categorical Data
Displaying and Describing Categorical Data
CHAPTER 1 Exploring Data
CHAPTER 1 Exploring Data
Honors Statistics Chapter 3 Part 1
Math 125 Stats Starts Here Copyright © 2009 Pearson Education, Inc.
Displaying and Describing Categorical Data
Chapter 3: Displaying and Describing Categorical Data
Displaying and Describing Categorical Data
CATEGORICAL DATA CHAPTER 3
Displaying and Describing
Displaying and Describing Categorical Data
Math 153 Stats Starts Here.
Displaying and Describing Categorical Data
Displaying and Describing Categorical Data
Relations in Categorical Data
AP Statistics Chapter 3 Part 2
Quick review of last time~
Announcements 100 Years: Let's celebrate! The National Park Service turns 100 on August 25, 2016, and everyone can take part in the celebration! To honor.
Displaying and Describing Categorical Data
Math 153 Stats Starts Here.
Stats Starts Here Copyright © 2009 Pearson Education, Inc.
Week 3 Lecture Notes PSYC2021: Winter 2019.
Displaying and Describing Categorical Data
Displaying and Describing Categorical data
Displaying and Describing Categorical Data
Grab a post it note and place it in the correct bin for where you went to middle school
Displaying and Describing Categorical Data
Displaying and Describing Categorical Data
Presentation transcript:

Displaying and Describing Categorical Data Plots, Graphs, Pictures and Line Graphs

Well-Designed Statistical Pictures “Out of the clutter, find simplicity” – Albert Einstein “Simplicity is the ultimate sophistication.”  - Leonardo DaVinci Basic Characteristics: 1. Data should stand out clearly from background. 2. Clear labeling that indicates a. title or purpose of picture. b. what each axis, bar, pie segment, …, denotes. c. scale of each axis, including starting points. 3. Source for the data. 4. As little “chart junk” (extraneous material) as possible.

Thought Question 1. Here is a plot that has some problems. Give two reasons why this is not a good plot.

Pictures of Categorical Data Three common pictures: Pie Charts Bar Graphs Pictograms

Pie Charts When you are interested in parts of the whole, a pie chart might be your display of choice. Pie charts show the whole group of cases as a circle. They slice the circle into pieces whose size is proportional to the fraction of the whole in each category.

What Can Go Wrong? While some people might like the pie chart on the left better, it is harder to compare fractions of the whole, which a well- done pie chart does.

Nightingale Graph preventable diseases (in blue), the results of wounds (in red), due to other causes (in black)

Frequency Tables: Making Piles We can “pile” the data by counting the number of data values in each category of interest. We can organize these counts into a frequency table, which records the totals and the category names. A relative frequency table is similar, but gives the percentages (instead of counts) for each category.

Conditional Distributions The conditional distributions tell us that there is a difference in class for those who survived and those who perished. This is better shown with pie charts of the two distributions:

Contingency Tables A contingency table allows us to look at two categorical variables together. Example: we can examine the class of ticket and whether a person survived the Titanic:

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:

Are Class and Survival Independent? We see that the distribution of Class for the survivors is different from that of the nonsurvivors. This leads us to believe that Class and Survival are associated, that they are not independent.

SAS Windowing Environment For the class, we will be using the SAS Windowing Environment ….

SAS - The FREQ Procedure The FREQ procedure can do the following: produce one-way to n-way frequency and crosstabulation (contingency) tables compute chi-square tests for one-way to n-way tables and measures of association and agreement for contingency tables automatically display the output in a report and save the output in a SAS data set General form of the FREQ procedure: PROC FREQ DATA=SAS­data­set <option(s)>; TABLES variable(s) </ option(s)>; RUN;

one-way frequency tables two-way frequency table The TABLES Statement Note: Place at top of Program libname orion 'C:\Columbia\classes\stat1111\Spring_2012\SAS\pgms_data'; The TABLES statement specifies the frequency and crosstabulation tables to produce. An asterisk between variables requests a n-way crosstabulation table. proc freq data=orion.sales; tables Gender Country; run; one-way frequency tables proc freq data=orion.sales; tables Gender*Country; run; two-way frequency table p112d01

The TABLES Statement A one-way frequency table produces frequencies, cumulative frequencies, percentages, and cumulative percentages. proc freq data=orion.sales; tables Gender Country; run;

The TABLES Statement An n-way frequency table produces cell frequencies, cell percentages, cell percentages of row frequencies, and cell percentages of column frequencies, plus total frequency and percent. proc freq data=orion.sales; tables Gender*Country; run; rows columns

The TABLES Statement

Physicians’ Health Study (1988) 5-year randomized experiment 22,071 male physicians (40 to 84 years old). Group 1: took ordinary aspirin tablet every other day. Group 2: took placebo (looked like aspirin but no active ingredients).

Bar Charts A bar chart displays the distribution of a categorical variable, showing the counts for each category next to each other for easy comparison. A bar chart stays true to the area principle. Thus, a better display for the ship data is:

Bar Charts 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. Replacing counts with percentages in the ship data:

Bar Charts Percentage of men and women 16 and over in the labor force Show what percentage or frequency of the whole fall into each category – can be used for two or three variables simultaneously.

Bar Charts – Botox Study Example

Segmented Bar Charts A segmented bar chart displays the same information as a pie chart, but in the form of bars instead of circles. Each bar is treated as the “whole” and is divided proportionally into segments corresponding o the percentage in each group. Here is the segmented bar chart for ticket Class by Survival status:

Bar Graphs Energy Data

Bar Graphs

Bar Graphs

Bar Graphs

Bar Graphs

Pictograms Percentage of Ph.D.s earned by women. Bar graph that uses pictures related to topic. Left pictogram: Misleading because eye focuses on area rather than just height. Right pictogram: Visually more accurate, but less appealing.

Study: Hematocrit was not validated as a surrogate end point for survival among epoetin-treated hemodialysis patients – Journal of Clinical Epidemiology, 2004

Producing Bar Charts in SAS goptions reset=all; pattern value = solid color = blue; title "Generating a Bar Chart - Using PROC GCHART"; proc gchart data=store; vbar Region; run; quit;

Producing Bar Charts in SAS title "Generating a Bar Chart - Using PROC SGPLOT"; proc sgplot data=store; vbar Region; run;

Producing Bar Charts in SAS

The Kids Are More Than All Right NY Times – Feb 2nd, 2012 Every few years, parents find new reasons to worry about their teenagers. And while there is no question that some kids continue to experiment with sex and substance abuse, the latest data point to something perhaps more surprising: the current generation is, well, a bit boring when it comes to bad behavior.

The Kids Are More Than All Right NY Times – Feb 2nd, 2012

Challenger Shuttle Disaster The morning of 27 January 1986 was particularly cold in the USA. Several engineers raised concerns over the low temperature at Kennedy Space Center, particularly the rubber O-rings. No one had tested the O-rings at such low temperatures. However management needed to get the mission underway, as soon as possible. The night before, the decision was made to go ahead with the launch.

Challenger Shuttle Disaster

Challenger Shuttle Disaster