SlideShare a Scribd company logo
Elementary Statistics
Chapter 11:
Goodness-of-Fit and
Contingency Tables
11.2 Contingency Tables
1
Chapter 11:
Goodness-of-Fit and Contingency Tables
11.1 Goodness-of-Fit
11.2 Contingency Tables
2
Objectives:
1 Test a distribution for goodness of fit, using chi-square.
2 Test two variables for independence, using chi-square.
3 Test proportions for homogeneity, using chi-square.
3
11.2 Contingency Tables
Contingency Table: A contingency table (or two-way frequency table) is a table consisting of
frequency counts of categorical data corresponding to two different variables. (One variable is used to
categorize rows, and a second variable is used to categorize columns.)
When data can be tabulated in table form in terms of frequencies, several types of hypotheses can
be tested by using the chi-square test.
Test of Independence (of variables):
 In a test of independence, we test the null hypothesis that in a contingency table, the row and
column variables are independent. (That is, there is no dependency between the row variable and the
column variable.)
 The Test of Independence of Variables is used to determine whether two variables are
independent of or related to each other when a single sample is selected.
Chi-Square Test of Homogeneity: (Test of Homogeneity of Proportions)
A chi-square test of homogeneity is a test of the claim that different populations have the same
proportions of some characteristics.
The Test of Homogeneity of Proportions is used to determine whether the
proportions for a variable are equal when several samples are selected from different
populations.
4
11.2 Contingency Tables Objective, Notation & Requirements
Conduct a hypothesis test of independence between the row variable and column variable in a contingency table.
O represents the observed frequency in a cell of a contingency table.
E represents the expected frequency in a cell, found by assuming that the row and column variables are
independent.
r represents the number of rows in a contingency table (not including labels or row totals).
c represents the number of columns in a contingency table (not including labels or column totals).
Requirements
1. The sample data are randomly selected.
2. The sample data are represented as frequency counts in a two-way table.
3. For every cell in the contingency table, the expected frequency E is at least 5. (There is no requirement that
every observed frequency must be at least 5.)
H0: The row and column variables are independent. (There is no relationship between two variables.)
H1: The row and column variables are dependent. (There is a relationship between two variables.)
4. The critical values are found in Chi-Square Table (𝜒2
− 𝑇𝑎𝑏𝑙𝑒), Df = (r − 1) (c − 1)
where r is the number of rows and c is the number of columns.
2. Tests of independence with a contingency table are always right-tailed.
𝑇𝑆: 𝜒2
=
𝑂 − 𝐸 2
𝐸
𝑑𝑓 = (𝑟 − 1)(𝑐 − 1)
𝐸 =
(row sum)(cloumn sum)
grand total
TI Calculator:
Contingency Table
1. Access Matrix (2nd & Press
𝒙−𝟏
)
2. Edit, Enter Dimensions &
cell entries
3. Stat
4. Tests
5. 𝝌𝟐
− 𝑻𝒆𝒔𝒕
6. Observed Matrix must be A
7. Calculate
Note:
Matrix B gets populated as
Expected Matrix
5
11.2 Contingency Tables
d.f. = (rows – 1) (columns – 1) = (R – 1)(C – 1)
Test Statistic:
2
2 ( )
O E
E


 
d.f. = (R – 1)(C – 1)
O = observed frequency
E = expected frequency :
𝐸 =
(row sum)(cloumn sum)
grand total
6
The cells of this table contain frequency counts.
The frequency counts are the observed values, and
the expected values are shown in parentheses. The
row variable identifies the treatment used for a
stress fracture in a foot bone, and the column
variable identifies the outcome as a success or
failure. Refer to the table and find the expected
frequency for the cell in the first row and first
column, where the observed frequency is 54.
Example 1: 11.2 Contingency Tables: Finding Expected Frequency
blank Success Failure
Surgery 54(E = 47.478) 12(E = 18.522)
Weight-Bearing Cast 41(E = 66.182) 51(E = 25.818)
Non-Weight-Bearing Cast
for 6 Weeks
70(E = 52.514) 3(E = 20.486)
Non-Weight-Bearing Cast
for Less Than 6 Weeks
17(E = 15.826) 5(E = 6.174)
𝑂 = 54 → 𝐸
=
(66)(182)
253
Total: Sum =182 Sum = 71
66
92
73
22
253
= 47.478
Interpretation:
Assuming that success is independent of the
treatment, then we expect to find that 47.478 of
the subjects would be treated with surgery and that
treatment would be successful. There is a
discrepancy between O = 54 and E = 47.478, and
such discrepancies are key components of the test
statistic that is a collective measure of the overall
disagreement between the observed frequencies
and the frequencies expected with independence
between the row and column variables.
𝐸 =
(row sum)(column sum)
grand total
Note: 𝐸 𝑖𝑛 𝑟𝑜𝑤𝑠 𝑎𝑛𝑑 𝑐𝑜𝑙𝑢𝑚𝑛𝑠 𝑎𝑟𝑒
𝑐𝑜𝑛𝑠𝑖𝑠𝑡𝑒𝑛𝑡.
Example: Row 1: 47.478 + 18.2522 ≈ 66
Example 2:
Test of Independence
7
Step 1: H0: Success is independent of the treatment. (Claim)
H1: Success and the treatment are dependent. RTT
Step 3: df = (4 − 1)(2 − 1) = 3 & α = 0.05
=
(54 − 47.4782)2
47.4782
+. . . +
(5 − 6.1742)2
6.1742
Step 4: Decision:
a. Reject H0
b. The claim is False
c. There is NOT sufficient evidence
to support the claim that success
of the treatment is independent of
the type of treatment.
= 58.393
Use the same sample data from the previous example with a 0.05 significance level
to test the claim that success of the treatment is independent of the type of
treatment. What does the result indicate about the increasing trend to use surgery?
REQUIREMENT CHECK:
1. On the basis of the study
description, let’s assume random
selection & assignment of
subjects to the different treatment
groups. 2. Results
are frequency counts. 3. E > 5
for all. (lowest = 6.174.)
OR: P-Value from 𝜒2 − Table:
TS: 𝜒2 = 58.393 > highest value (12.838) in Table →P-value < 0.005.
Interpretation: Success is dependent on the
treatment and the success rates of 81.8%
(54/54+12 or 66), 44.6% (41/92), 95.9%
(70/73), and 77.3% (17/22) suggest that the
best treatment is to use a non–weight-
bearing cast for 6 weeks. These results
suggest that the increasing use of surgery is
a treatment strategy that is not supported by
the evidence. (from the table of example 1)
Step 1: H0 , H1, claim & Tails
Step 2: TS Calculate (TS)
Step 3: CV using α
Step 4: Make the decision to
a. Reject or not H0
b. The claim is true or false
c. Restate this decision: There
is / is not sufficient evidence
to support the claim that…
→ CV: 𝜒2 = 7.815
TI Calculator:
Contingency Table
1. Access Matrix (2nd & Press
𝒙−𝟏
)
2. Edit, Enter Dimensions &
cell entries
3. Stat
4. Tests
5. 𝝌𝟐
− 𝑻𝒆𝒔𝒕
6. Observed Matrix must be A
7. Calculate
𝑻𝑺: 𝜒2
=
𝑂 − 𝐸 2
𝐸
𝑑𝑓 = (𝑟 − 1)(𝑐 − 1)
Step 2: 𝑻𝑺: 𝜒2
=
𝑂−𝐸 2
𝐸
𝑑𝑓 = (𝑟 − 1)(𝑐 − 1)
8
Example 3: Test of Independence of Variables
A random sample of 3 hospitals was selected, and the number of
infections for a specific year has been reported. Test the claim that
there is a relationship between the hospital and the number of patient
infections. (Number of patient infections depends on the hospital).
TI Calculator:
Contingency Table
1. Access Matrix (2nd & Press
𝒙−𝟏
)
2. Edit, Enter Dimensions &
cell entries
3. Stat
4. Tests
5. 𝝌𝟐
− 𝑻𝒆𝒔𝒕
6. Observed Matrix must be A
7. Calculate
Note:
Matrix B gets populated as
Expected Matrix
𝐸 =
(row sum)(column sum)
grand total
9
Example 3 Continued:
Step 1: H0: The number of infections is
independent of the hospital.
H1: The number of infections is
dependent on the hospital (claim),
RTT
Step 3: df = (3 – 1)(3 – 1)
= 4 & α = 0.05
Step 4: Decision:
a. Reject H0
b. The claim is True
c. There is sufficient evidence to support the claim that the
number of infections is related to the hospital where they
occurred.
→ CV: 𝜒2 = 9.488
𝑇𝑆: 𝜒2
=
𝑂 − 𝐸 2
𝐸
𝑑𝑓 = (𝑟 − 1)(𝑐 − 1)
Step 2: 𝑻𝑺: 𝜒2
=
𝑂−𝐸 2
𝐸
𝑑𝑓 = (𝑟 − 1)(𝑐 − 1)
CV TS
10
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?
Example 4: Test of
Independence of Variables
𝐸1,1 =
27 23
68
= 9.13
Gender
Alcohol Consumption
Total
Low Moderate High
Male
10 9 8
27
Female
13 16 12
41
Total 23 25 20 68
(9.13) (9.93) (7.94)
(13.87) (15.07) (12.06)
=
10 − 9.13 2
9.13
+
9 − 9.93 2
9.93
+
8 − 7.94 2
7.94
+
13 − 13.87 2
13.87
+
16 − 15.07 2
15.07
+
12 − 12.06 2
12.06
= 0.283
Step 1: 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), RTT
Step 3: df = (2 – 1 )(3 – 1)
= 2 & α = 0.10
→ CV: 𝜒2
= 4.605
Step 4: Decision:
a. Do not Reject H0
b. The claim is False
c. There is not sufficient evidence to support the claim that the amount
of alcohol a person consumes is dependent on the individual’s gender.
𝑇𝑆: 𝜒2
=
𝑂 − 𝐸 2
𝐸
𝑑𝑓 = (𝑟 − 1)(𝑐 − 1)
𝐸 =
(row sum)(column sum)
grand total
Step 2: 𝑻𝑺: 𝜒2
=
𝑂−𝐸 2
𝐸
𝑑𝑓 = (𝑟 − 1)(𝑐 − 1)
TS: χ² = CV: χ² =
11
11.2 Contingency Tables: Test for Homogeneity of Proportions
Contingency Tables: Chi-Square Test of Homogeneity:
A chi-square test of homogeneity is a test of the claim that different populations
have the same proportions of some characteristics.
Assumptions for Homogeneity of Proportions:
In conducting a test of homogeneity, we can use the same notation, requirements, test statistic, critical
value, and procedures given previously, with this exception: Instead of testing the null hypothesis of
independence between the row and column variables, we test the null hypothesis that the different
populations have the same proportion of some characteristic.
1. The data are obtained from a random sample.
2. The expected frequency for each category must be 5 or more.
In a typical test of independence, sample subjects are randomly selected from one
population and values of two different variables are observed.
In a typical chi-square test of Homogeneity, subjects are randomly selected from different
populations separately. We test the null hypothesis that the different populations
have the same proportion of some characteristic.
REQUIREMENT CHECK
(1) Based on the description of the study, we will treat the subjects as being randomly selected and
randomly assigned to the different cities.
(2) The results are expressed as frequency counts.
(3) The expected frequencies are all at least 5. (All expected values are either 5.625 or 6.375.) The
requirements are satisfied.
12
This table lists results from an experiment in which 12 wallets were intentionally
lost in each of 16 different cities, including New York City, London,
Amsterdam, and so on. Use a 0.05 significance level with the data to test the null
hypothesis that the cities have the same proportion of returned wallets. (Note:
This Lost Wallet Test” implies that whether a wallet is returned is dependent on
the city in which it was lost.) Test the claim that the proportion of returned
wallets is not the same in the 16 different cities.
City (16) A B C D E F G H I J K L M N O P
Wallet
Returned
8 5 7 11 5 8 6 7 3 1 4 2 4 6 4 9
Wallet Not
Returned
4 7 5 1 7 4 6 5 9 11 8 10 8 6 8 3
Example 5:
Test of
Homogeneity
13
Example 5 Continued:
Step 1: H0: Whether a lost wallet is returned is independent of the city
in which it was lost. (p1 = p2 = p3 = … = pn), Claim
H1: A lost wallet being returned depends on the city in which it was
lost. (At least one proportion is different from the others), RTT
Step 3: df = (16 – 1 )(2 – 1) = 15 & α = 0.05
Step 4: Decision:
a. Reject H0, (Reject independence)
b. The claim is False
c. There is not sufficient evidence to support the claim that the
proportion of returned wallets is independent of the city in
which it was lost. (The proportion of returned wallets
depends on the city in which they were lost.) (There is
sufficient evidence to conclude that the proportion of
returned wallets is not the same in the 16 different cities.)
P-value = 0.002
χ² = 35.388
CV : χ² = 24.996 TS: χ² = 35.388
→ CV: 𝜒2 = 24.996
𝑇𝑆: 𝜒2
=
𝑂 − 𝐸 2
𝐸
𝑑𝑓 = (𝑟 − 1)(𝑐 − 1)
Step 2: 𝑻𝑺: 𝜒2
=
𝑂−𝐸 2
𝐸
𝑑𝑓 = (𝑟 − 1)(𝑐 − 1)
TI Calculator:
Contingency Table
1. Access Matrix (2nd & Press
𝒙−𝟏
)
2. Edit, Enter Dimensions &
cell entries
3. Stat
4. Tests
5. 𝝌𝟐
− 𝑻𝒆𝒔𝒕
6. Observed Matrix must be A
7. Calculate
Note:
Matrix B gets populated as
Expected Matrix
14
Example 6: Test of Homogeneity
100 people were selected from 4 income groups. They were asked if
they were “very happy.” The percent for each group who responded
yes and the number from the survey are shown in the table. At α =
0.05 test the claim that there is no difference in the proportions.
𝑬 =
𝒏
𝒌
=
𝟒𝟎𝟎
𝟒
= 𝟏𝟎𝟎
𝐸 =
(row sum)(column sum)
grand total
TI Calculator:
Contingency Table
1. Access Matrix (2nd & Press 𝒙−𝟏
)
2. Edit, Enter Dimensions & cell
entries
3. Stat
4. Tests
5. 𝝌𝟐
− 𝑻𝒆𝒔𝒕
6. Observed Matrix must be A
7. Calculate
Note:
Matrix B gets populated as Expected
Matrix
15
Example 6:
Step 1: H0: p1 = p2 = p3 = p4 , Claim
H1: At least one of the proportions differs from the other. RTT
Step 3: df = (2 – 1)(4 – 1) = 3 & α = 0.05
Step 4: Decision:
a. Reject H0
b. The claim is False
c. There is not enough evidence to support the claim that
there is no difference in the proportions. Hence the
incomes seem to make a difference in the proportions.
χ² = 14.149
→ CV: 𝜒2
= 7.815
TI Calculator:
Contingency Table
1. Access Matrix (2nd & Press 𝒙−𝟏
)
2. Edit, Enter Dimensions & cell
entries
3. Stat
4. Tests
5. 𝝌𝟐
− 𝑻𝒆𝒔𝒕
6. Observed Matrix must be A
7. Calculate
Note:
Matrix B gets populated as Expected
Matrix
𝑇𝑆: 𝜒2
=
𝑂 − 𝐸 2
𝐸
𝑑𝑓 = (𝑟 − 1)(𝑐 − 1)
Step 2: 𝑻𝑺: 𝜒2
=
𝑂−𝐸 2
𝐸
𝑑𝑓 = (𝑟 − 1)(𝑐 − 1)
CV: TS:
16
• Every cell must have an expected frequency of at least 5.
• Fisher’s Exact Test is often used for a 2 × 2 contingency table with one or more
expected frequencies that are below 5.
• Fisher’s exact test provides an exact P-value.
• Because the calculations are quite complex, it’s a good idea to use technology.
11.2 Contingency Tables, Fisher’s Exact Test (Skip)
Example 7: The MythBusters show on the Discovery Channel tested the theory that when
someone yawns, others are more likely to yawn. The results are summarized below.
Blank Subject Exposed
to Yawning?
Yes
Subject Exposed
to Yawning?
No
Did Subject Yawn? Yes 10 4
Did Subject Yawn? No 24 12
Using Fisher’s exact test results in
a P-value of 0.513, so there is not
sufficient evidence to support the
myth that people exposed to
yawning actually yawn more than
those not exposed to yawning.
17
For 2 × 2 tables consisting of frequency counts that result from matched pairs,
the frequency counts within each matched pair are not independent and, for
such cases, we can use McNemar’s Test of the null hypothesis that the
frequencies from the discordant (different) categories occur in the same
proportion.
11.2 Contingency Tables, McNemar’s Test for Matched Pairs (Skip)
Blank Treatment X:
Cured
Treatment X:
Not Cured
Treatment Y: Cured a b
Treatment Y: Not Cured c d
McNemar’s test requires that for a table as shown, the frequencies are such that
b + c ≥ 10. The test is a right-tailed chi-square test with the following test
statistic:
𝑇𝑆: 𝜒2 =
𝑏 − 𝑐 − 1 2
𝑏 + 𝑐
18
Example 8:
Are Hip Protector’s Effective? A randomized
controlled trial was designed to test the
effectiveness of hip protectors in preventing
hip fractures in the elderly. Nursing home
residents each wore protection on one hip, but
not the other. Results are as follows.
Blank No Hip Protector
Worn:
No Hip Fracture
No Hip Protector Worn:
Hip Fracture
Hip Protector Worn:
No Hip Fracture
a = 309 b = 10
Hip Protector Worn:
Hip Fracture
c = 15 d = 2
McNemar’s Test can be used to test the null hypothesis that the following two proportions are the same:
• The proportion of subjects with no hip fracture on the protected hip and a hip fracture on the
unprotected hip.
• The proportion of subjects with a hip fracture on the protected hip and no hip fracture on the
unprotected hip.
Solution: b = 10 and c = 15 𝑇𝑆: 𝜒2 =
𝑏 − 𝑐 − 1 2
𝑏 + 𝑐
=
10 − 15 − 1 2
10 + 15
= 0.640
α = 0.05 & df = (2 – 1)(2 – 1) = 1 → CV: 𝜒2
=3.841 for this right-tailed test.
𝑇𝑆: 𝜒2 = 0.640 does not exceed the critical value of χ² = 3.841, so we fail to reject the
null hypothesis. The proportion of hip fractures with the protectors worn is not
significantly different from the proportion of hip fractures without the protectors worn.

