PDB_Stat_100_Lecture_24_Notes_with_Solutions - Notes STA...

This preview shows page 1 - 4 out of 10 pages.

STA 100 Lecture 24 Paul Baines Department of Statistics University of California, Davis November 22nd, 2013 Admin for the Day I Project groups due today (see handout) I Project proposals due Monday in class! (one per group) References for Today: ABD ; Samuels 12.(1-6); References for Monday: ABD ; Samuels 12.(1-6); Practice Problems: ABD ; Samuels 12.3.(1,3,5) Basic Data Analysis: Methods Explanatory Variable Binary Continuous Response Variable Binary 2 × 2 Contingency Tables Logistic Regression (not covered) Continuous Two-Sample Methods Simple Linear Regression (next. . . ) For expanded table click here . Basic Data Analysis: Methods Explanatory Variable Categorical Continuous Response Variable Categorical R × C Contingency Tables GLMs (not covered) Continuous ANOVA (final week) Simple Linear Regression (next. . . ) For expanded table click here . Notes Notes Notes Notes
Contingency Tables: Recap We have looked at three tests for investigating whether two ‘groups’ had the same probability of success: the two-sample Binomial test, the Fisher Exact test, and, the χ 2 test. Scientifically, these tests tell us whether the binary explanatory variable that defines the groups (e.g., sex, region, type of drug) is related to the binary response variable (e.g., cured/not cured, injured/not injured). We can actually use the ideas behind the Fisher Exact test and the χ 2 -test in a more general setting. . . Example: Are hair color and eye color independent? Here we have two categorical variables, each with more than two possible values. The Data Example: You have data on 6,800 randomly sampled German men: Hair Color Brown Black Fair Red Total Eye Color Brown 438 288 115 16 857 Grey/Green 1387 746 946 53 3132 Blue 807 189 1768 47 2811 Total 2632 1223 2829 116 6800 We want to test: I H 0 : Eye color and hair color are independent I H 1 : Eye color and hair color are not independent Expected Tables The same logic applies for the other cells. As derived last time, the expected cell count in cell ( i , j ) (under H 0 and subject to the row/column constraints) is the row total of row i multiplied by the column total of column j , divided by the total total. For the eye-hair color example: I E 11 = 857 × 2632 6800 = 331 . 7 I E 12 = 857 × 1223 6800 = 154 . 1 I E 13 = 857 × 2829 6800 = 356 . 5 I E 14 = 857 × 116 6800 = 14 . 6 I E 21 = 3132 × 2632 6800 = 1212 . 3 I etc. The Expected Table This is the table of expected cell counts if H 0 is true: Brown Black Fair Red Total Brown E 11 E 12 E 13 E 14 R 1 Grey/Green E 21 E 22 E 23 E 24 R 2 Blue E 31 E 32 E 33 E 34 R 3 Total C 1 C 2 C 3 C 4 N This is the table of observed cell counts: Brown Black Fair Red Total Brown O 11 O 12 O 13 O 14 R 1 Grey/Green O 21 O 22 O 23 O 24 R 2 Blue O 31 O 32 O 33 O 34 R 3 Total C 1 C 2 C 3 C 4 N Notes Notes Notes Notes
Computing p - values Example: For the eye-hair color example: X 2 = ( O 11 - E 11 ) 2 E 11 + ( O 12 - E 12 ) 2 E 12 + ( O 13 - E 13 ) 2 E 13 + ( O 14 - E 14 ) 2 E 14 ( O 21 - E 21 ) 2 E 21 + ( O 22 - E 22 ) 2 E 22 + ( O 23 - E 23 ) 2 E 23 + ( O 24 - E 24 ) 2 E 24 ( O 31 - E 31 ) 2 E 31 + ( O 32 - E 32 ) 2 E 32 + ( O 33 - E 33 ) 2 E 33 + ( O 34 - E 34 ) 2 E 34 = (438 - 331 . 7) 2 331 . 7 + (228 - 154 . 1) 2 154 . 1 + · · · + (47 - 48 . 0) 2 48 . 0

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture