ch27goodnessoffittest

# ch27goodnessoffittest - Chapter 27: Chapter Goodness of Fit...

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Chapter 27: Chapter Goodness of Fit Test Goodness Not on final exam!!!! Example 1: According to the W.H.O. (World Health Organization), medical causes of death of elderly people are in the proportions as shown. Column 3 below shows the number of elderly deaths for a study made in 2005 of 200 elderly deaths of Hong Kong residents. Is the W.H.O. model appropriate for Hong Kong? Is Cause 1 - Cancers 2 - Heart Attack 3 - other circulatory diseases 4 – Respiratory diseases 5 – Parkinson’s disease 6 – Aids 7 - Others Total W.H.O. model 0.08 0.22 0.40 0.19 0.03 0.01 0.07 1.00 H.K. data ( oi ) 26 36 70 52 4 1 11 200 Solution: Solution There are 7 pi ' s . We want to test H 0 : p1 = 0.08, p2 = 0.22,......., p7 = 0.07 : They are not all true. Under the model, i.e; under H 0 , then of 200 deaths Under 200 × 0.08 = 16 = e1 should belong to Group 1. should Similarly, we have the other expected numbers, HA e2 ,........., e7 If the fit is good, then in each group oi and ei If should not differ much. should Therefore, the differences o1 − e1 = 26 − 16 = 10 o2 − e2 = 36 − 44 = −8 ............. o7 − e7 = 11 − 14 = −3 Should be the major signal for looking at the signal goodness (or badness) of fit. goodness But (i) some differences are positive and some are But negative, so we better square them: negative, W.H.O H.K. data . Cause ( oi ) model 1 2 3 4 5 6 7 Total 0.08 0.22 0.40 0.19 0.03 0.01 0.07 1.00 26 36 70 52 4 1 11 200 ei 16 44 80 38 6 2 14 200 (o1 − e1 ) 2 = (26 − 16) 2 = 10 2 = 100 (o2 − e2 ) 2 = (36 − 44) 2 = (− 8) 2 = 64 ............. (o7 − e7 ) 2 = (11 − 14) 2 = (− 3) 2 = 9 (ii) A larger pi (resulting in a larger ei ) should tolerate a larger (oi − ei ) 2 Better divide this squared discrepancy by ei (o1 − e1 ) 100 = = 6.25 e1 16 2 (o2 − e2 ) 2 64 = = 1.4545 e2 44 [ In a way, oi − ei = signal And, by some mysterious reason, And, oi − ei Signal S ∴ = = ratio N Noise ei ei = noise (oi − ei ) 2 ∴ = ( S ratio) 2 N ei We have further We (o3 − e3 ) 2 (− 10) 2 = = 1.25 e3 80 (o4 − e4 ) 14 = = 5.1579 e4 38 2 2 When we come to group 5 and group 6, we have a problem that e6 = 2 < 5 This is too small. The present method is a largelargesample method. (In the previous section, where we discussed (In proportions, we needed large samples.) One way out is to combine two neighbouring groups, say, group 6 with group 5. groups, [(o5 + o6 ) − (e5 + e6 )]2 (5 − 8) 2 = = 1.125 e5 + e6 8 For group 7,it’s OK (as e > 5) (o − e ) 2 For 7 7 e7 (−3) 2 = = 0.6429 14 Cause 1 2 3 4 5 and 6 7 Total W.H.O H.K. data . ( oi ) model 0.08 0.22 0.40 0.19 0.04 0.07 1.00 26 36 70 52 5 11 200 ei oi − ei (oi − ei ) 2 (oi − ei ) 2 ei 16 44 80 38 8 14 200 10 -8 -10 14 -3 -3 0 100 64 100 196 9 9 XXX 6.25 1.4545 1.25 5.1579 1.125 0.6429 15.88 Finally, the test- statistic is Finally, (oi − ei ) 2 X =∑ ~ χ k −1 ei 2 2 where k= the number of categories. Now X 2 = (oi − ei ) 2 = 15.88 Now ∑ ei There are effectively 6 groups (instead of 7). There Since ∑ o = ∑ e = 200 , that is, since there is only ONE constraint on the oi ' s , one d.f. is lost. Therefore df = 6 -1 = 5 [Exact proof takes some time.] [Exact Another way of looking at the constraint is that ∑ pi = 1 Another i i Now, consult the CHI-SQUARED tables for the critical value. (Table 9) value. We have c.v(0.01)=15.09 We As the test statistic X² =15.88 >15.09 = critical value As 15.88 we reject H 0 at the 0.01 significance level. we Conclusion: The W.H.O. model is not suitable for HK. The above method is called the CHI-SQUARED test for Goodness of fit. CHI-SQUARED It is a large sample approximation method It where each ei ≥ 5 (oi − ei ) 2 X2 =∑ ei oi2 − 2oi ei + ei2 =∑ ei oi2 = ∑ − 2∑ oi + ∑ ei ei oi2 = ∑ −n ei Cause 1 2 3 4 5 and 6 7 Total W.H.O H.K. data . ( oi ) model 0.08 0.22 0.40 0.19 0.04 0.07 1.00 26 36 70 52 5 11 200 ei o 2 i oi2 ei 16 44 80 38 8 14 200 676 1296 4900 2704 25 121 XXXX 42.25 29.4545 61.25 71.1579 3.125 8.642857 215.88 Either formula gives the same answer for the test statistic: test (oi − ei ) 2 2 X =∑ ei o = ∑ −n ei = 215.88 − 200 = 15.88 2 i ...
View Full Document

## This note was uploaded on 02/22/2010 for the course FBE STAT0302 taught by Professor Unknown during the Spring '10 term at HKU.

Ask a homework question - tutors are online