More Related Content

What's hot

Student's T-test, Paired T-Test, ANOVA & Proportionate Test
Student's T-test, Paired T-Test, ANOVA & Proportionate TestStudent's T-test, Paired T-Test, ANOVA & Proportionate Test
Student's T-test, Paired T-Test, ANOVA & Proportionate Test
Azmi Mohd Tamil
 
Binomial probability distributions ppt
Binomial probability distributions pptBinomial probability distributions ppt
Binomial probability distributions pptTayab Ali
 
F test and ANOVA
F test and ANOVAF test and ANOVA
F test and ANOVA
Parag Shah
 
Different types of distributions
Different types of distributionsDifferent types of distributions
Different types of distributions
RajaKrishnan M
 
Introduction to the t test
Introduction to the t testIntroduction to the t test
Introduction to the t test
Sr Edith Bogue
 
Review & Hypothesis Testing
Review & Hypothesis TestingReview & Hypothesis Testing
Review & Hypothesis Testing
Sr Edith Bogue
 
Data Analysis with SPSS : One-way ANOVA
Data Analysis with SPSS : One-way ANOVAData Analysis with SPSS : One-way ANOVA
Data Analysis with SPSS : One-way ANOVADr Ali Yusob Md Zain
 
One-Way ANOVA
One-Way ANOVAOne-Way ANOVA
The Standard Normal Distribution
The Standard Normal Distribution  The Standard Normal Distribution
The Standard Normal Distribution
Long Beach City College
 
