Statistics 36-720: Discrete Multivariate Analysis Lectures 2, Fall, 2011 Stephen E. Fienberg Department of Statistics Carnegie Mellon University http://www.stat.cmu.edu/~fienberg/Statistics36-720-11/stats36-720-11.html October, 2011
1
Temporary Webpage http://www.stat.cmu.edu/~gklein/ discrete.shtml For R handouts and data sets, SAS materials, etc.
October, 2011
2
Page 1
Lecture 2 • Handouts – Assignment 1 (due November 3) – Categorical Data Analysis in R: functions for chisquare tests, Fisher’s exact test, and data frames. • Available from course webpage only
• Outline – Some history – Equivalence for 2×2 tables – Alternative 2×2 table structures – R function handouts October, 2011
3
Pre-History • Quetelet (1848) – Measuring association
• Bienayme (1856) – Hypergeometric analysis for 2 × 2 tables
• Galton (1892) – expected values: Expected Count (i, j) = Row Total (i) × Column Marginal Total (j) / Grand Total October, 2011
Page 2
!
4
Some History Yule (1900) Pearson (1900) Fisher (1922)
Bartlett (1935)
Roy & Mitra (1956); Roy & Kastenbaum (1956) Plackett (1962); Darroch (1962); Good (1963) October, 2011
5
Some History II Birch (1963,1964,1965) Goodman (1962, 1968, 1969) National Halothane Study (1969) Bishop (1966, 1969) Mosteller (1968) Haberman (1971; 1974) Bishop, Fienberg, & Holland (1975) October, 2011
6
Page 3
Some History III Nelder and Wedderburn (1972) Nelder and McCullagh (1983,1989) GLIM Darroch, Lauritzen, & Speed (1980); Lauritzen (1996)
Rinaldo (2005) October, 2011
7
Some History: IV Grizzle, Starmer, and Koch (1969)
Two historical reviews, to be posted on course webpage: Fienberg and Rinaldo (2007) Fienberg (2011) Kochfest: October 2009
Page 4
8
Table 1: Common Colds • 2 × 2 table showing incidence of common colds in double blind study involving 279 French skiers. Cold
No Cold Totals
31
109
140
Treatment 17
122
139
Totals
231
279
Placebo
48
October, 2011
9
Comparing Binomial Proportions • Notation – observed counts: {xij}; totals ni=Σj xij – expected counts: {mij} – binomial probabilities: {pi} pˆ i = x i 1 / ni i = 1,2.
• Example: Vitamin C Cold No Cold Totals Placebo x11=31 x12= 109 n1= 140 October, 2011
Treat.
x21= 17 x22= 122 n2= 139
Page 5
10
Two Sample Test pˆ 1 − pˆ 2 =
x11 x 21 − ; n1 n2
V (pˆ 1 − pˆ 2 ) =
E (pˆ 1 − pˆ 2 ) = p1 − p2
p1 (1 − p1 ) p2 (1 − p2 ) + n1 n2
⎡1 1⎤ If H 0 : p1 = p2 = p, V (pˆ 1 − pˆ 2 ) = p(1 − p )⎢ + ⎥ ⎣ n1 n2 ⎦ pˆ 1 − pˆ 2 x + x 21 z= where p = 11 n1 + n2 ⎡1 1⎤ p(1 − p )⎢ + ⎥ October, 2011 11 ⎣ n1 n2 ⎦
Equivalence to X2 • For example, z=2.19 and p-value