Elementary Statistics: Understanding Relationships between Two Categorical Variables, Study notes of Statistics

A lecture from 'elementary statistics: looking at the big picture' by nancy pfenning. It focuses on the relationship between two categorical variables, specifically two-way tables, summarizing and displaying data, comparing proportions or counts, and confounding variables. Students will learn how to identify variables' roles, compare proportions or percentages, and interpret results.

Typology: Study notes

Pre 2010

Uploaded on 09/09/2009

koofers-user-hsq
koofers-user-hsq 🇺🇸

10 documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
(C) 2007 Nancy Pfenning
Elementary Statistics: Looking at the Big Picture 1
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture
Lecture 10
Relationships
(Two Categorical Variables)
Two-Way Tables
Summarizing and Displaying
Comparing Proportions or Counts
Confounding Variables
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10.2
Looking Back: Review
4 Stages of Statistics
Data Production (discussed in Lectures 1-4)
Displaying and Summarizing
Single variables: 1 cat,1 q uan (discussed Lectures 5-8)
Relationships between 2 variables:
Categorical and quantitative (d iscussed in Lecture 9)
Two categorical
Two quantitative
Probability
Statistical Inference
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10.3
Single Categorical Variables (Review)
Display:
Pie Chart
Bar Graph
Summarize:
Count or Proportion or Percentage
Add categorical explanatory variable
display and summary of categorical responses
are extensions of those used for single
categorical variables.
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10.4
Example: Two Single Categorical Variables
Background: Data on students’ gender and lenswear
(contacts, glasses, or none) in two-way table:
Question: What parts of table convey info about the
individual variables gender and lenswear?
446214 69163
Total
164 85 37 42M
282129 32121F
Total
NGC
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Elementary Statistics: Understanding Relationships between Two Categorical Variables and more Study notes Statistics in PDF only on Docsity!

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture

Lecture 10

Relationships

(Two Categorical Variables)

