Two-way tables BPS chapter 6 © 2006 W. H. Freeman and Company.

Slides:



Advertisements
Similar presentations
Data Analysis for Two-Way Tables
Advertisements

CHAPTER 23: Two Categorical Variables: The Chi-Square Test
CHAPTER 23: Two Categorical Variables The Chi-Square Test ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture.
AP Statistics Section 14.2 A. The two-sample z procedures of chapter 13 allowed us to compare the proportions of successes in two groups (either two populations.
Comparitive Graphs.
AP Statistics Section 4.2 Relationships Between Categorical Variables.
Chapter 13: Inference for Distributions of Categorical Data
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.
Relations in Categorical Data 1. When a researcher is studying the relationship between two variables, if both variables are numerical then scatterplots,
AP Statistics Section 14.2 A. The two-sample z procedures of chapter 13 allowed us to compare the proportions of successes in two groups (either two populations.
AP STATISTICS Section 4.2 Relationships between Categorical Variables.
Analysis of two-way tables - Formulas and models for two-way tables - Goodness of fit IPS chapters 9.3 and 9.4 © 2006 W.H. Freeman and Company.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 Displaying and Describing Categorical Data.
BPS - 5TH ED.CHAPTER 6 1 An important measure of the performance of a locomotive is its "adhesion," which is the locomotive's pulling force as a multiple.
4.3 Categorical Data Relationships.
Examining Relationships Scatterplots
Analysis of two-way tables - Formulas and models for two-way tables - Goodness of fit IPS chapters 9.3 and 9.4 © 2006 W.H. Freeman and Company.
Lecture 9 Chapter 22. Tests for two-way tables. Objectives The chi-square test for two-way tables (Award: NHST Test for Independence)  Two-way tables.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 3- 1.
Exploring Data Section 1.1 Analyzing Categorical Data.
13.2 Chi-Square Test for Homogeneity & Independence AP Statistics.
Analysis of Two-Way tables Ch 9
Unit 3 Relations in Categorical Data. Looking at Categorical Data Grouping values of quantitative data into specific classes We use counts or percents.
CHAPTER 6: Two-Way Tables. Chapter 6 Concepts 2  Two-Way Tables  Row and Column Variables  Marginal Distributions  Conditional Distributions  Simpson’s.
Data Analysis for Two-Way Tables. The Basics Two-way table of counts Organizes data about 2 categorical variables Row variables run across the table Column.
Summarizing the Relationship Between Two Variables with Tables and a bit of a review Chapters 6 and 7 Jan 31 and Feb 1, 2012.
CHAPTER 23: Two Categorical Variables The Chi-Square Test ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture.
Analysis of two-way tables - Data analysis for two-way tables IPS chapter 2.6 © 2006 W.H. Freeman and Company.
 Some variables are inherently categorical, for example:  Sex  Race  Occupation  Other categorical variables are created by grouping values of a.
Chapter 3: Displaying and Describing Categorical Data Sarah Lovelace and Alison Vicary Period 2.
BPS - 3rd Ed. Chapter 61 Two-Way Tables. BPS - 3rd Ed. Chapter 62 u In this chapter we will study the relationship between two categorical variables (variables.
Stat1510: Statistical Thinking and Concepts Two Way Tables.
Two-Way Tables Categorical Data. Chapter 4 1.  In this chapter we will study the relationship between two categorical variables (variables whose values.
Aim: How do we analyze data with a two-way table?
Inference about a population proportion. 1. Paper due March 29 Last day for consultation with me March 22 2.
Warm-up An investigator wants to study the effectiveness of two surgical procedures to correct near-sightedness: Procedure A uses cuts from a scalpel and.
1 Chapter 3 Displaying and Describing Categorical Data.
Lecture 9 Chapter 22. Tests for two-way tables. Objectives (PSLS Chapter 22) The chi-square test for two-way tables (Award: NHST Test for Independence)[B.
Correlation/Regression - part 2 Consider Example 2.12 in section 2.3. Look at the scatterplot… Example 2.13 shows that the prediction line is given by.
Chapter 6 Two-Way Tables BPS - 5th Ed.Chapter 61.
Categorical Data! Frequency Table –Records the totals (counts or percentage of observations) for each category. If percentages are shown, it is a relative.
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
BPS - 3rd Ed. Chapter 61 Two-Way Tables. BPS - 3rd Ed. Chapter 62 u In prior chapters we studied the relationship between two quantitative variables with.
AP Statistics Section 4.2 Relationships Between Categorical Variables
4.3 Relations in Categorical Data.  Use categorical data to calculate marginal and conditional proportions  Understand Simpson’s Paradox in context.
Summarizing the Relationship Between Two Variables with Tables Chapter 6.
Categorical Data! Frequency Table –Records the totals (counts or percentage of observations) for each category. If percentages are shown, it is a relative.
Chapter 1.1 – Analyzing Categorical Data A categorical variable places individuals into one of several groups of categories. A quantitative variable takes.
CHAPTER 6: Two-Way Tables*
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Unit 6, Module 15 – Two Way Tables (Part I) Categorical Data Comparing 2.
Chi Square Procedures Chapter 14. Chi-Square Goodness-of-Fit Tests Section 14.1.
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8… Where we are going… Significance Tests!! –Ch 9 Tests about a population proportion –Ch 9Tests.
11/12 9. Inference for Two-Way Tables. Cocaine addiction Cocaine produces short-term feelings of physical and mental well being. To maintain the effect,
Displaying and Describing Categorical Data
Second factor: education
The Practice of Statistics in the Life Sciences Third Edition
Analysis of two-way tables - Data analysis for two-way tables
Second factor: education
Looking at Data - Relationships Data analysis for two-way tables
The Practice of Statistics in the Life Sciences Fourth Edition
Data Analysis for Two-Way Tables
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
AP STATISTICS LESSON 4 – 3 ( DAY 1 )
AP Statistics Chapter 3 Part 2
Second factor: education
Section 4-3 Relations in Categorical Data
Chapter 13: Inference for Distributions of Categorical Data
Relations in Categorical Data
Analysis of two-way tables
Displaying and Describing Categorical Data
Presentation transcript:

Two-way tables BPS chapter 6 © 2006 W. H. Freeman and Company

Objectives (BPS chapter 6) Two-way tables  Two-way tables  Marginal distributions  Relationships between categorical variables  Conditional distributions  Simpson’s paradox

An experiment has a two-way, or block, design if two categorical factors are studied with several levels of each factor. Two-way tables organize data about two categorical variables obtained from a two-way, or block, design. ( There are now two ways to group the data. ) Two-way tables First factor: age group Group by age Second factor: education level Record education

Marginal distributions We can look at each categorical variable in a two-way table separately by studying the row totals and the column totals. They represent the marginal distributions, expressed in counts or percentages (they are written as if in a margin) US census

Marginal percentages 2000 US census 15.9% 33.1% 25.4% 25.6% 100%21.6% 46.5% 31.9%

The marginal distributions can then be displayed on separate bar graphs, typically expressed as percents instead of raw counts. Each graph represents only one of the two variables, completely ignoring the second one % 33.1 % 25.4 % 25.6 % 21.6% 46.5% 31.9%

Parental smoking Does parental smoking influence the smoking habits of their high school children? Summary two-way table: High school students were asked whether they smoke and whether their parents smoke. Marginal distribution for the categorical variable “parental smoking”: The row totals are used and re-expressed as a percent from the grand total. The percentages are then displayed in a bar graph. Student smokes Student does not smokeTotal Both parents smoke One parent smokes Neither parent smokes Total Neither parent smokes One parent smokes Both parents smoke 25.2%41.7%33.1%

Relationships between categorical variables The marginal distributions summarize each categorical variable independently. But the two-way table actually describes the relationship between both categorical variables. The cells of a two-way table represent the intersection of a given level of one categorical factor with a given level of the other categorical factor. Because counts can be misleading (for instance, one level of one factor might be much less represented than the other levels), we prefer to calculate percents or proportions for the corresponding cells. These make up the conditional distributions.

The counts or percents within the table represent the conditional distributions. Comparing the conditional distributions allows us to describe the “relationship" between both categorical variables. Conditional distributions Here the percents are calculated by age range (columns).

The conditional distributions can be graphically compared using side- by-side bar graphs of one variable for each value of the other variable. Here the percents are calculated by age range (columns).

Music and wine purchase decision We want to compare the conditional distributions of the response variable (wine purchased) for each value of the explanatory variable (music played). Therefore, we calculate column percents. What is the relationship between type of music played in supermarkets and type of wine purchased? We calculate the column conditional percents similarly for each of the nine cells in the table. Calculations: When no music was played, there were 84 bottles of wine sold. Of these, 30 were French wine. 30/84 =  35.7% of the wine sold was French when no music was played. 30 = 35.7% 84 = cell total. column total

For every two-way table, there are two sets of possible conditional distributions. Wine purchased for each kind of music played (column percents) Music played for each kind of wine purchased (row percents) Does background music in supermarkets influence customer purchasing decisions?

Simpson’s paradox Beware of lurking variables An association or comparison that holds for all of several groups can reverse direction when the data are combined to form a single group. This reversal is called Simpson's paradox. Since Hospital A appears better for both condition, we combine the data, but find that Hospital B would seem to have a better record when we do not consider condition. Here patient condition was the lurking variable. From the tables, we see that Hospital A has a better record for both patient conditions (good and poor). We would think that Hospital A is safer than Hospital B. Example: Hospital death rates