1 / 52

Week 13a

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.

filia
Download Presentation

Week 13a

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Week 13a Making Inferences, Part III t andchi-square tests

  2. Lecture Outline • Review of t tests and p values • Calculating precise probabilities • Hypothesis tests for nominal and ordinal variables POLS/GEOG 418 Spring 2005

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. Review: SPSS output • Independent-sample t test Confidence Interval p value POLS/GEOG 418 Spring 2005

  10. Review: SPSS output • Two-sample t test Confidence Interval p value POLS/GEOG 418 Spring 2005

  11. Review • Questions? POLS/GEOG 418 Spring 2005

  12. Obtaining p values • In SPSS • Manually POLS/GEOG 418 Spring 2005

  13. 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

  14. Obtaining p values • Standard error of difference POLS/GEOG 418 Spring 2005

  15. 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

  16. 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

  17. Obtaining p values • Example: social welfare spending in Europe and outside POLS/GEOG 418 Spring 2005

  18. Obtaining p values • Example: social welfare spending in Europe and outside • Assume a large sample POLS/GEOG 418 Spring 2005

  19. Obtaining p values • Example: social welfare spending in Europe and outside • Assume a small sample POLS/GEOG 418 Spring 2005

  20. Obtaining p values • Example: social welfare spending in Europe and outside • Is 19.23 a significant test statistic? POLS/GEOG 418 Spring 2005

  21. 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

  22. 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

  23. 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

  24. Obtaining p values • Student’s t table POLS/GEOG 418 Spring 2005

  25. Obtaining p values • From SPSS POLS/GEOG 418 Spring 2005

  26. Obtaining p values • From SPSS POLS/GEOG 418 Spring 2005

  27. Obtaining p values • Questions? POLS/GEOG 418 Spring 2005

  28. 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

  29. Chi-square test • Used for • Nominal variables • Ordinal variables • In conjunction with cross tabulation POLS/GEOG 418 Spring 2005

  30. 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

  31. Chi-square test • Recall: 49.1% - 46.8% = 2.3% POLS/GEOG 418 Spring 2005

  32. 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

  33. Expected frequencies POLS/GEOG 418 Spring 2005

  34. Expected frequencies POLS/GEOG 418 Spring 2005

  35. Expected frequencies POLS/GEOG 418 Spring 2005

  36. Expected frequencies POLS/GEOG 418 Spring 2005

  37. 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

  38. Expected frequencies Overall Proportion: 100 yeses out Of 200 total fe = (100 / 200) * 100 = 50 POLS/GEOG 418 Spring 2005

  39. Expected frequencies POLS/GEOG 418 Spring 2005

  40. 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

  41. 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

  42. 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

  43. 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

  44. Chi-square test • SPSS output, without the test statistic POLS/GEOG 418 Spring 2005

  45. Chi-square test • In SPSS: POLS/GEOG 418 Spring 2005

  46. Chi-square test • In SPSS POLS/GEOG 418 Spring 2005

  47. Chi-square test • In SPSS POLS/GEOG 418 Spring 2005

  48. Chi-square test • SPSS output POLS/GEOG 418 Spring 2005

  49. Chi-square test • In SPSS POLS/GEOG 418 Spring 2005

  50. Chi-square test • In SPSS POLS/GEOG 418 Spring 2005

More Related