Two-Way Tables Summarizing and Displaying Comparing Proportions or Counts Confounding Variables (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 2

Looking Back: Review

 4 Stages of Statistics

 Data Production (discussed in Lectures 1-4)  Displaying and Summarizing  Single variables: 1 cat,1 quan (discussed Lectures 5-8)  Relationships between 2 variables:  Categorical and quantitative (discussed in Lecture 9)  Two categorical  Two quantitative  Probability  Statistical Inference (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 3

Single Categorical Variables (Review)

 Display:

 Pie Chart  Bar Graph

 Summarize :

 Count or Proportion or Percentage

Add categorical explanatory variable 

display and summary of categorical responses

are extensions of those used for single

categorical variables.

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 4

Example: Two Single Categorical Variables

Background : Data on students’ gender and lenswear (contacts, glasses, or none) in two-way table:  Question: What parts of table convey info about the individual variables gender and lenswear? Total 163 69 214 446

M 42 37 85 164

F 121 32 129 282

C G N^ Total

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 6

Example: Two Single Categorical Variables

Background : Data on students’ gender and lenswear (contacts, glasses, or none) in two-way table:  Response:_____________________ is about gender  _____________________ is about lenswear Total 163 69 214 446

M 42 37 85 164

F 121 32 129 282

C G N^ Total (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L6. 7

Example: Relationship between Categorical

Variables

Background : Data on students’ gender and lenswear (contacts, glasses, or none) in two-way table:  Question: What part of the table conveys info about the relationship between gender and lenswear? Total 163 69 214 446

M 42 37 85 164

F 121 32 129 282

C G N^ Total (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L6. 9

Example: Relationship between Categorical

Variables

Background : Data on students’ gender and lenswear (contacts, glasses, or none) in two-way table:  Response: _________________is about relationship Total 163 69 214 446

M 42 37 85 164

F 121 32 129 282

C G N^ Total (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L6. 10

Summarizing and Displaying Categorical

Relationships

 Identify variables’ roles (explanatory, response)  Use rows for explanatory, columns for response  Compare proportions or percentages in response of interest (conditional percentages) for various explanatory groups.  Display with bar graph:  Explanatory groups identified on horizontal axis  Conditional percentages or proportions in response(s) of interest graphed vertically

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 17

Example: Displaying Categorical Relationship

Background : Counts and conditional percentages produced with software:  Response: Caution: If we made lenswear explanatory, we’d compare 129/214 = 60% with no lenses female, 85/214= 40% with no lenses male, etc. Why is this not useful? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 19 Example: Interpreting ResultsBackground : Counts and conditional percentages produced with software:  Questions: Are you convinced that, in general,  all females wear contacts more than males do?  all males are more likely to wear no lenses? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 21 Example: Interpreting ResultsBackground : Counts and conditional percentages produced with software:  Responses:  Contacts:  No lenses: Looking Ahead: Inference will let us judge if sample differences are large enough to suggest a general trend. For now, we can guess that the first difference is “real”, due to different priorities for importance of appearance. (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 22

Example: Comparing Proportions

Background : An experiment considered if wasp larvae were less likely to attack an embryo if it was a brother:  Question: What are the relevant proportions to compare? Total 40 22 62 Unrelated 24 7 31 Brother 16 15 31 Not Total attacked Attacked

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 25

Example: Comparing Proportions

Background : An experiment considered if wasp larvae were less likely to attack an embryo if it was a brother:  Response:  Brother: ________________were attacked  Unrelated: ________________ were attacked  _______ likely to attack a brother wasp Total 40 22 62 Unrelated 24 7 31 Brother 16 15 31 Not Total attacked Attacked (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L6. 26

Another Comparison in Considering Categorical

Relationships

 Instead of considering how different are the proportions in a two-way table, we may consider how different the counts are from what we’d expect if the “explanatory” and “response” variables were in fact unrelated. (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 27

Example: Expected Counts

Background : Experiment considered if wasp larvae were less likely to attack embryo if it was a brother:  Question: What counts would we expect to see, if being a brother had no effect on likelihood of attack? Total 40 22 62 Unrelated 24 7 31 Brother 16 15 31 Attacked Not attacked Total (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 30

Example: Expected Counts

Background : Experiment considered if wasp larvae were less likely to attack embryo if it was a brother:  Response: Total 40 22 62 Unrelated 31 Brother 31 Attacked Not attacked Total

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 38

Example: Observed vs. Expected Counts

Background :If gender and lenswear were unrelated, we’d expect 44 females and 25 males with glasses.  Question: How different are the observed and expected counts of females and males with glasses? Total 163 69 214 446

M 42 37 85 164

F 121 32 129 282

C G N^ Total (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 40

Example: Observed vs. Expected Counts

Background :If gender and lenswear were unrelated, we’d expect 44 females and 25 males with glasses.  Response: Considerably _______ females and _______ males wore glasses, compared to what would be expected if there were no relationship. Total 163 69 214 446

M 42 37 85 164

F 121 32 129 282

C G N^ Total (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L6. 41

Confounding Variable in Categorical

Relationships

 If data in two-way table arise from observational study, consider possibility of confounding variables. Looking Back: Sampling and Design issues should always be considered before reporting summaries of single variables or relationships. (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 42

Example: Confounding Variables

Background : Survey results for full-time students:  Question: Is there a relationship between whether or not major is decided and living on or off campus?

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 44

Example: Confounding Variables

Background : Survey results for full-time students:  Response: (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 45

Example: Handling Confounding Variables

Background : Year at school may be confounding variable in relationship between major decided or not and living on or off campus.  Question: How should we handle the data? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 46

Example: Handling Confounding Variables

Background : Year at school may be confounding variable in relationship between major decided or not and living on or off campus.  Response: Separate according to year: 1st^ and 2nd (underclassmen) or 3rd^ and 4th^ (upperclassmen): For underclassmen, proportions on campus are virtually identical for those with major decided or undecided. (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L10. 47

Example: Confounding Variables

Background : Year at school may be confounding variable in relationship between major decided or not and living on or off campus.  Response: Separate according to year: 1st^ and 2nd (underclassmen) or 3rd^ and 4th^ (upperclassmen): For upperclassmen, proportions on campus are “pretty close” for those with major decided or undecided.

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L6. 53

Lecture Summary

(Categorical Relationships)

Two-Way Tables  Individual variables in margins  Relationship inside table  Summarize: Compare (conditional) proportions.  Display: Bar graph  Interpreting Results: How different are proportions?  Comparing Observed and Expected CountsConfounding Variables