Probability Distributions
Probability Distributions Probability Distributions
Probability Distributions
Anthony J. Evans
 
Estimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or Variance Estimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or Variance
Long Beach City College
 
Testing of hypothesis
Testing of hypothesisTesting of hypothesis
Testing of hypothesis
RuchiJainRuchiJain
 
Point estimation
Point estimationPoint estimation
Point estimation
Shahab Yaseen
 
Statistical graphs
Statistical graphsStatistical graphs
Statistical graphs
John Rome Aranas
 
regression and correlation
regression and correlationregression and correlation
regression and correlation
Priya Sharma
 
Linear regression
Linear regressionLinear regression
Linear regression
vermaumeshverma
 
t test
t testt test
Point Estimation
Point EstimationPoint Estimation
Point Estimation
DataminingTools Inc
 

What's hot (20)

Student's T-test, Paired T-Test, ANOVA & Proportionate Test
Student's T-test, Paired T-Test, ANOVA & Proportionate TestStudent's T-test, Paired T-Test, ANOVA & Proportionate Test
Student's T-test, Paired T-Test, ANOVA & Proportionate Test
 
Binomial probability distributions ppt
Binomial probability distributions pptBinomial probability distributions ppt
Binomial probability distributions ppt
 
F test and ANOVA
F test and ANOVAF test and ANOVA
F test and ANOVA
 
