13 - 1 © 2000 Prentice-Hall, Inc. Statistics The Chi-Square Test & The Analysis of Contingency...
-
Upload
julian-parks -
Category
Documents
-
view
216 -
download
2
Transcript of 13 - 1 © 2000 Prentice-Hall, Inc. Statistics The Chi-Square Test & The Analysis of Contingency...
13 - 13 - 11
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
StatisticsStatistics
The Chi-Square Test & The Chi-Square Test & The Analysis of Contingency TablesThe Analysis of Contingency Tables
Chapter 13Chapter 13
13 - 13 - 22
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Learning ObjectivesLearning Objectives
1.1. Explain Explain 22 Test for Proportions Test for Proportions
2.2. Explain Explain 22 Test of Independence Test of Independence
3.3. Solve Hypothesis Testing ProblemsSolve Hypothesis Testing Problems Two or More Population ProportionsTwo or More Population Proportions IndependenceIndependence
13 - 13 - 33
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Data TypesData Types
Data
Quantitative Qualitative
Discrete Continuous
Data
Quantitative Qualitative
Discrete Continuous
13 - 13 - 44
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Qualitative DataQualitative Data
1.1. Qualitative Random Variables Yield Qualitative Random Variables Yield Responses That ClassifyResponses That Classify Example: Gender (Male, Female)Example: Gender (Male, Female)
2.2. Measurement Reflects # in CategoryMeasurement Reflects # in Category
3.3. Nominal or Ordinal ScaleNominal or Ordinal Scale
4.4. ExamplesExamples Do You Own Savings Bonds? Do You Own Savings Bonds? Do You Live On-Campus or Off-Campus?Do You Live On-Campus or Off-Campus?
13 - 13 - 55
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Hypothesis Tests Hypothesis Tests Qualitative Data Qualitative Data
QualitativeData
Z Test Z Test 2 Test
Proportion Independence1 pop.
2 Test
2 or morepop.
2 pop.
QualitativeData
Z Test Z Test 2 Test
Proportion Independence1 pop.
2 Test
2 or morepop.
2 pop.
13 - 13 - 66
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Chi-Square (Chi-Square (22) Test ) Test for for kk Proportions Proportions
13 - 13 - 77
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Hypothesis Tests Hypothesis Tests Qualitative Data Qualitative Data
QualitativeData
Z Test Z Test 2 Test
Proportion Independence1 pop.
2 Test
2 or morepop.
2 pop.
QualitativeData
Z Test Z Test 2 Test
Proportion Independence1 pop.
2 Test
2 or morepop.
2 pop.
13 - 13 - 88
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Chi-Square (Chi-Square (22) Test ) Test for for kk Proportions Proportions
1.1. Tests Equality (=) of Proportions OnlyTests Equality (=) of Proportions Only Example: Example: pp11 = .2, = .2, pp22=.3, =.3, pp33 = .5 = .5
2.2. One Variable With Several LevelsOne Variable With Several Levels
3.3. AssumptionsAssumptions Multinomial ExperimentMultinomial Experiment Large Sample SizeLarge Sample Size
All Expected Counts All Expected Counts 5 5
4.4. Uses One-Way Contingency TableUses One-Way Contingency Table
13 - 13 - 99
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Multinomial Multinomial ExperimentExperiment
1.1. nn Identical Trial Identical Trial
2.2. kk Outcomes to Each Trial Outcomes to Each Trial
3.3. Constant Outcome Probability, Constant Outcome Probability, ppkk
4.4. Independent TrialsIndependent Trials
5.5. Random Variable is Count, Random Variable is Count, nnkk
6.6. Example: Ask 100 People (Example: Ask 100 People (nn) Which of ) Which of 3 Candidates (3 Candidates (kk) They Will Vote For) They Will Vote For
13 - 13 - 1010
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
One-Way One-Way Contingency TableContingency Table
1.1. Shows # Observations in Shows # Observations in kk Independent Independent Groups (Outcomes or Variable Levels)Groups (Outcomes or Variable Levels)
13 - 13 - 1111
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Candidate
Tom Bill Mary Total
35 20 45 100
Candidate
Tom Bill Mary Total
35 20 45 100
One-Way One-Way Contingency TableContingency Table
1.1. Shows # Observations in Shows # Observations in kk Independent Independent Groups (Outcomes or Variable Levels)Groups (Outcomes or Variable Levels)
Outcomes (Outcomes (kk = 3) = 3)
Number of responsesNumber of responses
13 - 13 - 1212
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test for Test for kk Proportions Proportions
Hypotheses & StatisticHypotheses & Statistic
13 - 13 - 1313
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
1.1. HypothesesHypotheses HH00: : pp11 = = pp1,01,0, , pp22 = = pp2,02,0, ..., , ..., ppkk = = ppkk,0,0
HHaa: Not all : Not all ppii are equal are equal
22 Test for Test for kk Proportions Proportions
Hypotheses & StatisticHypotheses & StatisticHypothesized Hypothesized probabilityprobability
13 - 13 - 1414
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
1.1. HypothesesHypotheses HH00: : pp11 = = pp1,01,0, , pp22 = = pp2,02,0, ..., , ..., ppkk = = ppkk,0,0
HHaa: Not all : Not all ppii are equal are equal
2.2. Test StatisticTest Statistic
22
n E n
E ni i
i
afafall cells
22
n E n
E ni i
i
afafall cells
22 Test for Test for kk Proportions Proportions
Hypotheses & StatisticHypotheses & Statistic
Observed countObserved count
Expected countExpected count
Hypothesized Hypothesized probabilityprobability
13 - 13 - 1515
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
1.1. HypothesesHypotheses HH00: : pp11 = = pp1,01,0, , pp22 = = pp2,02,0, ..., , ..., ppkk = = ppkk,0,0
HHaa: Not all : Not all ppii are equal are equal
2.2. Test StatisticTest Statistic
3.3. Degrees of Freedom: Degrees of Freedom: kk - 1 - 1
22
n E n
E ni i
i
afafall cells
22
n E n
E ni i
i
afafall cells
22 Test for Test for kk Proportions Proportions
Hypotheses & StatisticHypotheses & Statistic
Observed countObserved count
Expected countExpected count
Number of Number of outcomesoutcomes
Hypothesized Hypothesized probabilityprobability
13 - 13 - 1616
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test Basic Idea Test Basic Idea
1.1. Compares Observed Count to Compares Observed Count to Expected Count If Null Hypothesis Expected Count If Null Hypothesis Is TrueIs True
2.2. Closer Observed Count to Expected Closer Observed Count to Expected Count, the More Likely the HCount, the More Likely the H00 Is True Is True Measured by Squared Difference Relative Measured by Squared Difference Relative
to Expected Countto Expected Count Reject Large ValuesReject Large Values
13 - 13 - 1717
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Finding Critical Finding Critical Value ExampleValue Example
What is the critical What is the critical 22 value if value if kk = 3, & = 3, & =.05? =.05?
13 - 13 - 1818
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Finding Critical Finding Critical Value ExampleValue Example
20 20
What is the critical What is the critical 22 value if value if kk = 3, & = 3, & =.05? =.05?
22 Table Table (Portion)(Portion)
13 - 13 - 1919
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Finding Critical Finding Critical Value ExampleValue Example
20 20
What is the critical What is the critical 22 value if value if kk = 3, & = 3, & =.05? =.05?
22 Table Table (Portion)(Portion)
If If nnii = = EE((nnii)), , 22 = 0. = 0.
Do not reject HDo not reject H00
13 - 13 - 2020
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Finding Critical Finding Critical Value ExampleValue Example
20
Reject
20
Reject
What is the critical What is the critical 22 value if value if kk = 3, & = 3, & =.05? =.05?
= .05= .05
22 Table Table (Portion)(Portion)
If If nnii = = EE((nnii)), , 22 = 0. = 0.
Do not reject HDo not reject H00
13 - 13 - 2121
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Finding Critical Finding Critical Value ExampleValue Example
20
Reject
20
Reject
What is the critical What is the critical 22 value if value if kk = 3, & = 3, & =.05? =.05?
= .05= .05
22 Table Table (Portion)(Portion)
If If nnii = = EE((nnii)), , 22 = 0. = 0.
Do not reject HDo not reject H00
13 - 13 - 2222
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Finding Critical Finding Critical Value ExampleValue Example
20
Reject
20
Reject
What is the critical What is the critical 22 value if value if kk = 3, & = 3, & =.05? =.05?
= .05= .05
22 Table Table (Portion)(Portion)
If If nnii = = EE((nnii)), , 22 = 0. = 0.
Do not reject HDo not reject H00
13 - 13 - 2323
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Finding Critical Finding Critical Value ExampleValue Example
20
Reject
20
Reject
What is the critical What is the critical 22 value if value if kk = 3, & = 3, & =.05? =.05?
= .05= .05
22 Table Table (Portion)(Portion)
If If nnii = = EE((nnii)), , 22 = 0. = 0.
Do not reject HDo not reject H00
13 - 13 - 2424
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Finding Critical Finding Critical Value ExampleValue Example
20
Reject
20
Reject
What is the critical What is the critical 22 value if value if kk = 3, & = 3, & =.05? =.05?
= .05= .05
22 Table Table (Portion)(Portion)
dfdf = = kk - 1 = 2 - 1 = 2
If If nnii = = EE((nnii)), , 22 = 0. = 0.
Do not reject HDo not reject H00
13 - 13 - 2525
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Finding Critical Finding Critical Value ExampleValue Example
20
Reject
20
Reject
What is the critical What is the critical 22 value if value if kk = 3, & = 3, & =.05? =.05?
= .05= .05
22 Table Table (Portion)(Portion)
dfdf = = kk - 1 = 2 - 1 = 2
If If nnii = = EE((nnii)), , 22 = 0. = 0.
Do not reject HDo not reject H00
13 - 13 - 2626
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Finding Critical Finding Critical Value ExampleValue Example
20
Reject
20
Reject
What is the critical What is the critical 22 value if value if kk = 3, & = 3, & =.05? =.05?
= .05= .05
22 Table Table (Portion)(Portion)
dfdf = = kk - 1 = 2 - 1 = 2
If If nnii = = EE((nnii)), , 22 = 0. = 0.
Do not reject HDo not reject H00
13 - 13 - 2727
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Finding Critical Finding Critical Value ExampleValue Example
20
Reject
20
Reject
What is the critical What is the critical 22 value if value if kk = 3, & = 3, & =.05? =.05?
= .05= .05
22 Table Table (Portion)(Portion)
dfdf = = kk - 1 = 2 - 1 = 2
If If nnii = = EE((nnii)), , 22 = 0. = 0.
Do not reject HDo not reject H00
13 - 13 - 2828
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Upper Tail AreaDF .995 … .95 … .051 ... … 0.004 … 3.8412 0.010 … 0.103 … 5.991
Finding Critical Finding Critical Value ExampleValue Example
20 5.991
Reject
20 5.991
Reject
What is the critical What is the critical 22 value if value if kk = 3, & = 3, & =.05? =.05?
= .05= .05
22 Table Table (Portion)(Portion)
dfdf = = kk - 1 = 2 - 1 = 2
If If nnii = = EE((nnii)), , 22 = 0. = 0.
Do not reject HDo not reject H00
13 - 13 - 2929
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
As personnel director, you As personnel director, you want to test the perception of want to test the perception of fairness of three methods of fairness of three methods of performance evaluation. Of performance evaluation. Of 180180 employees, employees, 6363 rated rated Method 1Method 1 as fair. as fair. 4545 rated rated Method 2 Method 2 as fair. as fair. 7272 rated rated Method 3 Method 3 as fair. At the as fair. At the .05.05 level, is there a level, is there a differencedifference in in perceptions? perceptions?
22 Test for Test for kk Proportions ExampleProportions Example
13 - 13 - 3030
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test for Test for kk Proportions SolutionProportions Solution
13 - 13 - 3131
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test for Test for kk Proportions SolutionProportions Solution
HH00::
HHaa::
==
nn11 = = nn22 = = nn33 = =
Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
20
Reject
20
Reject
13 - 13 - 3232
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test for Test for kk Proportions SolutionProportions Solution
HH00: : pp11 = = pp22 = = pp33 = 1/3 = 1/3
HHaa: : At least 1 is differentAt least 1 is different
==
nn11 = = nn22 = = nn33 = =
Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
20
Reject
20
Reject
13 - 13 - 3333
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test for Test for kk Proportions SolutionProportions Solution
HH00: : pp11 = = pp22 = = pp33 = 1/3 = 1/3
HHaa: : At least 1 is differentAt least 1 is different
= = .05.05
nn11 = = 63 63 nn22 = = 45 45 nn33 = = 72 72
Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
20
Reject
20
Reject
13 - 13 - 3434
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test for Test for kk Proportions SolutionProportions Solution
HH00: : pp11 = = pp22 = = pp33 = 1/3 = 1/3
HHaa: : At least 1 is differentAt least 1 is different
= = .05.05
nn11 = = 63 63 nn22 = = 45 45 nn33 = = 72 72
Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
20 5.991
Reject
20 5.991
Reject
= .05= .05
13 - 13 - 3535
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
E n np
E n E n E n
n E n
E n
n n n
i i
i i
i
afaf af af a f
afaf
,
.
0
1 2 3
22
12
22
32
2 2 2
180 1 3 60
60
60
60
60
60
60
63 60
60
45 60
60
72 60
606 3
all cells
E n np
E n E n E n
n E n
E n
n n n
i i
i i
i
afaf af af a f
afaf
,
.
0
1 2 3
22
12
22
32
2 2 2
180 1 3 60
60
60
60
60
60
60
63 60
60
45 60
60
72 60
606 3
all cells
22 Test for Test for kk Proportions SolutionProportions Solution
13 - 13 - 3636
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test for Test for kk Proportions SolutionProportions Solution
HH00: : pp11 = = pp22 = = pp33 = 1/3 = 1/3
HHaa: : At least 1 is differentAt least 1 is different
= = .05.05
nn11 = = 63 63 nn22 = = 45 45 nn33 = = 72 72
Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
20 5.991
Reject
20 5.991
Reject
= .05= .05
22 = 6.3 = 6.3
13 - 13 - 3737
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test for Test for kk Proportions SolutionProportions Solution
HH00: : pp11 = = pp22 = = pp33 = 1/3 = 1/3
HHaa: : At least 1 is differentAt least 1 is different
= = .05.05
nn11 = = 63 63 nn22 = = 45 45 nn33 = = 72 72
Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
20 5.991
Reject
20 5.991
Reject
= .05= .05
22 = 6.3 = 6.3
Reject at Reject at = .05 = .05
13 - 13 - 3838
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test for Test for kk Proportions SolutionProportions Solution
HH00: : pp11 = = pp22 = = pp33 = 1/3 = 1/3
HHaa: : At least 1 is differentAt least 1 is different
= = .05.05
nn11 = = 63 63 nn22 = = 45 45 nn33 = = 72 72
Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
Reject at Reject at = .05 = .05
There is evidence of a There is evidence of a difference in proportions difference in proportions 20 5.991
Reject
20 5.991
Reject
= .05= .05
22 = 6.3 = 6.3
13 - 13 - 3939
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Independence Test of Independence
13 - 13 - 4040
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Hypothesis Tests Hypothesis Tests Qualitative Data Qualitative Data
QualitativeData
Z Test Z Test 2 Test
Proportion Independence1 pop.
2 Test
2 or morepop.
2 pop.
QualitativeData
Z Test Z Test 2 Test
Proportion Independence1 pop.
2 Test
2 or morepop.
2 pop.
13 - 13 - 4141
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Test of IndependenceIndependence
1.1. Shows If a Relationship Exists Between Shows If a Relationship Exists Between 2 Qualitative Variables2 Qualitative Variables One Sample Is DrawnOne Sample Is Drawn Does Does NotNot Show Causality Show Causality
2.2. AssumptionsAssumptions Multinomial ExperimentMultinomial Experiment All Expected Counts All Expected Counts 5 5
3.3. Uses Two-Way Contingency TableUses Two-Way Contingency Table
13 - 13 - 4242
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Test of Independence Independence
Contingency Table Contingency Table 1.1. Shows # Observations From 1 Sample Shows # Observations From 1 Sample
Jointly in 2 Qualitative VariablesJointly in 2 Qualitative Variables
13 - 13 - 4343
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
House LocationHouse Style Urban Rural Total
Split-Level 63 49 112Ranch 15 33 48
Total 78 82 160
House LocationHouse Style Urban Rural Total
Split-Level 63 49 112Ranch 15 33 48
Total 78 82 160
22 Test of Test of Independence Independence
Contingency Table Contingency Table 1.1. Shows # Observations From 1 Sample Shows # Observations From 1 Sample
Jointly in 2 Qualitative VariablesJointly in 2 Qualitative VariablesLevels of variable 2Levels of variable 2
Levels of variable 1Levels of variable 1
13 - 13 - 4444
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Test of Independence Independence Hypotheses & Hypotheses &
StatisticStatistic1.1. HypothesesHypotheses
HH00: Variables Are Independent : Variables Are Independent
HHaa: Variables Are Related (Dependent): Variables Are Related (Dependent)
13 - 13 - 4545
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Test of Independence Independence Hypotheses & Hypotheses &
StatisticStatistic1.1. HypothesesHypotheses
HH00: Variables Are Independent : Variables Are Independent
HHaa: Variables Are Related (Dependent): Variables Are Related (Dependent)
2.2. Test StatisticTest Statistic Observed countObserved count
Expected Expected countcount 2
2
n E n
E n
ij ij
ij
c hc hall cells
2
2
n E n
E n
ij ij
ij
c hc hall cells
13 - 13 - 4646
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Test of Independence Independence Hypotheses & Hypotheses &
StatisticStatistic1.1. HypothesesHypotheses
HH00: Variables Are Independent : Variables Are Independent
HHaa: Variables Are Related (Dependent): Variables Are Related (Dependent)
2.2. Test StatisticTest Statistic
Degrees of Freedom: (Degrees of Freedom: (rr - 1)( - 1)(cc - 1) - 1)RowsRows Columns Columns
Observed countObserved count
Expected Expected countcount 2
2
n E n
E n
ij ij
ij
c hc hall cells
2
2
n E n
E n
ij ij
ij
c hc hall cells
13 - 13 - 4747
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Test of Independence Independence
Expected CountsExpected Counts1.1. Statistical Independence Means Joint Statistical Independence Means Joint
Probability Equals Product of Marginal Probability Equals Product of Marginal ProbabilitiesProbabilities
2.2. Compute Marginal Probabilities & Compute Marginal Probabilities & Multiply for Joint ProbabilityMultiply for Joint Probability
3.3. Expected Count Is Sample Size Times Expected Count Is Sample Size Times Joint ProbabilityJoint Probability
13 - 13 - 4848
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Expected Count Expected Count ExampleExample
13 - 13 - 4949
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
LocationUrban Rural
House Style Obs. Obs. Total
Split-Level 63 49 112
Ranch 15 33 48
Total 78 82 160
LocationUrban Rural
House Style Obs. Obs. Total
Split-Level 63 49 112
Ranch 15 33 48
Total 78 82 160
Expected Count Expected Count ExampleExample
13 - 13 - 5050
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
LocationUrban Rural
House Style Obs. Obs. Total
Split-Level 63 49 112
Ranch 15 33 48
Total 78 82 160
LocationUrban Rural
House Style Obs. Obs. Total
Split-Level 63 49 112
Ranch 15 33 48
Total 78 82 160
Expected Count Expected Count ExampleExample
112 112 160160
Marginal probability = Marginal probability =
13 - 13 - 5151
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
LocationUrban Rural
House Style Obs. Obs. Total
Split-Level 63 49 112
Ranch 15 33 48
Total 78 82 160
LocationUrban Rural
House Style Obs. Obs. Total
Split-Level 63 49 112
Ranch 15 33 48
Total 78 82 160
Expected Count Expected Count ExampleExample
112 112 160160
78 78 160160
Marginal probability = Marginal probability =
Marginal probability = Marginal probability =
13 - 13 - 5252
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
LocationUrban Rural
House Style Obs. Obs. Total
Split-Level 63 49 112
Ranch 15 33 48
Total 78 82 160
LocationUrban Rural
House Style Obs. Obs. Total
Split-Level 63 49 112
Ranch 15 33 48
Total 78 82 160
Expected Count Expected Count ExampleExample
112 112 160160
78 78 160160
Marginal probability = Marginal probability =
Marginal probability = Marginal probability =
Joint probability = Joint probability = 112 112 160160
78 78 160160
13 - 13 - 5353
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
LocationUrban Rural
House Style Obs. Obs. Total
Split-Level 63 49 112
Ranch 15 33 48
Total 78 82 160
LocationUrban Rural
House Style Obs. Obs. Total
Split-Level 63 49 112
Ranch 15 33 48
Total 78 82 160
Expected Count Expected Count ExampleExample
112 112 160160
78 78 160160
Marginal probability = Marginal probability =
Marginal probability = Marginal probability =
Joint probability = Joint probability = 112 112 160160
78 78 160160
Expected count = 160· Expected count = 160· 112 112 160160
78 78 160160
= 54.6 = 54.6
13 - 13 - 5454
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Expected Count Expected Count CalculationCalculation
13 - 13 - 5555
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Expected Count Expected Count CalculationCalculation
Expected count = Row total Column total
Sample sizea fa f
Expected count = Row total Column total
Sample sizea fa f
13 - 13 - 5656
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
House LocationUrban Rural
House Style Obs. Exp. Obs. Exp. Total
Split-Level 63 54.6 49 57.4 112
Ranch 15 23.4 33 24.6 48
Total 78 78 82 82 160
House LocationUrban Rural
House Style Obs. Exp. Obs. Exp. Total
Split-Level 63 54.6 49 57.4 112
Ranch 15 23.4 33 24.6 48
Total 78 78 82 82 160
Expected Count Expected Count CalculationCalculation
112·82 112·82 160160
48·78 48·78 160160
48·82 48·82 160160
112·78 112·78 160160
Expected count = Row total Column total
Sample sizea fa f
Expected count = Row total Column total
Sample sizea fa f
13 - 13 - 5757
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Diet PepsiDiet Coke No Yes TotalNo 84 32 116Yes 48 122 170
Total 132 154 286
Diet PepsiDiet Coke No Yes TotalNo 84 32 116Yes 48 122 170
Total 132 154 286
You’re a marketing research analyst. You ask a You’re a marketing research analyst. You ask a random sample of random sample of 286286 consumers if they consumers if they purchase Diet Pepsi or Diet Coke. At the purchase Diet Pepsi or Diet Coke. At the .05.05 level, is there evidence of a level, is there evidence of a relationshiprelationship??
22 Test of Test of Independence Independence
ExampleExample
13 - 13 - 5858
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Test of Independence Independence
SolutionSolution
13 - 13 - 5959
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Test of Independence Independence
SolutionSolutionHH00: :
HHaa: :
= =
df = df =
Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
20
Reject
20
Reject
13 - 13 - 6060
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Test of Independence Independence
SolutionSolutionHH00: : No Relationship No Relationship
HHaa: : Relationship Relationship
= =
df = df =
Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
20
Reject
20
Reject
13 - 13 - 6161
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Test of Independence Independence
SolutionSolutionHH00: : No Relationship No Relationship
HHaa: : Relationship Relationship
= = .05.05
df = df = (2 - 1)(2 - 1) = 1 (2 - 1)(2 - 1) = 1
Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
20
Reject
20
Reject
13 - 13 - 6262
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Test of Independence Independence
SolutionSolutionHH00: : No Relationship No Relationship
HHaa: : Relationship Relationship
= = .05.05
df = df = (2 - 1)(2 - 1) = 1 (2 - 1)(2 - 1) = 1
Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
20 3.841
Reject
20 3.841
Reject
= .05= .05
13 - 13 - 6363
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Diet PepsiNo Yes
Diet Coke Obs. Exp. Obs. Exp. Total
No 84 53.5 32 62.5 116
Yes 48 78.5 122 91.5 170
Total 132 132 154 154 286
Diet PepsiNo Yes
Diet Coke Obs. Exp. Obs. Exp. Total
No 84 53.5 32 62.5 116
Yes 48 78.5 122 91.5 170
Total 132 132 154 154 286
EE((nnijij)) 5 in all 5 in all
cellscells
170·132 170·132 286286
170·154 170·154 286286
116·132 116·132 286286
154·132 154·132 286286
22 Test of Test of Independence Independence
SolutionSolution
13 - 13 - 6464
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
2
2
11 11
2
11
12 12
2
12
22 22
2
22
2 2 284 53 5
53 5
32 62 5
62 5
122 915
91554 29
n E n
E n
n E n
E n
n E n
E n
n E n
E n
ij ij
ij
.
.
.
.
.
..
c hc h
a fa f
a fa f
a fa f
all cells
2
2
11 11
2
11
12 12
2
12
22 22
2
22
2 2 284 53 5
53 5
32 62 5
62 5
122 915
91554 29
n E n
E n
n E n
E n
n E n
E n
n E n
E n
ij ij
ij
.
.
.
.
.
..
c hc h
a fa f
a fa f
a fa f
all cells
22 Test of Test of Independence Independence
SolutionSolution
13 - 13 - 6565
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Test of Independence Independence
SolutionSolutionHH00: : No Relationship No Relationship
HHaa: : Relationship Relationship
= .05= .05
dfdf = (2 - 1)(2 - 1) = 1 = (2 - 1)(2 - 1) = 1
Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
20 3.841
Reject
20 3.841
Reject
= .05= .05
22 = 54.29 = 54.29
13 - 13 - 6666
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Test of Independence Independence
SolutionSolutionHH00: : No Relationship No Relationship
HHaa: : Relationship Relationship
= .05= .05
dfdf = (2 - 1)(2 - 1) = 1 = (2 - 1)(2 - 1) = 1
Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
Reject at Reject at = .05 = .05
20 3.841
Reject
20 3.841
Reject
= .05= .05
22 = 54.29 = 54.29
13 - 13 - 6767
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
22 Test of Test of Independence Independence
SolutionSolutionHH00: : No Relationship No Relationship
HHaa: : Relationship Relationship
= .05= .05
dfdf = (2 - 1)(2 - 1) = 1 = (2 - 1)(2 - 1) = 1
Critical Value(s):Critical Value(s):
Test Statistic: Test Statistic:
Decision:Decision:
Conclusion:Conclusion:
Reject at Reject at = .05 = .05
There is evidence of a There is evidence of a relationshiprelationship20 3.841
Reject
20 3.841
Reject
= .05= .05
22 = 54.29 = 54.29
13 - 13 - 6868
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Diet PepsiDiet Coke No Yes TotalNo 84 32 116Yes 48 122 170
Total 132 154 286
Diet PepsiDiet Coke No Yes TotalNo 84 32 116Yes 48 122 170
Total 132 154 286
OK. There is a statistically significant OK. There is a statistically significant relationship between purchasing Diet Coke & relationship between purchasing Diet Coke & Diet Pepsi. So what do you think the Diet Pepsi. So what do you think the relationship is? Aren’t they competitors?relationship is? Aren’t they competitors?
22 Test of Test of Independence Independence
Thinking ChallengeThinking Challenge
13 - 13 - 6969
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
You Re-Analyze the You Re-Analyze the DataData
13 - 13 - 7070
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Diet PepsiDiet Coke No Yes TotalNo 4 30 34Yes 40 2 42
Total 44 32 76
Diet PepsiDiet Coke No Yes TotalNo 4 30 34Yes 40 2 42
Total 44 32 76
You Re-Analyze the You Re-Analyze the DataData
High High IncomeIncome
13 - 13 - 7171
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Diet PepsiDiet Coke No Yes TotalNo 80 2 82Yes 8 120 128
Total 88 122 210
Diet PepsiDiet Coke No Yes TotalNo 80 2 82Yes 8 120 128
Total 88 122 210
Diet PepsiDiet Coke No Yes TotalNo 4 30 34Yes 40 2 42
Total 44 32 76
Diet PepsiDiet Coke No Yes TotalNo 4 30 34Yes 40 2 42
Total 44 32 76
You Re-Analyze the You Re-Analyze the DataData
Low Low IncomeIncome
High High IncomeIncome
13 - 13 - 7272
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
True Relationships*True Relationships*
Apparent Apparent relationrelation
Underlying Underlying causal relationcausal relation
Control or Control or intervening variable intervening variable
(true cause)(true cause)
Diet Diet CokeCoke
Diet Diet PepsiPepsi
13 - 13 - 7373
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
Moral of the Story*Moral of the Story*
Numbers don’t think - People do!
© 1984-1994 T/Maker Co.
13 - 13 - 7474
© 2000 Prentice-Hall, Inc.© 2000 Prentice-Hall, Inc.
ConclusionConclusion
1.1. Explained Explained 22 Test for Proportions Test for Proportions
2.2. Explained Explained 22 Test of Independence Test of Independence
3.3. Solved Hypothesis Testing ProblemsSolved Hypothesis Testing Problems Two or More Population ProportionsTwo or More Population Proportions IndependenceIndependence
End of Chapter
Any blank slides that follow are blank intentionally.