520 likes | 705 Views
Week 13a. Making Inferences, Part III t and chi-square tests. Lecture Outline. Review of t tests and p values Calculating precise probabilities Hypothesis tests for nominal and ordinal variables. Review: confidence intervals.
E N D
Week 13a Making Inferences, Part III t andchi-square tests
Lecture Outline • Review of t tests and p values • Calculating precise probabilities • Hypothesis tests for nominal and ordinal variables POLS/GEOG 418 Spring 2005
Review: confidence intervals • We can construct an interval containing 95 percent of the observations • Calculate LCB and UCB • Using mean, s.e. and s • Useful for hypothesis testing • “confidence” in our findings POLS/GEOG 418 Spring 2005
Review: confidence intervals • Sample size matters! • Large samples: we assume normal distribution • n >= 1,000 • Small samples: use the t distribution • n < 1,000 • Look up values in McClendon POLS/GEOG 418 Spring 2005
Review: t tests • Two hypotheses for means comparisons • Does the sample mean differ from a hypothesized value? • Independent-sample t test POLS/GEOG 418 Spring 2005
Review: t tests • Two hypotheses for means comparisons • Do the means for two groups in the sample differ from each other? • Two-sample t test POLS/GEOG 418 Spring 2005
Review: t tests • Independent-sample • If hypothesized value is outside the C.I., we reject the alternate hypothesis • Two-sample • If the C.I. for the hypothesized difference contains zero, we reject the alternative POLS/GEOG 418 Spring 2005
Review: p values • Alternative to t tests • More precise: “precise probability” • Assigns any observation a probability p that we would observe it by chance • If p is low (less than .05) we accept the alternative hypothesis POLS/GEOG 418 Spring 2005
Review: SPSS output • Independent-sample t test Confidence Interval p value POLS/GEOG 418 Spring 2005
Review: SPSS output • Two-sample t test Confidence Interval p value POLS/GEOG 418 Spring 2005
Review • Questions? POLS/GEOG 418 Spring 2005
Obtaining p values • In SPSS • Manually POLS/GEOG 418 Spring 2005
Obtaining p values • A simple test statistic • The difference of the hypothesized mean and the null mean, divided by its standard error POLS/GEOG 418 Spring 2005
Obtaining p values • Standard error of difference POLS/GEOG 418 Spring 2005
Obtaining p values • The test statistic . . . • . . . is normally distributed for large samples • . . . is normally distributed when the population variance is known • . . . follows the t distribution when sample size is small, or when we don’t know the population variance POLS/GEOG 418 Spring 2005
Obtaining p values • Example: Do European governments spend more on social welfare than non-European governments? • Ha: “In comparing governments, those in Europe will spend more on social welfare than those outside of Europe.” POLS/GEOG 418 Spring 2005
Obtaining p values • Example: social welfare spending in Europe and outside POLS/GEOG 418 Spring 2005
Obtaining p values • Example: social welfare spending in Europe and outside • Assume a large sample POLS/GEOG 418 Spring 2005
Obtaining p values • Example: social welfare spending in Europe and outside • Assume a small sample POLS/GEOG 418 Spring 2005
Obtaining p values • Example: social welfare spending in Europe and outside • Is 19.23 a significant test statistic? POLS/GEOG 418 Spring 2005
Obtaining p values • Three ways to get p value for a given t or Z • Eyeball test • Student’s t table • SPSS or Excel POLS/GEOG 418 Spring 2005
Obtaining p values • Eyeball test • Is your test statistic (Z or t) greater than two? • If so, you can reject the null and accept the alternative hypothesis • 19.23 is far greater than two, so we accept the hypothesis that Europe spends more on social welfare POLS/GEOG 418 Spring 2005
Obtaining p values • Student’s t table • Look up critical t value in a table • NOTE: degrees of freedom = n – 1 • If your statistic exceeds the critical value, accept the alternative hypothesis POLS/GEOG 418 Spring 2005
Obtaining p values • Student’s t table POLS/GEOG 418 Spring 2005
Obtaining p values • From SPSS POLS/GEOG 418 Spring 2005
Obtaining p values • From SPSS POLS/GEOG 418 Spring 2005
Obtaining p values • Questions? POLS/GEOG 418 Spring 2005
Limitations of Z, t and p • Great for means comparisons • Cannot use with nominal or ordinal variables • Since zero has no meaning POLS/GEOG 418 Spring 2005
Chi-square test • Used for • Nominal variables • Ordinal variables • In conjunction with cross tabulation POLS/GEOG 418 Spring 2005
Chi-square test • Recall example from last Tuesday • Ha: “In comparing voters, those with more education will favor tougher environmental regulations than those with less education.” POLS/GEOG 418 Spring 2005
Chi-square test • Recall: 49.1% - 46.8% = 2.3% POLS/GEOG 418 Spring 2005
Chi-square test • Intuition: • what percentage would we expect to see in each cell if there is no relationship? • Chi-square test measures the differences between observed and expected frequencies in each cell POLS/GEOG 418 Spring 2005
Expected frequencies POLS/GEOG 418 Spring 2005
Expected frequencies POLS/GEOG 418 Spring 2005
Expected frequencies POLS/GEOG 418 Spring 2005
Expected frequencies POLS/GEOG 418 Spring 2005
Expected frequencies • If there is no relationship, we expect each cell within a category will follow the same proportion as the overall sample POLS/GEOG 418 Spring 2005
Expected frequencies Overall Proportion: 100 yeses out Of 200 total fe = (100 / 200) * 100 = 50 POLS/GEOG 418 Spring 2005
Expected frequencies POLS/GEOG 418 Spring 2005
Chi-square test • For any crosstab, we know • the totals for each value of the dependent variable (rows) • the totals for each group of the independent variable (columns) • We can calculate expected frequencies for any cell in any table POLS/GEOG 418 Spring 2005
Chi-square test • The sum of squared differences between observed and expected frequencies, divided by the expected frequency, follows the chi-square distribution POLS/GEOG 418 Spring 2005
Chi-square test • In six steps • Find the expected frequency for each cell • Subtract the expected from the observed frequency in each cell • For each cell, square the figure you obtained in step #2 • Divide this figure by fe • Add up all the totals from step 4 • Look up critical values in a chi-square table POLS/GEOG 418 Spring 2005
Chi-square test • SPSS example: Do liberals favor gun control more than conservatives? • Ha: “In comparing voters, liberals will express stronger support for gun control than will conservatives” POLS/GEOG 418 Spring 2005
Chi-square test • SPSS output, without the test statistic POLS/GEOG 418 Spring 2005
Chi-square test • In SPSS: POLS/GEOG 418 Spring 2005
Chi-square test • In SPSS POLS/GEOG 418 Spring 2005
Chi-square test • In SPSS POLS/GEOG 418 Spring 2005
Chi-square test • SPSS output POLS/GEOG 418 Spring 2005
Chi-square test • In SPSS POLS/GEOG 418 Spring 2005
Chi-square test • In SPSS POLS/GEOG 418 Spring 2005