Presentation is loading. Please wait.

Presentation is loading. Please wait.

Week 13a Making Inferences, Part III t and chi-square tests.

Similar presentations


Presentation on theme: "Week 13a Making Inferences, Part III t and chi-square tests."— Presentation transcript:

1 Week 13a Making Inferences, Part III t and chi-square tests

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

3 POLS/GEOG 418 Spring 20053 Review: confidence intervals We can construct an interval containing 95 percent of the observations We can construct an interval containing 95 percent of the observations Calculate LCB and UCB Calculate LCB and UCB Using mean, s.e. and s Using mean, s.e. and s Useful for hypothesis testing Useful for hypothesis testing “confidence” in our findings “confidence” in our findings

4 POLS/GEOG 418 Spring 20054 Review: confidence intervals Sample size matters! Sample size matters! Large samples: we assume normal distribution Large samples: we assume normal distribution n >= 1,000 n >= 1,000 Small samples: use the t distribution Small samples: use the t distribution n < 1,000 n < 1,000 Look up values in McClendon Look up values in McClendon

5 POLS/GEOG 418 Spring 20055 Review: t tests Two hypotheses for means comparisons Two hypotheses for means comparisons Does the sample mean differ from a hypothesized value? Does the sample mean differ from a hypothesized value? Independent-sample t test Independent-sample t test

6 POLS/GEOG 418 Spring 20056 Review: t tests Two hypotheses for means comparisons Two hypotheses for means comparisons Do the means for two groups in the sample differ from each other? Do the means for two groups in the sample differ from each other? Two-sample t test Two-sample t test

7 POLS/GEOG 418 Spring 20057 Review: t tests Independent-sample Independent-sample If hypothesized value is outside the C.I., we reject the alternate hypothesis If hypothesized value is outside the C.I., we reject the alternate hypothesis Two-sample Two-sample If the C.I. for the hypothesized difference contains zero, we reject the alternative If the C.I. for the hypothesized difference contains zero, we reject the alternative

8 POLS/GEOG 418 Spring 20058 Review: p values Alternative to t tests Alternative to t tests More precise: “precise probability” More precise: “precise probability” Assigns any observation a probability p that we would observe it by chance 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 If p is low (less than.05) we accept the alternative hypothesis

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

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

11 POLS/GEOG 418 Spring 200511 Review Questions? Questions?

12 POLS/GEOG 418 Spring 200512 Obtaining p values In SPSS In SPSS Manually Manually

13 POLS/GEOG 418 Spring 200513 Obtaining p values A simple test statistic A simple test statistic The difference of the hypothesized mean and the null mean, divided by its standard error The difference of the hypothesized mean and the null mean, divided by its standard error

14 POLS/GEOG 418 Spring 200514 Obtaining p values Standard error of difference Standard error of difference

15 POLS/GEOG 418 Spring 200515 Obtaining p values The test statistic... The test statistic...... is normally distributed for large samples... is normally distributed for large samples... is normally distributed when the population variance is known... 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... follows the t distribution when sample size is small, or when we don’t know the population variance

16 POLS/GEOG 418 Spring 200516 Obtaining p values Example: Do European governments spend more on social welfare than non- European governments? Example: Do European governments spend more on social welfare than non- European governments? H a : “In comparing governments, those in Europe will spend more on social welfare than those outside of Europe.” H a : “In comparing governments, those in Europe will spend more on social welfare than those outside of Europe.”

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

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

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

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

21 POLS/GEOG 418 Spring 200521 Obtaining p values Three ways to get p value for a given t or Z Three ways to get p value for a given t or Z Eyeball test Eyeball test Student’s t table Student’s t table SPSS or Excel SPSS or Excel

22 POLS/GEOG 418 Spring 200522 Obtaining p values Eyeball test Eyeball test Is your test statistic (Z or t) greater than two? Is your test statistic (Z or t) greater than two? If so, you can reject the null and accept the alternative hypothesis 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 19.23 is far greater than two, so we accept the hypothesis that Europe spends more on social welfare

23 POLS/GEOG 418 Spring 200523 Obtaining p values Student’s t table Student’s t table Look up critical t value in a table Look up critical t value in a table NOTE: degrees of freedom = n – 1 NOTE: degrees of freedom = n – 1 If your statistic exceeds the critical value, accept the alternative hypothesis If your statistic exceeds the critical value, accept the alternative hypothesis

