SlideShare a Scribd company logo
Chapter 11 Section 2
• 11-2 Chi-squared (𝝌𝟐) Test for Independence
Test the claim that a student’s living
situation is independent of gender.
Live at
Home
Live on
own
Male 11 4
Female 13 8
The Chi–square (or 𝝌𝟐
) Family of Curves:
11.2 Chi Squared Test for Independence
• The chi squared test for independence tests whether two
categorical variables are independent of one another. The
data is often summarized in a contingency table.
• A contingency table is a two-way frequency table for
categorical data that has at least two rows and two columns.
Suppose a new postoperative
procedure is administered to a group
of patients at a particular hospital.
A large furniture retailer with
stores in three cities had the
following results from a special
weekend sale.
• Chi Square Test for Independence tests the null
hypothesis which states the variables in the rows
and columns are independent of one another.
Chi Squared Test for Independence
• Assumptions for Test of Goodness of Fit
1. Identify the variable and the level of measurement.
2. The data are obtained from a random sample.
3. The expected frequency for each category must be 5 or
more.
• The hypotheses are:
• H0: The two variables are independent (no relationship).
• H1: The two variables are dependent (there is a relationship the
two variables).
• If the null hypothesis is rejected, there is some relationship
between the variables.
Contingency Tables – Degrees of Freedom
• The degrees of freedom for any contingency table are
d.f. = (# rows – 1) (# columns – 1)
= (R – 1)(C – 1).
Don’t count the labels or the totals.
Example: Hospitals and Infections
A researcher wishes to see if there is a relationship between
the hospital and the type of patient infections. A sample of 3
hospitals was selected, and the number of infections for a
specific year has been reported. The data are shown next.
Degrees of freedom are calculated as:
(#rows – 1) x (# columns – 1)
Do not count labels or totals.
Example: Hospitals and Infections
Step 1: State the hypotheses and identify the claim.
H0: The type of infection is independent of the hospital.
H1: The type of infection is dependent on the hospital (claim).
Step 2: Find the critical value.
The critical value at α = 0.05
d.f. = (# rows – 1) x (# columns – 1)
= (3 – 1)(3 – 1) =(2)(2) = 4
we can use GeoGebra to find the CV (see next slide)
Step 0: Assumptions
Use GeoGebra to find the critical value
1) Select Chi-Squared distribution and enter the correct d.f.
2) Select right-tail test and enter your alpha value
In GeoGebra:
1) Select ChiSquared Test from the
Statistics tab
2) For this example there were 3
rows and 3 columns
3) You can label each column and
row in terms of what they represent.
4) Fill in the given information.
5) The degrees of freedom and 𝜒2
test value are summarized in the
results.
Note: You may click the expected
count if you want to see the
expected values.
Step 3: the Test value
The test value is being computed from the
formula: 𝜒2
=
𝑂 −𝐸 2
𝐸
. Slides showing how
to do it manually are at the end of the slide
show.
Step 4: Make the decision.
The decision is to reject the null hypothesis since
30.698 is in the critical region.
Step 5: Summarize the results.
There is enough evidence to support the
claim that the type of infection is related to
the hospital where they occurred.
First recall our
hypotheses:
Example: Alcohol and Gender
A researcher wishes to determine whether there is a
relationship between the gender of an individual and the
amount of alcohol consumed.
A sample of 68 people is selected, and the following data are
obtained.
At α= 0.10 can the researcher conclude that alcohol
consumption is related to gender?
Alcohol Consumption
Gender Low Moderate High Total
Male 10 9 8 27
Female 13 16 12 41
Total 23 25 20 68
Example: Alcohol and Gender
Step 1: State the hypotheses and identify the claim.
H0: The amount of alcohol that a person consumes is
independent of the individual’s gender.
H1: The amount of alcohol that a person consumes is
dependent on the individual’s gender (claim).
Step 2: Find the critical value.
d.f. (2 – 1)(3 – 1) = 2
CV: 𝜒2= 4.6052
Step 0: Assumptions
Example: Alcohol and Gender
Step 3: Find the critical value.
Example: Alcohol and Gender
Step 3: Compute the test value. 𝜒2 = 0.2809 from GeoGebra
Step 4: Make the decision.
Do not reject the null hypothesis
Step 5: Summarize the results.
There is not enough evidence to support the claim
that the amount of alcohol a person consumes is
dependent on the individual’s gender.
The following slides shows how the test
value for a chi-squared test for
independence is calculated manually. The
example used to demonstrate this process
is the hospitals and infections example.
In order to test the null hypothesis, one must compute
the expected frequencies, assuming the null hypothesis
is true.
Example: Hospitals and Infections
First compute the expected values:
  