Different types of distributions
Different types of distributionsDifferent types of distributions
Different types of distributions
 
Confidence Intervals
Confidence IntervalsConfidence Intervals
Confidence Intervals
 
Introduction to the t test
Introduction to the t testIntroduction to the t test
Introduction to the t test
 
Review & Hypothesis Testing
Review & Hypothesis TestingReview & Hypothesis Testing
Review & Hypothesis Testing
 
Data Analysis with SPSS : One-way ANOVA
Data Analysis with SPSS : One-way ANOVAData Analysis with SPSS : One-way ANOVA
Data Analysis with SPSS : One-way ANOVA
 
One-Way ANOVA
One-Way ANOVAOne-Way ANOVA
One-Way ANOVA
 
The Standard Normal Distribution
The Standard Normal Distribution  The Standard Normal Distribution
The Standard Normal Distribution
 
Probability Distributions
Probability Distributions Probability Distributions
Probability Distributions
 
Chi square mahmoud
Chi square mahmoudChi square mahmoud
Chi square mahmoud
 
Estimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or Variance Estimating a Population Standard Deviation or Variance
Estimating a Population Standard Deviation or Variance
 
Testing of hypothesis
Testing of hypothesisTesting of hypothesis
Testing of hypothesis
 
Point estimation
Point estimationPoint estimation
Point estimation
 
Statistical graphs
Statistical graphsStatistical graphs
Statistical graphs
 
regression and correlation
regression and correlationregression and correlation
regression and correlation
 
Linear regression
Linear regressionLinear regression
Linear regression
 
t test
t testt test
t test
 
Point Estimation
Point EstimationPoint Estimation
Point Estimation
 

Similar to Contingency Tables

Goodness of-fit
Goodness of-fit  Goodness of-fit
Goodness of-fit
Long Beach City College
 
Practice test ch 10 correlation reg ch 11 gof ch12 anova
Practice test ch 10 correlation reg ch 11 gof ch12 anovaPractice test ch 10 correlation reg ch 11 gof ch12 anova
Practice test ch 10 correlation reg ch 11 gof ch12 anova
Long Beach City College
 
Chi square
Chi square Chi square
Chi square
HemamaliniSakthivel
 
Chi square test social research refer.ppt
Chi square test social research refer.pptChi square test social research refer.ppt
Chi square test social research refer.ppt
Snehamurali18
 
Chapter 11 Chi-Square Tests and ANOVA 359 Chapter .docx
Chapter 11 Chi-Square Tests and ANOVA  359 Chapter .docxChapter 11 Chi-Square Tests and ANOVA  359 Chapter .docx
Chapter 11 Chi-Square Tests and ANOVA 359 Chapter .docx
bartholomeocoombs
 
One way AVOVA
One way AVOVA  One way AVOVA
One way AVOVA
Long Beach City College
 
Parametric & non parametric
Parametric & non parametricParametric & non parametric
Parametric & non parametric
ANCYBS
 
Chi square test
Chi square testChi square test
Chi square test
Nayna Azad
 
Contingency Table Test, M. Asad Hayat, UET Taxila
Contingency Table Test, M. Asad Hayat, UET TaxilaContingency Table Test, M. Asad Hayat, UET Taxila
Contingency Table Test, M. Asad Hayat, UET Taxila
Muhammad Warraich
 
Chi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.pptChi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.ppt
BAGARAGAZAROMUALD2
 
Chi square test
Chi square testChi square test
Chi square test
AmanRathore54
 
Chisquare
ChisquareChisquare
Chisquare
keerthi samuel
 
Chapter12
Chapter12Chapter12
Chapter12
Richard Ferreria
 
Factorial Experiments
Factorial ExperimentsFactorial Experiments
Factorial Experiments
HelpWithAssignment.com
 
Linear Modeling Survival Analysis Statistics Assignment Help
Linear Modeling Survival Analysis Statistics Assignment HelpLinear Modeling Survival Analysis Statistics Assignment Help
Linear Modeling Survival Analysis Statistics Assignment Help
Statistics Assignment Experts
 
Chisquare Test of Association.pdf in biostatistics
Chisquare Test of Association.pdf in biostatisticsChisquare Test of Association.pdf in biostatistics
Chisquare Test of Association.pdf in biostatistics
muhammadahmad00495
 
Chi square
Chi squareChi square
Chi square
PoojaVishnoi7
 
Categorical Data and Statistical Analysis
Categorical Data and Statistical AnalysisCategorical Data and Statistical Analysis
Categorical Data and Statistical Analysis
Michael770443
 
Overview of Advance Marketing Research
Overview of Advance Marketing ResearchOverview of Advance Marketing Research
Overview of Advance Marketing Research
Enamul Islam
 

Similar to Contingency Tables (20)

Goodness of-fit
Goodness of-fit  Goodness of-fit
Goodness of-fit
 
Practice test ch 10 correlation reg ch 11 gof ch12 anova
Practice test ch 10 correlation reg ch 11 gof ch12 anovaPractice test ch 10 correlation reg ch 11 gof ch12 anova
Practice test ch 10 correlation reg ch 11 gof ch12 anova
 
Chi square
Chi square Chi square
Chi square
 
Chi square test social research refer.ppt
Chi square test social research refer.pptChi square test social research refer.ppt
Chi square test social research refer.ppt
 
Chapter 11 Chi-Square Tests and ANOVA 359 Chapter .docx
Chapter 11 Chi-Square Tests and ANOVA  359 Chapter .docxChapter 11 Chi-Square Tests and ANOVA  359 Chapter .docx
Chapter 11 Chi-Square Tests and ANOVA 359 Chapter .docx
 
Chi square test
Chi square testChi square test
Chi square test
 
One way AVOVA
One way AVOVA  One way AVOVA
One way AVOVA
 
Parametric & non parametric
Parametric & non parametricParametric & non parametric
Parametric & non parametric
 
