11.07.2015 Views

Preface to First Edition - lib

Preface to First Edition - lib

Preface to First Edition - lib

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

52 SIMPLE INFERENCEsmall sample sizes can be computed relatively simply and a large sample approximationis available. It should be noted that this test is valid only whenthe differences d i are symmetrically distributed.3.2.3 Testing Independence in Contingency TablesWhen a sample of n observations in two nominal (categorical) variables areavailable, they can be arranged in<strong>to</strong> a cross-classification (see Table 3.6) inwhich the number of observations falling in each cell of the table is recorded.Table 3.6 is an example of such a contingency table, in which the observationsfor a sample of individuals or objects are cross-classified with respect <strong>to</strong> twocategorical variables. Testing for the independence of the two variables x andy is of most interest in general and details of the appropriate test follow.Table 3.6:The general r × c table.xy1 . .. c1 n 11 . .. n 1c n 1·2 n 21 . .. n 2c n 2·.. . ....r n r1 . .. n rc n r·n·1 . .. n·c nUnder the null hypothesis of independence of the row variable x and thecolumn variable y, estimated expected values E jk for cell (j,k) can be computedfrom the corresponding margin <strong>to</strong>tals E jk = n j·n·k /n. The test statisticfor assessing independence isX 2 =r∑c∑j=1 k=1(n jk − E jk ) 2E jk.Under the null hypothesis of independence, the test statistic X 2 is asymp<strong>to</strong>ticallydistributed according <strong>to</strong> a χ 2 -distribution with (r − 1)(c − 1) degreesof freedom, the corresponding test is usually known as chi-squared test.3.2.4 McNemar’s TestThe chi-squared test on categorical data described previously assumes thatthe observations are independent. Often, however, categorical data arise frompaired observations, for example, cases matched with controls on variablessuch as gender, age and so on, or observations made on the same subjectson two occasions (cf. paired t-test). For this type of paired data, the required© 2010 by Taylor and Francis Group, LLC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!