row sum column sum
grand total

E
Let’s see where these calculated values end up on the next slide.
Example: Hospitals and Infections
Observed vs Expected
Example: Hospitals and Infections
Step 3: Compute the test value.

More Related Content

Similar to Ch 11.2 Chi Squared Test for Independence.pptx

Statistics practice for finalBe sure to review the following.docx
Statistics practice for finalBe sure to review the following.docxStatistics practice for finalBe sure to review the following.docx
Statistics practice for finalBe sure to review the following.docxdessiechisomjj4
 
Chi Square Goodness of fit test 2021 (2).pptx
Chi Square Goodness of fit test 2021 (2).pptxChi Square Goodness of fit test 2021 (2).pptx
Chi Square Goodness of fit test 2021 (2).pptxlushomo3
 
Statr session 17 and 18
Statr session 17 and 18Statr session 17 and 18
Statr session 17 and 18Ruru Chowdhury
 
Statr session 17 and 18 (ASTR)
Statr session 17 and 18 (ASTR)Statr session 17 and 18 (ASTR)
Statr session 17 and 18 (ASTR)Ruru Chowdhury
 
This is my statistics exam I need help I have been lost this whole s.docx
This is my statistics exam I need help I have been lost this whole s.docxThis is my statistics exam I need help I have been lost this whole s.docx
This is my statistics exam I need help I have been lost this whole s.docxdivinapavey
 
Categorical Data and Statistical Analysis
Categorical Data and Statistical AnalysisCategorical Data and Statistical Analysis
Categorical Data and Statistical AnalysisMichael770443
 
Chi square tests using SPSS
Chi square tests using SPSSChi square tests using SPSS
Chi square tests using SPSSParag Shah
 
hypothesis test
 hypothesis test hypothesis test
hypothesis testUnsa Shakir
 
Chi square tests using spss
Chi square tests using spssChi square tests using spss
Chi square tests using spssParag Shah
 
Lecture 7 Hypothesis testing.pptx
Lecture 7 Hypothesis testing.pptxLecture 7 Hypothesis testing.pptx
Lecture 7 Hypothesis testing.pptxshakirRahman10
 
Ch8 Chi-Square Procedures
Ch8 Chi-Square ProceduresCh8 Chi-Square Procedures
Ch8 Chi-Square ProceduresFarhan Alfin
 

Similar to Ch 11.2 Chi Squared Test for Independence.pptx (20)

Statistics practice for finalBe sure to review the following.docx
Statistics practice for finalBe sure to review the following.docxStatistics practice for finalBe sure to review the following.docx
Statistics practice for finalBe sure to review the following.docx
 
Chi Square Goodness of fit test 2021 (2).pptx
Chi Square Goodness of fit test 2021 (2).pptxChi Square Goodness of fit test 2021 (2).pptx
Chi Square Goodness of fit test 2021 (2).pptx
 
Statr session 17 and 18
Statr session 17 and 18Statr session 17 and 18
Statr session 17 and 18
 
Statr session 17 and 18 (ASTR)
Statr session 17 and 18 (ASTR)Statr session 17 and 18 (ASTR)
Statr session 17 and 18 (ASTR)
 
This is my statistics exam I need help I have been lost this whole s.docx
This is my statistics exam I need help I have been lost this whole s.docxThis is my statistics exam I need help I have been lost this whole s.docx
This is my statistics exam I need help I have been lost this whole s.docx
 
Categorical Data and Statistical Analysis
Categorical Data and Statistical AnalysisCategorical Data and Statistical Analysis
Categorical Data and Statistical Analysis
 
Chi square mahmoud
Chi square mahmoudChi square mahmoud
Chi square mahmoud
 
Contingency Tables
Contingency TablesContingency Tables
Contingency Tables
 
Chi square tests using SPSS
Chi square tests using SPSSChi square tests using SPSS
Chi square tests using SPSS
 
hypothesis test
 hypothesis test hypothesis test
hypothesis test
 
chapter18.ppt
chapter18.pptchapter18.ppt
chapter18.ppt
 
chapter18.ppt
chapter18.pptchapter18.ppt
chapter18.ppt
 
chi sqare test.ppt
chi sqare test.pptchi sqare test.ppt
chi sqare test.ppt
 
