1 / 54

Chapter 10

Chapter 10. Hypothesis testing: Categorical Data Analysis. Learning Objectives. Comparison of binomial proportion using Z and  2 Test. Explain  2 Test for Independence of 2 variables Explain The Fisher’s test for independence McNemar’s tests for correlated data Kappa Statistic

sadie
Télécharger la présentation

Chapter 10

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. Chapter 10 Hypothesis testing: Categorical Data Analysis EPI809/Spring 2008

  2. Learning Objectives • Comparison of binomial proportion using Z and 2 Test. • Explain 2 Test for Independence of 2 variables • Explain The Fisher’s test for independence • McNemar’s tests for correlated data • Kappa Statistic • Use of SAS Proc FREQ EPI809/Spring 2008

  3. Data Types EPI809/Spring 2008

  4. Qualitative Data • Qualitative Random Variables Yield Responses That Can Be Put In Categories. Example: Gender (Male, Female) • Measurement or Count Reflect # in Category • Nominal (no order) or Ordinal Scale (order) • Data can be collected as continuous but recoded to categorical data. Example (Systolic Blood Pressure - Hypotension, Normal tension, hypertension ) EPI809/Spring 2008

  5. Hypothesis Tests Qualitative Data EPI809/Spring 2008

  6. Z Test for Differences in Two Proportions EPI809/Spring 2008

  7. Hypotheses for Two Proportions EPI809/Spring 2008

  8. Hypotheses for Two Proportions EPI809/Spring 2008

  9. Hypotheses for Two Proportions EPI809/Spring 2008

  10. Hypotheses for Two Proportions EPI809/Spring 2008

  11. Hypotheses for Two Proportions EPI809/Spring 2008

  12. Hypotheses for Two Proportions EPI809/Spring 2008

  13. Z Test for Difference in Two Proportions 1. Assumptions • Populations Are Independent • Populations Follow Binomial Distribution • Normal Approximation Can Be Used for large samples (All Expected Counts  5) • Z-Test Statistic for Two Proportions EPI809/Spring 2008

  14. Sample Distribution for Difference Between Proportions EPI809/Spring 2008

  15. Z Test for Two Proportions Thinking Challenge MA • You’re an epidemiologist for the US Department of Health and Human Services. You’re studying the prevalence of disease X in two states (MA and CA). In MA, 74 of 1500people surveyed were diseased and in CA, 129 of 1500 were diseased. At .05 level, does MA have a lower prevalence rate? CA EPI809/Spring 2008

  16. Z Test for Two Proportions Solution* EPI809/Spring 2008

  17. Z Test for Two Proportions Solution* H0: Ha:  = nMA = nCA= Critical Value(s): Test Statistic: Decision: Conclusion: EPI809/Spring 2008

  18. Z Test for Two Proportions Solution* H0: pMA - pCA = 0 Ha: pMA - pCA < 0 = nMA = nCA= Critical Value(s): Test Statistic: Decision: Conclusion: EPI809/Spring 2008

  19. Z Test for Two Proportions Solution* H0: pMA - pCA = 0 Ha: pMA - pCA < 0 = .05 nMA= 1500 nCA= 1500 Critical Value(s): Test Statistic: Decision: Conclusion: EPI809/Spring 2008

  20. Z Test for Two Proportions Solution* H0: pMA - pCA = 0 Ha: pMA - pCA < 0 = .05 nMA= 1500 nCA= 1500 Critical Value(s): Test Statistic: Decision: Conclusion: EPI809/Spring 2008

  21. Z Test for Two Proportions Solution* EPI809/Spring 2008

  22. Z Test for Two Proportions Solution* H0: pMA - pCA = 0 Ha: pMA - pCA < 0 = .05 nMA= 1500 nCA= 1500 Critical Value(s): Test Statistic: Decision: Conclusion: Z = -4.00 EPI809/Spring 2008

  23. Z Test for Two Proportions Solution* H0: pMA - pCA = 0 Ha: pMA - pCA < 0 = .05 nMA= 1500 nCA= 1500 Critical Value(s): Test Statistic: Decision: Conclusion: Z = -4.00 Reject at  = .05 EPI809/Spring 2008

  24. Z Test for Two Proportions Solution* H0: pMA - pCA = 0 Ha: pMA - pCA < 0 = .05 nMA= 1500 nCA= 1500 Critical Value(s): Test Statistic: Decision: Conclusion: Z = -4.00 Reject at  = .05 There is evidence MA is less than CA EPI809/Spring 2008

  25. 2 Test of Independence Between 2 Categorical Variables EPI809/Spring 2008

  26. Hypothesis Tests Qualitative Data EPI809/Spring 2008

  27. 2 Test of Independence 1. Shows If a Relationship Exists Between 2 Qualitative Variables, but does Not Show Causality 2. Assumptions Multinomial Experiment All Expected Counts  5 3. Uses Two-Way Contingency Table EPI809/Spring 2008

  28. 2 Test of Independence Contingency Table • 1. Shows # Observations From 1 Sample Jointly in 2 Qualitative Variables EPI809/Spring 2008

  29. 2 Test of Independence Contingency Table 1. Shows # Observations From 1 Sample Jointly in 2 Qualitative Variables Levels of variable 2 Levels of variable 1 EPI809/Spring 2008

  30. 2 Test of Independence Hypotheses & Statistic 1. Hypotheses • H0: Variables Are Independent • Ha: Variables Are Related (Dependent) EPI809/Spring 2008

  31. 2 Test of Independence Hypotheses & Statistic 1. Hypotheses H0: Variables Are Independent Ha: Variables Are Related (Dependent) 2. Test Statistic Observed count Expected count EPI809/Spring 2008

  32. 2 Test of Independence Hypotheses & Statistic 1. Hypotheses H0: Variables Are Independent Ha: Variables Are Related (Dependent) 2. Test Statistic Degrees of Freedom: (r - 1)(c - 1) Observed count Expected count Rows Columns EPI809/Spring 2008

  33. 2 Test of Independence Expected Counts 1. Statistical Independence Means Joint Probability Equals Product of Marginal Probabilities 2. Compute Marginal Probabilities & Multiply for Joint Probability 3. Expected Count Is Sample Size Times Joint Probability EPI809/Spring 2008

  34. Expected Count Example EPI809/Spring 2008

  35. Expected Count Example 112 160 Marginal probability = EPI809/Spring 2008

  36. Expected Count Example 112 160 Marginal probability = 78 160 Marginal probability = EPI809/Spring 2008

  37. 112 160 78 160 Expected Count Example 112 160 Joint probability = Marginal probability = 78 160 Marginal probability = EPI809/Spring 2008

  38. 112 160 78 160 112 160 78 160 Expected count = 160· Expected Count Example 112 160 Joint probability = Marginal probability = 78 160 Marginal probability = = 54.6 EPI809/Spring 2008

  39. Expected Count Calculation EPI809/Spring 2008

  40. Expected Count Calculation EPI809/Spring 2008

  41. Expected Count Calculation 112x78 160 112x82 160 48x78 160 48x82 160 EPI809/Spring 2008

  42. 2 Test of Independence Example on HIV • You randomly sample 286 sexually active individuals and collect information on their HIV status and History of STDs. At the .05 level, is there evidence of a relationship? EPI809/Spring 2008

  43. 2 Test of Independence Solution EPI809/Spring 2008

  44. 2 Test of Independence Solution H0: Ha:  = df = Critical Value(s): Test Statistic: Decision: Conclusion: EPI809/Spring 2008

  45. 2 Test of Independence Solution H0: No Relationship Ha: Relationship  = df = Critical Value(s): Test Statistic: Decision: Conclusion: EPI809/Spring 2008

  46. 2 Test of Independence Solution H0: No Relationship Ha: Relationship  = .05 df = (2 - 1)(2 - 1) = 1 Critical Value(s): Test Statistic: Decision: Conclusion: EPI809/Spring 2008

  47. 2 Test of Independence Solution H0: No Relationship Ha: Relationship  = .05 df = (2 - 1)(2 - 1) = 1 Critical Value(s): Test Statistic: Decision: Conclusion:  = .05 EPI809/Spring 2008

  48. 2 Test of Independence Solution  E(nij) 5 in all cells 116x132 286 154x116 286 170x132 286 170x154 286 EPI809/Spring 2008

  49. 2 Test of Independence Solution EPI809/Spring 2008

  50. 2 Test of Independence Solution H0: No Relationship Ha: Relationship  = .05 df = (2 - 1)(2 - 1) = 1 Critical Value(s): Test Statistic: Decision: Conclusion: 2 = 54.29  = .05 EPI809/Spring 2008

More Related