View
218
Download
0
Category
Preview:
Citation preview
Week 13aWeek 13a
Making Inferences, Part IIIMaking Inferences, Part III
t t andand chi-square testschi-square tests
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 22
Lecture OutlineLecture Outline
Review of Review of tt tests and tests and pp values valuesCalculating precise probabilitiesCalculating precise probabilitiesHypothesis tests for nominal and ordinal Hypothesis tests for nominal and ordinal
variablesvariables
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 33
Review: confidence Review: confidence intervalsintervals
We can construct an interval containing 95 We can construct an interval containing 95 percent of the observationspercent of the observationsCalculate LCB and UCBCalculate LCB and UCBUsing mean, s.e. and Using mean, s.e. and ss
Useful for hypothesis testingUseful for hypothesis testing ““confidence” in our findingsconfidence” in our findings
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 44
Review: confidence Review: confidence intervalsintervals
Sample size matters!Sample size matters!Large samples: we assume normal Large samples: we assume normal
distributiondistributionnn >= 1,000 >= 1,000
Small samples: use the Small samples: use the tt distribution distributionnn < 1,000 < 1,000Look up values in McClendonLook up values in McClendon
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 55
Review: Review: tt tests tests
Two hypotheses for means comparisonsTwo hypotheses for means comparisonsDoes the sample mean differ from a Does the sample mean differ from a
hypothesized value?hypothesized value?Independent-sample Independent-sample tt test test
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 66
Review: Review: tt tests tests
Two hypotheses for means comparisonsTwo hypotheses for means comparisonsDo the means for two groups in the sample Do the means for two groups in the sample
differ from each other?differ from each other?Two-sample Two-sample tt test test
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 77
Review: Review: tt tests tests
Independent-sampleIndependent-sample If hypothesized value is outside the C.I., we If hypothesized value is outside the C.I., we
reject the alternate hypothesisreject the alternate hypothesis
Two-sampleTwo-sample If the C.I. for the hypothesized difference If the C.I. for the hypothesized difference
contains zero, we reject the alternativecontains zero, we reject the alternative
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 88
Review: Review: pp values values
Alternative to Alternative to tt tests testsMore precise: “precise probability”More precise: “precise probability”Assigns any observation a probability Assigns any observation a probability pp
that we would observe it by chancethat we would observe it by chance If If pp is low (less than .05) we accept the is low (less than .05) we accept the
alternative hypothesisalternative hypothesis
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 99
Review: SPSS outputReview: SPSS output
Independent-sample Independent-sample tt test test
One-Sample Test
72.435 713 .000 12.8935 12.5441 13.2430SSTRANt df Sig. (2-tailed)
MeanDifference Lower Upper
95% ConfidenceInterval of the
Difference
Test Value = 0
ConfidenceIntervalp value
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 1010
Review: SPSS outputReview: SPSS output
Two-sample Two-sample tt test test
Independent Samples Test
30.743 .000 15.648 712 .000 5.5170 .35257 4.82481 6.20923
19.265 491.843 .000 5.5170 .28637 4.95436 6.07968
Equal variancesassumed
Equal variancesnot assumed
SSTRANF Sig.
Levene's Test forEquality of Variances
t df Sig. (2-tailed)Mean
DifferenceStd. ErrorDifference Lower Upper
95% ConfidenceInterval of the
Difference
t-test for Equality of Means
ConfidenceIntervalp value
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 1111
ReviewReview
Questions?Questions?
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 1212
Obtaining Obtaining pp values values
In SPSSIn SPSSManuallyManually
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 1313
Obtaining Obtaining pp values values
A simple test statisticA simple test statisticThe difference of the hypothesized mean The difference of the hypothesized mean
and the null mean, divided by its standard and the null mean, divided by its standard errorerror
difference of ..statisticTest
es
HH OA
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 1414
Obtaining Obtaining pp values values
Standard error of differenceStandard error of difference
22
21 ...... meanmeandiff eseses
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 1515
Obtaining Obtaining p p valuesvalues
The test statistic . . .The test statistic . . . . . . is normally distributed for large samples. . . is normally distributed for large samples . . . is normally distributed when the . . . is normally distributed when the
population variance is knownpopulation variance is known . . . follows the . . . follows the tt distribution when sample size distribution when sample size
is small, or when we don’t know the is small, or when we don’t know the population variancepopulation variance
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 1616
Obtaining Obtaining pp values values
Example:Example: Do European governments Do European governments spend more on social welfare than non-spend more on social welfare than non-European governments?European governments?
HHaa: “In comparing governments, those in : “In comparing governments, those in
Europe will spend more on social welfare Europe will spend more on social welfare than those outside of Europe.”than those outside of Europe.”
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 1717
Obtaining Obtaining pp values values
Example:Example: social welfare spending in social welfare spending in Europe and outsideEurope and outside
Group Statistics
532 14.2998 4.45284 .19305
182 8.7828 2.85345 .21151
European dummyEuropean state
Non-European state
SSTRANN Mean Std. Deviation
Std. ErrorMean
Independent Samples Test
5.5170 .35257 4.82481 6.20923
5.5170 .28637 4.95436 6.07968
Equal variancesassumed
Equal variancesnot assumed
SSTRAN
MeanDifference
Std. ErrorDifference Lower Upper
95% ConfidenceInterval of the
Difference
t-test for Equality of Means
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 1818
Obtaining Obtaining pp values values
Example:Example: social welfare spending in social welfare spending in Europe and outsideEurope and outsideAssume a large sample Assume a large sample
23.19286.0
8.83.14..
es
HHZ OA
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 1919
Obtaining Obtaining pp values values
Example:Example: social welfare spending in social welfare spending in Europe and outsideEurope and outsideAssume a small sampleAssume a small sample
23.19286.0
8.83.14..
es
HHt OA
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 2020
Obtaining Obtaining pp values values
Example:Example: social welfare spending in social welfare spending in Europe and outsideEurope and outside Is 19.23 a significant test statistic?Is 19.23 a significant test statistic?
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 2121
Obtaining Obtaining pp values values
Three ways to get Three ways to get p p value for a given value for a given tt or or ZZEyeball testEyeball testStudent’sStudent’s t t table tableSPSS or ExcelSPSS or Excel
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 2222
Obtaining Obtaining pp values values
Eyeball testEyeball test Is your test statistic (Is your test statistic (ZZ or or tt) greater than two?) greater than two? If so, you can reject the null and accept the If so, you can reject the null and accept the
alternative hypothesisalternative hypothesis19.23 is far greater than two, so we accept 19.23 is far greater than two, so we accept
the hypothesis that Europe spends more on the hypothesis that Europe spends more on social welfaresocial welfare
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 2323
Obtaining Obtaining pp values values
Student’s Student’s tt table tableLook up critical Look up critical tt value in a table value in a table
NOTE:NOTE: degrees of freedom = degrees of freedom = nn – 1 – 1
If your statistic exceeds the critical value, If your statistic exceeds the critical value, accept the alternative hypothesisaccept the alternative hypothesis
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 2424
Obtaining Obtaining pp values values
Student’s Student’s tt table table
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 2525
Obtaining Obtaining pp values values
From SPSSFrom SPSS
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 2626
Obtaining Obtaining pp values values
From SPSSFrom SPSS
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 2727
Obtaining Obtaining pp values values
Questions?Questions?
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 2828
Limitations of Limitations of ZZ, , tt and and pp
Great for means comparisonsGreat for means comparisonsCannot use with nominal or ordinal Cannot use with nominal or ordinal
variablesvariablesSince zero has no meaningSince zero has no meaning
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 2929
Chi-square testChi-square test
Used forUsed forNominal variablesNominal variablesOrdinal variablesOrdinal variables
In conjunction with cross tabulationIn conjunction with cross tabulation
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 3030
Chi-square testChi-square test
Recall example from last TuesdayRecall example from last TuesdayHHaa: “In comparing voters, those with more : “In comparing voters, those with more
education will favor tougher environmental education will favor tougher environmental regulations than those with less education.”regulations than those with less education.”
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 3131
Chi-square testChi-square test
Recall:Recall:Environmental regulations:3 cats * Education: 3 categories Crosstabulation
44 169 445 658
46.8% 48.4% 49.1% 48.8%
34 116 325 475
36.2% 33.2% 35.9% 35.2%
16 64 136 216
17.0% 18.3% 15.0% 16.0%
94 349 906 1349
100.0% 100.0% 100.0% 100.0%
Count
% within Education:3 categories
Count
% within Education:3 categories
Count
% within Education:3 categories
Count
% within Education:3 categories
Tougher regs
Depends
Regs a burden
Environmentalregulations:3cats
Total
1. Lessthan HS 2. HS
3. Morethan HS
Education: 3 categories
Total
49.1% - 46.8% = 2.3%
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 3232
Chi-square testChi-square test
Intuition: Intuition: what percentage would we what percentage would we expect expect to see in to see in
each cell if there is no relationship?each cell if there is no relationship?
Chi-square test measures the differences Chi-square test measures the differences between between observed observed and and expectedexpected frequencies in each cellfrequencies in each cell
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 3333
Expected frequenciesExpected frequencies
MenMen WomenWomen TotalTotal
YesYes ?? ?? 100100
NoNo ?? ?? 100100
TotalTotal 100100 100100 200200
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 3434
Expected frequenciesExpected frequencies
MenMen WomenWomen TotalTotal
YesYes 5050 5050 100100
NoNo 5050 5050 100100
TotalTotal 100100 100100 200200
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 3535
Expected frequenciesExpected frequencies
MenMen WomenWomen TotalTotal
YesYes ?? ?? 4040
NoNo ?? ?? 160160
TotalTotal 100100 100100 200200
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 3636
Expected frequenciesExpected frequencies
MenMen WomenWomen TotalTotal
YesYes 2020 2020 4040
NoNo 8080 8080 160160
TotalTotal 100100 100100 200200
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 3737
Expected frequenciesExpected frequencies
If there is no relationship, we expect each If there is no relationship, we expect each cell cell within a categorywithin a category will follow the same will follow the same proportion as the overall sampleproportion as the overall sample
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 3838
Expected frequenciesExpected frequencies
MenMen WomenWomen TotalTotal
YesYes ?? ?? 100100
NoNo ?? ?? 100100
TotalTotal 100100 100100 200200
fe = (100 / 200) * 100 = 50
OverallProportion:
100 yeses outOf 200 total
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 3939
Expected frequenciesExpected frequencies
MenMen WomenWomen TotalTotal
YesYes ?? 5050 100100
NoNo ?? ?? 100100
TotalTotal 100100 100100 200200
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 4040
Chi-square testChi-square test
For any crosstab, we know For any crosstab, we know the totals for each value of the dependent the totals for each value of the dependent
variable (rows)variable (rows) the totals for each group of the independent the totals for each group of the independent
variable (columns)variable (columns)We can calculate expected frequencies We can calculate expected frequencies
for any cell in any tablefor any cell in any table
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 4141
Chi-square testChi-square test
The sum of squared differences between The sum of squared differences between observed and expected frequencies, observed and expected frequencies, divided by the expected frequency, follows divided by the expected frequency, follows the the chi-square distributionchi-square distribution
e
eo
f
ff 22
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 4242
Chi-square testChi-square test
In six stepsIn six steps1.1. Find the expected frequency for each cellFind the expected frequency for each cell
2.2. Subtract the expected from the observed Subtract the expected from the observed frequency in each cellfrequency in each cell
3.3. For each cell, square the figure you obtained For each cell, square the figure you obtained in step #2in step #2
4.4. Divide this figure by Divide this figure by ffee
5.5. Add up all the totals from step 4Add up all the totals from step 4
6.6. Look up critical values in a chi-square tableLook up critical values in a chi-square table
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 4343
Chi-square testChi-square test
SPSS example: Do liberals favor gun SPSS example: Do liberals favor gun control more than conservatives?control more than conservatives?
HHaa: “In comparing voters, liberals will : “In comparing voters, liberals will
express stronger support for gun control express stronger support for gun control than will conservatives”than will conservatives”
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 4444
Chi-square testChi-square test
SPSS output, without the test statisticSPSS output, without the test statistic
Favor or Oppose Gun Permits * Politicial Orientation Crosstabulation
228 289 269 786
90.1% 81.4% 79.1% 82.9%
25 66 71 162
9.9% 18.6% 20.9% 17.1%
253 355 340 948
100.0% 100.0% 100.0% 100.0%
Count
% within PoliticialOrientation
Count
% within PoliticialOrientation
Count
% within PoliticialOrientation
Favor
Oppose
Favor or OpposeGun Permits
Total
Liberal Independent Conservative
Politicial Orientation
Total
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 4545
Chi-square testChi-square test
In SPSS:In SPSS:
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 4646
Chi-square testChi-square test
In SPSSIn SPSS
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 4747
Chi-square testChi-square test
In SPSSIn SPSS
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 4848
Chi-square testChi-square test
SPSS outputSPSS outputFavor or Oppose Gun Permits * Politicial Orientation Crosstabulation
228 289 269 786
209.8 294.3 281.9 786.0
90.1% 81.4% 79.1% 82.9%
25 66 71 162
43.2 60.7 58.1 162.0
9.9% 18.6% 20.9% 17.1%
253 355 340 948
253.0 355.0 340.0 948.0
100.0% 100.0% 100.0% 100.0%
Count
Expected Count
% within PoliticialOrientation
Count
Expected Count
% within PoliticialOrientation
Count
Expected Count
% within PoliticialOrientation
Favor
Oppose
Favor or OpposeGun Permits
Total
Liberal Independent Conservative
Politicial Orientation
Total
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 4949
Chi-square testChi-square test
In SPSSIn SPSS
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 5050
Chi-square testChi-square test
In SPSSIn SPSS
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 5151
Chi-square testChi-square test
SPSS outputSPSS outputFavor or Oppose Gun Permits * Politicial Orientation Crosstabulation
228 289 269 786
209.8 294.3 281.9 786.0
90.1% 81.4% 79.1% 82.9%
25 66 71 162
43.2 60.7 58.1 162.0
9.9% 18.6% 20.9% 17.1%
253 355 340 948
253.0 355.0 340.0 948.0
100.0% 100.0% 100.0% 100.0%
Count
Expected Count
% within PoliticialOrientation
Count
Expected Count
% within PoliticialOrientation
Count
Expected Count
% within PoliticialOrientation
Favor
Oppose
Favor or OpposeGun Permits
Total
Liberal Independent Conservative
Politicial Orientation
Total
Chi-Square Tests
13.295a 2 .001
14.447 2 .001
11.681 1 .001
948
Pearson Chi-Square
Likelihood Ratio
Linear-by-LinearAssociation
N of Valid Cases
Value dfAsymp. Sig.
(2-sided)
0 cells (.0%) have expected count less than 5. Theminimum expected count is 43.23.
a.
POLS/GEOG 418 Spring 2005POLS/GEOG 418 Spring 2005 5252
Chi-square testChi-square test
Questions?Questions?
Recommended