12.07.2015 Views

Course Notes - Department of Mathematics and Statistics

Course Notes - Department of Mathematics and Statistics

Course Notes - Department of Mathematics and Statistics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• We can continue to calculate the the expected values for all <strong>of</strong>the values. Since the row <strong>and</strong> column totals must be met we cancalculate some <strong>of</strong> the values by subtraction (in square [] brackets).Pain ScoreIRS Improve No Change Worse TotalPlacebo 6 9 [5] r 1 = 20Single Dose 12 18 [10] r 2 = 40Double Dose [12] [18] [10] r 3 = 40c 1 = 30 c 2 = 45 c 3 = 25 n = 100Calculating the χ 2 statistic• We now need to compare the Observed <strong>and</strong> Expected counts.• Under the null hypothesis there should not be a big differencebetween these counts. But how closely must they agree?• We will use the χ 2 statistic:no.<strong>of</strong>rows∑i=1no.<strong>of</strong>columns∑j=1χ 2 = (O ij − E ij ) 2E ijχ 2 =(10 − 6)2 (5 − 9)2 (5 − 5)2+ +6 9 5(15 − 12)2 (20 − 18)2 (5 − 10)2+ + +12 18 10(5 − 12)2 (20 − 18)2 (15 − 10)2+ + +12 18 10= 14.72• Note χ 2 will always be positive.• In repeated sampling these χ 2 values are distributed as chi-squaredistribution which has ν degrees <strong>of</strong> freedom, whereν = (number <strong>of</strong> rows - 1) × (number <strong>of</strong> columns -1)155

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

Saved successfully!

Ooh no, something went wrong!