chapter18.ppt
chapter18.pptchapter18.ppt
chapter18.ppt
 
Chi square tests using spss
Chi square tests using spssChi square tests using spss
Chi square tests using spss
 
Sampling theory
Sampling theorySampling theory
Sampling theory
 
Lecture 7 Hypothesis testing.pptx
Lecture 7 Hypothesis testing.pptxLecture 7 Hypothesis testing.pptx
Lecture 7 Hypothesis testing.pptx
 
Thesigntest
ThesigntestThesigntest
Thesigntest
 
Goodness of Fit Notation
Goodness of Fit NotationGoodness of Fit Notation
Goodness of Fit Notation
 
Ch8 Chi-Square Procedures
Ch8 Chi-Square ProceduresCh8 Chi-Square Procedures
Ch8 Chi-Square Procedures
 

More from BAGARAGAZAROMUALD2

More from BAGARAGAZAROMUALD2 (12)

water-13-00495-v3.pdf
water-13-00495-v3.pdfwater-13-00495-v3.pdf
water-13-00495-v3.pdf
 
AssessingNormalityandDataTransformations.ppt
AssessingNormalityandDataTransformations.pptAssessingNormalityandDataTransformations.ppt
AssessingNormalityandDataTransformations.ppt
 
5116427.ppt
5116427.ppt5116427.ppt
5116427.ppt
 
240-design.ppt
240-design.ppt240-design.ppt
240-design.ppt
 
Remote Sensing_2020-21 (1).pdf
Remote Sensing_2020-21  (1).pdfRemote Sensing_2020-21  (1).pdf
Remote Sensing_2020-21 (1).pdf
 
Szeliski_NLS1.ppt
Szeliski_NLS1.pptSzeliski_NLS1.ppt
Szeliski_NLS1.ppt
 
AssessingNormalityandDataTransformations.ppt
AssessingNormalityandDataTransformations.pptAssessingNormalityandDataTransformations.ppt
AssessingNormalityandDataTransformations.ppt
 
18-21 Principles of Least Squares.ppt
18-21 Principles of Least Squares.ppt18-21 Principles of Least Squares.ppt
18-21 Principles of Least Squares.ppt
 
lecture12.ppt
lecture12.pptlecture12.ppt
lecture12.ppt
 
Chi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.pptChi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.ppt
 
StatWRLecture6.ppt
StatWRLecture6.pptStatWRLecture6.ppt
StatWRLecture6.ppt
 
Corr-and-Regress.ppt
Corr-and-Regress.pptCorr-and-Regress.ppt
Corr-and-Regress.ppt
 

Recently uploaded

一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单ukgaet
 
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...elinavihriala
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESSubhajit Sahu
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationBoston Institute of Analytics
 
Business update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIBusiness update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIAlejandraGmez176757
 
Using PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDBUsing PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDBAlireza Kamrani
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单ewymefz
 
Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...
Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...
Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...Domenico Conte
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单ocavb
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJames Polillo
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单ewymefz
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单enxupq
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay
 
Uber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis ReportUber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis ReportSatyamNeelmani2
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单vcaxypu
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样axoqas
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...John Andrews
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单ewymefz
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单enxupq
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单ewymefz
 

Recently uploaded (20)

一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
2024-05-14 - Tableau User Group - TC24 Hot Topics - Tableau Pulse and Einstei...
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
 
Business update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMIBusiness update Q1 2024 Lar España Real Estate SOCIMI
Business update Q1 2024 Lar España Real Estate SOCIMI
 
Using PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDBUsing PDB Relocation to Move a Single PDB to Another Existing CDB
Using PDB Relocation to Move a Single PDB to Another Existing CDB
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...
Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...
Professional Data Engineer Certification Exam Guide  _  Learn  _  Google Clou...
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
Jpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization SampleJpolillo Amazon PPC - Bid Optimization Sample
Jpolillo Amazon PPC - Bid Optimization Sample
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
Uber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis ReportUber Ride Supply Demand Gap Analysis Report
Uber Ride Supply Demand Gap Analysis Report
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 