24 POLS/GEOG 418 Spring 200524 Obtaining p values Student’s t table Student’s t table

25 POLS/GEOG 418 Spring 200525 Obtaining p values From SPSS From SPSS

26 POLS/GEOG 418 Spring 200526 Obtaining p values From SPSS From SPSS

27 POLS/GEOG 418 Spring 200527 Obtaining p values Questions? Questions?

28 POLS/GEOG 418 Spring 200528 Limitations of Z, t and p Great for means comparisons Great for means comparisons Cannot use with nominal or ordinal variables Cannot use with nominal or ordinal variables Since zero has no meaning Since zero has no meaning

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

30 POLS/GEOG 418 Spring 200530 Chi-square test Recall example from last Tuesday Recall example from last Tuesday H a : “In comparing voters, those with more education will favor tougher environmental regulations than those with less education.” H a : “In comparing voters, those with more education will favor tougher environmental regulations than those with less education.”

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

32 POLS/GEOG 418 Spring 200532 Chi-square test Intuition: Intuition: what percentage would we expect to see in each cell if there is no relationship? 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 Chi-square test measures the differences between observed and expected frequencies in each cell

33 POLS/GEOG 418 Spring 200533 Expected frequencies MenWomenTotal Yes??100 No??100 Total100100200

34 POLS/GEOG 418 Spring 200534 Expected frequencies MenWomenTotal Yes5050100 No5050100 Total100100200

35 POLS/GEOG 418 Spring 200535 Expected frequencies MenWomenTotal Yes??40 No??160 Total100100200

36 POLS/GEOG 418 Spring 200536 Expected frequencies MenWomenTotal Yes202040 No8080160 Total100100200

37 POLS/GEOG 418 Spring 200537 Expected frequencies If there is no relationship, we expect each cell within a category will follow the same proportion as the overall sample If there is no relationship, we expect each cell within a category will follow the same proportion as the overall sample

38 POLS/GEOG 418 Spring 200538 Expected frequencies MenWomenTotal Yes??100 No??100 Total100100200 f e = (100 / 200) * 100 = 50 Overall Proportion: 100 yeses out Of 200 total

39 POLS/GEOG 418 Spring 200539 Expected frequencies MenWomenTotal Yes?50100 No??100 Total100100200

40 POLS/GEOG 418 Spring 200540 Chi-square test For any crosstab, we know For any crosstab, we know the totals for each value of the dependent variable (rows) the totals for each value of the dependent variable (rows) the totals for each group of the independent variable (columns) the totals for each group of the independent variable (columns) We can calculate expected frequencies for any cell in any table We can calculate expected frequencies for any cell in any table

41 POLS/GEOG 418 Spring 200541 Chi-square test The sum of squared differences between observed and expected frequencies, divided by the expected frequency, follows the chi-square distribution The sum of squared differences between observed and expected frequencies, divided by the expected frequency, follows the chi-square distribution

42 POLS/GEOG 418 Spring 200542 Chi-square test In six steps In six steps 1. Find the expected frequency for each cell 2. Subtract the expected from the observed frequency in each cell 3. For each cell, square the figure you obtained in step #2 4. Divide this figure by f e 5. Add up all the totals from step 4 6. Look up critical values in a chi-square table

43 POLS/GEOG 418 Spring 200543 Chi-square test SPSS example: Do liberals favor gun control more than conservatives? SPSS example: Do liberals favor gun control more than conservatives? H a : “In comparing voters, liberals will express stronger support for gun control than will conservatives” H a : “In comparing voters, liberals will express stronger support for gun control than will conservatives”

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

45 POLS/GEOG 418 Spring 200545 Chi-square test In SPSS: In SPSS:

46 POLS/GEOG 418 Spring 200546 Chi-square test In SPSS In SPSS

47 POLS/GEOG 418 Spring 200547 Chi-square test In SPSS In SPSS

48 POLS/GEOG 418 Spring 200548 Chi-square test SPSS output SPSS output

49 POLS/GEOG 418 Spring 200549 Chi-square test In SPSS In SPSS

50 POLS/GEOG 418 Spring 200550 Chi-square test In SPSS In SPSS

51 POLS/GEOG 418 Spring 200551 Chi-square test SPSS output SPSS output

52 POLS/GEOG 418 Spring 200552 Chi-square test Questions? Questions?


Download ppt "Week 13a Making Inferences, Part III t and chi-square tests."

Similar presentations


Ads by Google