Chi square test
Chi square testChi square test
Chi square test
 
Contingency Table Test, M. Asad Hayat, UET Taxila
Contingency Table Test, M. Asad Hayat, UET TaxilaContingency Table Test, M. Asad Hayat, UET Taxila
Contingency Table Test, M. Asad Hayat, UET Taxila
 
Chi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.pptChi-Square Presentation - Nikki.ppt
Chi-Square Presentation - Nikki.ppt
 
Chi square test
Chi square testChi square test
Chi square test
 
Chisquare
ChisquareChisquare
Chisquare
 
Chapter12
Chapter12Chapter12
Chapter12
 
Factorial Experiments
Factorial ExperimentsFactorial Experiments
Factorial Experiments
 
Linear Modeling Survival Analysis Statistics Assignment Help
Linear Modeling Survival Analysis Statistics Assignment HelpLinear Modeling Survival Analysis Statistics Assignment Help
Linear Modeling Survival Analysis Statistics Assignment Help
 
Chisquare Test of Association.pdf in biostatistics
Chisquare Test of Association.pdf in biostatisticsChisquare Test of Association.pdf in biostatistics
Chisquare Test of Association.pdf in biostatistics
 
Chi square
Chi squareChi square
Chi square
 
Categorical Data and Statistical Analysis
Categorical Data and Statistical AnalysisCategorical Data and Statistical Analysis
Categorical Data and Statistical Analysis
 
Overview of Advance Marketing Research
Overview of Advance Marketing ResearchOverview of Advance Marketing Research
Overview of Advance Marketing Research
 

More from Long Beach City College

Practice test ch 9 inferences from two samples
Practice test ch 9 inferences from two samplesPractice test ch 9 inferences from two samples
Practice test ch 9 inferences from two samples
Long Beach City College
 
Practice Test Ch 8 Hypothesis Testing
Practice Test Ch 8 Hypothesis TestingPractice Test Ch 8 Hypothesis Testing
Practice Test Ch 8 Hypothesis Testing
Long Beach City College
 
Solution to the practice test ch 10 correlation reg ch 11 gof ch12 anova
Solution to the practice test ch 10 correlation reg ch 11 gof ch12 anovaSolution to the practice test ch 10 correlation reg ch 11 gof ch12 anova
Solution to the practice test ch 10 correlation reg ch 11 gof ch12 anova
Long Beach City College
 
Practice test ch 8 hypothesis testing ch 9 two populations
Practice test ch 8 hypothesis testing ch 9 two populationsPractice test ch 8 hypothesis testing ch 9 two populations
Practice test ch 8 hypothesis testing ch 9 two populations
Long Beach City College
 
Solution to the practice test ch 8 hypothesis testing ch 9 two populations
Solution to the practice test ch 8 hypothesis testing ch 9 two populationsSolution to the practice test ch 8 hypothesis testing ch 9 two populations
Solution to the practice test ch 8 hypothesis testing ch 9 two populations
Long Beach City College
 
Solution to the Practice Test 3A, Chapter 6 Normal Probability Distribution
Solution to the Practice Test 3A, Chapter 6 Normal Probability DistributionSolution to the Practice Test 3A, Chapter 6 Normal Probability Distribution
Solution to the Practice Test 3A, Chapter 6 Normal Probability Distribution
Long Beach City College
 
Practice Test Chapter 6 (Normal Probability Distributions)
Practice Test Chapter 6 (Normal Probability Distributions)Practice Test Chapter 6 (Normal Probability Distributions)
Practice Test Chapter 6 (Normal Probability Distributions)
Long Beach City College
 
Practice Test 2 Solutions
Practice Test 2  SolutionsPractice Test 2  Solutions
Practice Test 2 Solutions
Long Beach City College
 
Practice Test 2 Probability
Practice Test 2 ProbabilityPractice Test 2 Probability
Practice Test 2 Probability
Long Beach City College
 
Practice Test 1 solutions
Practice Test 1 solutions  Practice Test 1 solutions
Practice Test 1 solutions
Long Beach City College
 
Practice Test 1
Practice Test 1Practice Test 1
Practice Test 1
Long Beach City College
 
Stat sample test ch 12 solution
Stat sample test ch 12 solutionStat sample test ch 12 solution
Stat sample test ch 12 solution
Long Beach City College
 
Stat sample test ch 12
Stat sample test ch 12Stat sample test ch 12
Stat sample test ch 12
Long Beach City College
 
Stat sample test ch 11
Stat sample test ch 11Stat sample test ch 11
Stat sample test ch 11
Long Beach City College
 
Stat sample test ch 10
Stat sample test ch 10Stat sample test ch 10
Stat sample test ch 10
Long Beach City College
 
Two-Way ANOVA
Two-Way ANOVATwo-Way ANOVA
Two Variances or Standard Deviations
Two Variances or Standard DeviationsTwo Variances or Standard Deviations
Two Variances or Standard Deviations
Long Beach City College
 
Two Means, Two Dependent Samples, Matched Pairs
Two Means, Two Dependent Samples, Matched PairsTwo Means, Two Dependent Samples, Matched Pairs
Two Means, Two Dependent Samples, Matched Pairs
Long Beach City College
 
Two Means, Independent Samples
Two Means, Independent SamplesTwo Means, Independent Samples
Two Means, Independent Samples
Long Beach City College
 
Inferences about Two Proportions
 Inferences about Two Proportions Inferences about Two Proportions
Inferences about Two Proportions
Long Beach City College
 

More from Long Beach City College (20)

Practice test ch 9 inferences from two samples
Practice test ch 9 inferences from two samplesPractice test ch 9 inferences from two samples
Practice test ch 9 inferences from two samples
 
Practice Test Ch 8 Hypothesis Testing
Practice Test Ch 8 Hypothesis TestingPractice Test Ch 8 Hypothesis Testing
Practice Test Ch 8 Hypothesis Testing
 
Solution to the practice test ch 10 correlation reg ch 11 gof ch12 anova
Solution to the practice test ch 10 correlation reg ch 11 gof ch12 anovaSolution to the practice test ch 10 correlation reg ch 11 gof ch12 anova
Solution to the practice test ch 10 correlation reg ch 11 gof ch12 anova
 
Practice test ch 8 hypothesis testing ch 9 two populations
Practice test ch 8 hypothesis testing ch 9 two populationsPractice test ch 8 hypothesis testing ch 9 two populations
Practice test ch 8 hypothesis testing ch 9 two populations
 
Solution to the practice test ch 8 hypothesis testing ch 9 two populations
Solution to the practice test ch 8 hypothesis testing ch 9 two populationsSolution to the practice test ch 8 hypothesis testing ch 9 two populations
Solution to the practice test ch 8 hypothesis testing ch 9 two populations
 