Ch 11.2 Chi Squared Test for Independence.pptx

  • 1. Chapter 11 Section 2 • 11-2 Chi-squared (𝝌𝟐) Test for Independence Test the claim that a student’s living situation is independent of gender. Live at Home Live on own Male 11 4 Female 13 8 The Chi–square (or 𝝌𝟐 ) Family of Curves:
  • 2. 11.2 Chi Squared Test for Independence • The chi squared test for independence tests whether two categorical variables are independent of one another. The data is often summarized in a contingency table. • A contingency table is a two-way frequency table for categorical data that has at least two rows and two columns. Suppose a new postoperative procedure is administered to a group of patients at a particular hospital. A large furniture retailer with stores in three cities had the following results from a special weekend sale. • Chi Square Test for Independence tests the null hypothesis which states the variables in the rows and columns are independent of one another.
  • 3. Chi Squared Test for Independence • Assumptions for Test of Goodness of Fit 1. Identify the variable and the level of measurement. 2. The data are obtained from a random sample. 3. The expected frequency for each category must be 5 or more. • The hypotheses are: • H0: The two variables are independent (no relationship). • H1: The two variables are dependent (there is a relationship the two variables). • If the null hypothesis is rejected, there is some relationship between the variables.
  • 4. Contingency Tables – Degrees of Freedom • The degrees of freedom for any contingency table are d.f. = (# rows – 1) (# columns – 1) = (R – 1)(C – 1). Don’t count the labels or the totals.
  • 5. Example: Hospitals and Infections A researcher wishes to see if there is a relationship between the hospital and the type of patient infections. A sample of 3 hospitals was selected, and the number of infections for a specific year has been reported. The data are shown next. Degrees of freedom are calculated as: (#rows – 1) x (# columns – 1) Do not count labels or totals.
  • 6. Example: Hospitals and Infections Step 1: State the hypotheses and identify the claim. H0: The type of infection is independent of the hospital. H1: The type of infection is dependent on the hospital (claim). Step 2: Find the critical value. The critical value at α = 0.05 d.f. = (# rows – 1) x (# columns – 1) = (3 – 1)(3 – 1) =(2)(2) = 4 we can use GeoGebra to find the CV (see next slide) Step 0: Assumptions
  • 7. Use GeoGebra to find the critical value 1) Select Chi-Squared distribution and enter the correct d.f. 2) Select right-tail test and enter your alpha value
  • 8. In GeoGebra: 1) Select ChiSquared Test from the Statistics tab 2) For this example there were 3 rows and 3 columns 3) You can label each column and row in terms of what they represent. 4) Fill in the given information. 5) The degrees of freedom and 𝜒2 test value are summarized in the results. Note: You may click the expected count if you want to see the expected values. Step 3: the Test value The test value is being computed from the formula: 𝜒2 = 𝑂 −𝐸 2 𝐸 . Slides showing how to do it manually are at the end of the slide show.
  • 9. Step 4: Make the decision. The decision is to reject the null hypothesis since 30.698 is in the critical region. Step 5: Summarize the results. There is enough evidence to support the claim that the type of infection is related to the hospital where they occurred. First recall our hypotheses:
  • 10. Example: Alcohol and Gender A researcher wishes to determine whether there is a relationship between the gender of an individual and the amount of alcohol consumed. A sample of 68 people is selected, and the following data are obtained. At α= 0.10 can the researcher conclude that alcohol consumption is related to gender? Alcohol Consumption Gender Low Moderate High Total Male 10 9 8 27 Female 13 16 12 41 Total 23 25 20 68
  • 11. Example: Alcohol and Gender Step 1: State the hypotheses and identify the claim. H0: The amount of alcohol that a person consumes is independent of the individual’s gender. H1: The amount of alcohol that a person consumes is dependent on the individual’s gender (claim). Step 2: Find the critical value. d.f. (2 – 1)(3 – 1) = 2 CV: 𝜒2= 4.6052 Step 0: Assumptions
  • 12. Example: Alcohol and Gender Step 3: Find the critical value.
  • 13. Example: Alcohol and Gender Step 3: Compute the test value. 𝜒2 = 0.2809 from GeoGebra Step 4: Make the decision. Do not reject the null hypothesis Step 5: Summarize the results. There is not enough evidence to support the claim that the amount of alcohol a person consumes is dependent on the individual’s gender.
  • 14. The following slides shows how the test value for a chi-squared test for independence is calculated manually. The example used to demonstrate this process is the hospitals and infections example. In order to test the null hypothesis, one must compute the expected frequencies, assuming the null hypothesis is true.
  • 15. Example: Hospitals and Infections First compute the expected values:    row sum column sum grand total  E Let’s see where these calculated values end up on the next slide.
  • 16. Example: Hospitals and Infections Observed vs Expected
  • 17. Example: Hospitals and Infections Step 3: Compute the test value.