Solution to the Practice Test 3A, Chapter 6 Normal Probability Distribution
Solution to the Practice Test 3A, Chapter 6 Normal Probability DistributionSolution to the Practice Test 3A, Chapter 6 Normal Probability Distribution
Solution to the Practice Test 3A, Chapter 6 Normal Probability Distribution
 
Practice Test Chapter 6 (Normal Probability Distributions)
Practice Test Chapter 6 (Normal Probability Distributions)Practice Test Chapter 6 (Normal Probability Distributions)
Practice Test Chapter 6 (Normal Probability Distributions)
 
Practice Test 2 Solutions
Practice Test 2  SolutionsPractice Test 2  Solutions
Practice Test 2 Solutions
 
Practice Test 2 Probability
Practice Test 2 ProbabilityPractice Test 2 Probability
Practice Test 2 Probability
 
Practice Test 1 solutions
Practice Test 1 solutions  Practice Test 1 solutions
Practice Test 1 solutions
 
Practice Test 1
Practice Test 1Practice Test 1
Practice Test 1
 
Stat sample test ch 12 solution
Stat sample test ch 12 solutionStat sample test ch 12 solution
Stat sample test ch 12 solution
 
Stat sample test ch 12
Stat sample test ch 12Stat sample test ch 12
Stat sample test ch 12
 
Stat sample test ch 11
Stat sample test ch 11Stat sample test ch 11
Stat sample test ch 11
 
Stat sample test ch 10
Stat sample test ch 10Stat sample test ch 10
Stat sample test ch 10
 
Two-Way ANOVA
Two-Way ANOVATwo-Way ANOVA
Two-Way ANOVA
 
Two Variances or Standard Deviations
Two Variances or Standard DeviationsTwo Variances or Standard Deviations
Two Variances or Standard Deviations
 
Two Means, Two Dependent Samples, Matched Pairs
Two Means, Two Dependent Samples, Matched PairsTwo Means, Two Dependent Samples, Matched Pairs
Two Means, Two Dependent Samples, Matched Pairs
 
Two Means, Independent Samples
Two Means, Independent SamplesTwo Means, Independent Samples
Two Means, Independent Samples
 
Inferences about Two Proportions
 Inferences about Two Proportions Inferences about Two Proportions
Inferences about Two Proportions
 

Recently uploaded

Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 

Recently uploaded (20)

Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 

Contingency Tables

  • 1. Elementary Statistics Chapter 11: Goodness-of-Fit and Contingency Tables 11.2 Contingency Tables 1
  • 2. Chapter 11: Goodness-of-Fit and Contingency Tables 11.1 Goodness-of-Fit 11.2 Contingency Tables 2 Objectives: 1 Test a distribution for goodness of fit, using chi-square. 2 Test two variables for independence, using chi-square. 3 Test proportions for homogeneity, using chi-square.
  • 3. 3 11.2 Contingency Tables Contingency Table: A contingency table (or two-way frequency table) is a table consisting of frequency counts of categorical data corresponding to two different variables. (One variable is used to categorize rows, and a second variable is used to categorize columns.) When data can be tabulated in table form in terms of frequencies, several types of hypotheses can be tested by using the chi-square test. Test of Independence (of variables):  In a test of independence, we test the null hypothesis that in a contingency table, the row and column variables are independent. (That is, there is no dependency between the row variable and the column variable.)  The Test of Independence of Variables is used to determine whether two variables are independent of or related to each other when a single sample is selected. Chi-Square Test of Homogeneity: (Test of Homogeneity of Proportions) A chi-square test of homogeneity is a test of the claim that different populations have the same proportions of some characteristics. The Test of Homogeneity of Proportions is used to determine whether the proportions for a variable are equal when several samples are selected from different populations.
  • 4. 4 11.2 Contingency Tables Objective, Notation & Requirements Conduct a hypothesis test of independence between the row variable and column variable in a contingency table. O represents the observed frequency in a cell of a contingency table. E represents the expected frequency in a cell, found by assuming that the row and column variables are independent. r represents the number of rows in a contingency table (not including labels or row totals). c represents the number of columns in a contingency table (not including labels or column totals). Requirements 1. The sample data are randomly selected. 2. The sample data are represented as frequency counts in a two-way table. 3. For every cell in the contingency table, the expected frequency E is at least 5. (There is no requirement that every observed frequency must be at least 5.) H0: The row and column variables are independent. (There is no relationship between two variables.) H1: The row and column variables are dependent. (There is a relationship between two variables.) 4. The critical values are found in Chi-Square Table (𝜒2 − 𝑇𝑎𝑏𝑙𝑒), Df = (r − 1) (c − 1) where r is the number of rows and c is the number of columns. 2. Tests of independence with a contingency table are always right-tailed. 𝑇𝑆: 𝜒2 = 𝑂 − 𝐸 2 𝐸 𝑑𝑓 = (𝑟 − 1)(𝑐 − 1) 𝐸 = (row sum)(cloumn sum) grand total TI Calculator: Contingency Table 1. Access Matrix (2nd & Press 𝒙−𝟏 ) 2. Edit, Enter Dimensions & cell entries 3. Stat 4. Tests 5. 𝝌𝟐 − 𝑻𝒆𝒔𝒕 6. Observed Matrix must be A 7. Calculate Note: Matrix B gets populated as Expected Matrix
  • 5. 5 11.2 Contingency Tables d.f. = (rows – 1) (columns – 1) = (R – 1)(C – 1) Test Statistic: 2 2 ( ) O E E     d.f. = (R – 1)(C – 1) O = observed frequency E = expected frequency : 𝐸 = (row sum)(cloumn sum) grand total
  • 6. 6 The cells of this table contain frequency counts. The frequency counts are the observed values, and the expected values are shown in parentheses. The row variable identifies the treatment used for a stress fracture in a foot bone, and the column variable identifies the outcome as a success or failure. Refer to the table and find the expected frequency for the cell in the first row and first column, where the observed frequency is 54. Example 1: 11.2 Contingency Tables: Finding Expected Frequency blank Success Failure Surgery 54(E = 47.478) 12(E = 18.522) Weight-Bearing Cast 41(E = 66.182) 51(E = 25.818) Non-Weight-Bearing Cast for 6 Weeks 70(E = 52.514) 3(E = 20.486) Non-Weight-Bearing Cast for Less Than 6 Weeks 17(E = 15.826) 5(E = 6.174) 𝑂 = 54 → 𝐸 = (66)(182) 253 Total: Sum =182 Sum = 71 66 92 73 22 253 = 47.478 Interpretation: Assuming that success is independent of the treatment, then we expect to find that 47.478 of the subjects would be treated with surgery and that treatment would be successful. There is a discrepancy between O = 54 and E = 47.478, and such discrepancies are key components of the test statistic that is a collective measure of the overall disagreement between the observed frequencies and the frequencies expected with independence between the row and column variables. 𝐸 = (row sum)(column sum) grand total Note: 𝐸 𝑖𝑛 𝑟𝑜𝑤𝑠 𝑎𝑛𝑑 𝑐𝑜𝑙𝑢𝑚𝑛𝑠 𝑎𝑟𝑒 𝑐𝑜𝑛𝑠𝑖𝑠𝑡𝑒𝑛𝑡. Example: Row 1: 47.478 + 18.2522 ≈ 66
  • 7. Example 2: Test of Independence 7 Step 1: H0: Success is independent of the treatment. (Claim) H1: Success and the treatment are dependent. RTT Step 3: df = (4 − 1)(2 − 1) = 3 & α = 0.05 = (54 − 47.4782)2 47.4782 +. . . + (5 − 6.1742)2 6.1742 Step 4: Decision: a. Reject H0 b. The claim is False c. There is NOT sufficient evidence to support the claim that success of the treatment is independent of the type of treatment. = 58.393 Use the same sample data from the previous example with a 0.05 significance level to test the claim that success of the treatment is independent of the type of treatment. What does the result indicate about the increasing trend to use surgery? REQUIREMENT CHECK: 1. On the basis of the study description, let’s assume random selection & assignment of subjects to the different treatment groups. 2. Results are frequency counts. 3. E > 5 for all. (lowest = 6.174.) OR: P-Value from 𝜒2 − Table: TS: 𝜒2 = 58.393 > highest value (12.838) in Table →P-value < 0.005. Interpretation: Success is dependent on the treatment and the success rates of 81.8% (54/54+12 or 66), 44.6% (41/92), 95.9% (70/73), and 77.3% (17/22) suggest that the best treatment is to use a non–weight- bearing cast for 6 weeks. These results suggest that the increasing use of surgery is a treatment strategy that is not supported by the evidence. (from the table of example 1) Step 1: H0 , H1, claim & Tails Step 2: TS Calculate (TS) Step 3: CV using α Step 4: Make the decision to a. Reject or not H0 b. The claim is true or false c. Restate this decision: There is / is not sufficient evidence to support the claim that… → CV: 𝜒2 = 7.815 TI Calculator: Contingency Table 1. Access Matrix (2nd & Press 𝒙−𝟏 ) 2. Edit, Enter Dimensions & cell entries 3. Stat 4. Tests 5. 𝝌𝟐 − 𝑻𝒆𝒔𝒕 6. Observed Matrix must be A 7. Calculate 𝑻𝑺: 𝜒2 = 𝑂 − 𝐸 2 𝐸 𝑑𝑓 = (𝑟 − 1)(𝑐 − 1) Step 2: 𝑻𝑺: 𝜒2 = 𝑂−𝐸 2 𝐸 𝑑𝑓 = (𝑟 − 1)(𝑐 − 1)
  • 8. 8 Example 3: Test of Independence of Variables A random sample of 3 hospitals was selected, and the number of infections for a specific year has been reported. Test the claim that there is a relationship between the hospital and the number of patient infections. (Number of patient infections depends on the hospital). TI Calculator: Contingency Table 1. Access Matrix (2nd & Press 𝒙−𝟏 ) 2. Edit, Enter Dimensions & cell entries 3. Stat 4. Tests 5. 𝝌𝟐 − 𝑻𝒆𝒔𝒕 6. Observed Matrix must be A 7. Calculate Note: Matrix B gets populated as Expected Matrix 𝐸 = (row sum)(column sum) grand total
  • 9. 9 Example 3 Continued: Step 1: H0: The number of infections is independent of the hospital. H1: The number of infections is dependent on the hospital (claim), RTT Step 3: df = (3 – 1)(3 – 1) = 4 & α = 0.05 Step 4: Decision: a. Reject H0 b. The claim is True c. There is sufficient evidence to support the claim that the number of infections is related to the hospital where they occurred. → CV: 𝜒2 = 9.488 𝑇𝑆: 𝜒2 = 𝑂 − 𝐸 2 𝐸 𝑑𝑓 = (𝑟 − 1)(𝑐 − 1) Step 2: 𝑻𝑺: 𝜒2 = 𝑂−𝐸 2 𝐸 𝑑𝑓 = (𝑟 − 1)(𝑐 − 1) CV TS
  • 10. 10 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? Example 4: Test of Independence of Variables 𝐸1,1 = 27 23 68 = 9.13 Gender Alcohol Consumption Total Low Moderate High Male 10 9 8 27 Female 13 16 12 41 Total 23 25 20 68 (9.13) (9.93) (7.94) (13.87) (15.07) (12.06) = 10 − 9.13 2 9.13 + 9 − 9.93 2 9.93 + 8 − 7.94 2 7.94 + 13 − 13.87 2 13.87 + 16 − 15.07 2 15.07 + 12 − 12.06 2 12.06 = 0.283 Step 1: 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), RTT Step 3: df = (2 – 1 )(3 – 1) = 2 & α = 0.10 → CV: 𝜒2 = 4.605 Step 4: Decision: a. Do not Reject H0 b. The claim is False c. There is not sufficient evidence to support the claim that the amount of alcohol a person consumes is dependent on the individual’s gender. 𝑇𝑆: 𝜒2 = 𝑂 − 𝐸 2 𝐸 𝑑𝑓 = (𝑟 − 1)(𝑐 − 1) 𝐸 = (row sum)(column sum) grand total Step 2: 𝑻𝑺: 𝜒2 = 𝑂−𝐸 2 𝐸 𝑑𝑓 = (𝑟 − 1)(𝑐 − 1) TS: χ² = CV: χ² =
  • 11. 11 11.2 Contingency Tables: Test for Homogeneity of Proportions Contingency Tables: Chi-Square Test of Homogeneity: A chi-square test of homogeneity is a test of the claim that different populations have the same proportions of some characteristics. Assumptions for Homogeneity of Proportions: In conducting a test of homogeneity, we can use the same notation, requirements, test statistic, critical value, and procedures given previously, with this exception: Instead of testing the null hypothesis of independence between the row and column variables, we test the null hypothesis that the different populations have the same proportion of some characteristic. 1. The data are obtained from a random sample. 2. The expected frequency for each category must be 5 or more. In a typical test of independence, sample subjects are randomly selected from one population and values of two different variables are observed. In a typical chi-square test of Homogeneity, subjects are randomly selected from different populations separately. We test the null hypothesis that the different populations have the same proportion of some characteristic.
  • 12. REQUIREMENT CHECK (1) Based on the description of the study, we will treat the subjects as being randomly selected and randomly assigned to the different cities. (2) The results are expressed as frequency counts. (3) The expected frequencies are all at least 5. (All expected values are either 5.625 or 6.375.) The requirements are satisfied. 12 This table lists results from an experiment in which 12 wallets were intentionally lost in each of 16 different cities, including New York City, London, Amsterdam, and so on. Use a 0.05 significance level with the data to test the null hypothesis that the cities have the same proportion of returned wallets. (Note: This Lost Wallet Test” implies that whether a wallet is returned is dependent on the city in which it was lost.) Test the claim that the proportion of returned wallets is not the same in the 16 different cities. City (16) A B C D E F G H I J K L M N O P Wallet Returned 8 5 7 11 5 8 6 7 3 1 4 2 4 6 4 9 Wallet Not Returned 4 7 5 1 7 4 6 5 9 11 8 10 8 6 8 3 Example 5: Test of Homogeneity
  • 13. 13 Example 5 Continued: Step 1: H0: Whether a lost wallet is returned is independent of the city in which it was lost. (p1 = p2 = p3 = … = pn), Claim H1: A lost wallet being returned depends on the city in which it was lost. (At least one proportion is different from the others), RTT Step 3: df = (16 – 1 )(2 – 1) = 15 & α = 0.05 Step 4: Decision: a. Reject H0, (Reject independence) b. The claim is False c. There is not sufficient evidence to support the claim that the proportion of returned wallets is independent of the city in which it was lost. (The proportion of returned wallets depends on the city in which they were lost.) (There is sufficient evidence to conclude that the proportion of returned wallets is not the same in the 16 different cities.) P-value = 0.002 χ² = 35.388 CV : χ² = 24.996 TS: χ² = 35.388 → CV: 𝜒2 = 24.996 𝑇𝑆: 𝜒2 = 𝑂 − 𝐸 2 𝐸 𝑑𝑓 = (𝑟 − 1)(𝑐 − 1) Step 2: 𝑻𝑺: 𝜒2 = 𝑂−𝐸 2 𝐸 𝑑𝑓 = (𝑟 − 1)(𝑐 − 1) TI Calculator: Contingency Table 1. Access Matrix (2nd & Press 𝒙−𝟏 ) 2. Edit, Enter Dimensions & cell entries 3. Stat 4. Tests 5. 𝝌𝟐 − 𝑻𝒆𝒔𝒕 6. Observed Matrix must be A 7. Calculate Note: Matrix B gets populated as Expected Matrix
  • 14. 14 Example 6: Test of Homogeneity 100 people were selected from 4 income groups. They were asked if they were “very happy.” The percent for each group who responded yes and the number from the survey are shown in the table. At α = 0.05 test the claim that there is no difference in the proportions. 𝑬 = 𝒏 𝒌 = 𝟒𝟎𝟎 𝟒 = 𝟏𝟎𝟎 𝐸 = (row sum)(column sum) grand total TI Calculator: Contingency Table 1. Access Matrix (2nd & Press 𝒙−𝟏 ) 2. Edit, Enter Dimensions & cell entries 3. Stat 4. Tests 5. 𝝌𝟐 − 𝑻𝒆𝒔𝒕 6. Observed Matrix must be A 7. Calculate Note: Matrix B gets populated as Expected Matrix
  • 15. 15 Example 6: Step 1: H0: p1 = p2 = p3 = p4 , Claim H1: At least one of the proportions differs from the other. RTT Step 3: df = (2 – 1)(4 – 1) = 3 & α = 0.05 Step 4: Decision: a. Reject H0 b. The claim is False c. There is not enough evidence to support the claim that there is no difference in the proportions. Hence the incomes seem to make a difference in the proportions. χ² = 14.149 → CV: 𝜒2 = 7.815 TI Calculator: Contingency Table 1. Access Matrix (2nd & Press 𝒙−𝟏 ) 2. Edit, Enter Dimensions & cell entries 3. Stat 4. Tests 5. 𝝌𝟐 − 𝑻𝒆𝒔𝒕 6. Observed Matrix must be A 7. Calculate Note: Matrix B gets populated as Expected Matrix 𝑇𝑆: 𝜒2 = 𝑂 − 𝐸 2 𝐸 𝑑𝑓 = (𝑟 − 1)(𝑐 − 1) Step 2: 𝑻𝑺: 𝜒2 = 𝑂−𝐸 2 𝐸 𝑑𝑓 = (𝑟 − 1)(𝑐 − 1) CV: TS:
  • 16. 16 • Every cell must have an expected frequency of at least 5. • Fisher’s Exact Test is often used for a 2 × 2 contingency table with one or more expected frequencies that are below 5. • Fisher’s exact test provides an exact P-value. • Because the calculations are quite complex, it’s a good idea to use technology. 11.2 Contingency Tables, Fisher’s Exact Test (Skip) Example 7: The MythBusters show on the Discovery Channel tested the theory that when someone yawns, others are more likely to yawn. The results are summarized below. Blank Subject Exposed to Yawning? Yes Subject Exposed to Yawning? No Did Subject Yawn? Yes 10 4 Did Subject Yawn? No 24 12 Using Fisher’s exact test results in a P-value of 0.513, so there is not sufficient evidence to support the myth that people exposed to yawning actually yawn more than those not exposed to yawning.
  • 17. 17 For 2 × 2 tables consisting of frequency counts that result from matched pairs, the frequency counts within each matched pair are not independent and, for such cases, we can use McNemar’s Test of the null hypothesis that the frequencies from the discordant (different) categories occur in the same proportion. 11.2 Contingency Tables, McNemar’s Test for Matched Pairs (Skip) Blank Treatment X: Cured Treatment X: Not Cured Treatment Y: Cured a b Treatment Y: Not Cured c d McNemar’s test requires that for a table as shown, the frequencies are such that b + c ≥ 10. The test is a right-tailed chi-square test with the following test statistic: 𝑇𝑆: 𝜒2 = 𝑏 − 𝑐 − 1 2 𝑏 + 𝑐
  • 18. 18 Example 8: Are Hip Protector’s Effective? A randomized controlled trial was designed to test the effectiveness of hip protectors in preventing hip fractures in the elderly. Nursing home residents each wore protection on one hip, but not the other. Results are as follows. Blank No Hip Protector Worn: No Hip Fracture No Hip Protector Worn: Hip Fracture Hip Protector Worn: No Hip Fracture a = 309 b = 10 Hip Protector Worn: Hip Fracture c = 15 d = 2 McNemar’s Test can be used to test the null hypothesis that the following two proportions are the same: • The proportion of subjects with no hip fracture on the protected hip and a hip fracture on the unprotected hip. • The proportion of subjects with a hip fracture on the protected hip and no hip fracture on the unprotected hip. Solution: b = 10 and c = 15 𝑇𝑆: 𝜒2 = 𝑏 − 𝑐 − 1 2 𝑏 + 𝑐 = 10 − 15 − 1 2 10 + 15 = 0.640 α = 0.05 & df = (2 – 1)(2 – 1) = 1 → CV: 𝜒2 =3.841 for this right-tailed test. 𝑇𝑆: 𝜒2 = 0.640 does not exceed the critical value of χ² = 3.841, so we fail to reject the null hypothesis. The proportion of hip fractures with the protectors worn is not significantly different from the proportion of hip fractures without the protectors worn.