100 STATISTICAL TESTS phần 7 ppsx

25 341 0
100 STATISTICAL TESTS phần 7 ppsx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

GOKA: “CHAP05D” — 2006/6/10 — 17:23 — PAGE 142 — #6 142 100 STATISTICAL TESTS Test 78 F-test for testing main effects and interaction effects in a two-way classification Object To test the main effects and interaction effects for the case of a two-way classification with an equal number of observations per cell. Limitations This test is applicable if the error in different measurements is normally distributed; if the relative size of these errors is unrelated to any factor of the experiment; and if the different measurements themselves are independent. Method Suppose we have n observations per cell of the two-way table, the observations being Y ijk , i = 1, 2, , p (level of A); j = 1, 2, , q (level of B) and k = 1, 2, , r. We use the model: Y ijk = µ + α i + β j + (αβ) ij + e ijk subject to the conditions that  i α i =  j β j =  j all j (αβ) ij =  i all i (αβ) ij = 0 and that the e ij are independently N(0, σ 2 ). Here (αβ) ij is the interaction effect due to simultaneous occurrence of the ith level of A and the jth level of B. We are interested in testing: H AB : all (αβ) ij = 0, H A : all α i = 0, H B : all β j = 0. Under the present set-up, the sum of squares due to the residual is given by s 2 E =  i  j  k (Y ijk − Y ij0 ) 2 , with rpq − pjq degrees of freedom, and the interaction sum of squares due to H AB is r  i  j (  αβ) 2 ij , GOKA: “CHAP05D” — 2006/6/10 — 17:23 — PAGE 143 — #7 THE TESTS 143 with (p − 1)(q −1) degrees of freedom, where (  αβ) ij = Y ij0 − Y i00 − Y 0 j 0 + Y 000 and this is also called the sum of squares due to the interaction effects. Denoting the interaction and error mean squares by ¯s 2 AB and ¯s 2 E respectively. The null hypothesis H AB is tested at the α level of significance by rejecting H AB if ¯s 2 AB ¯s 2 E > F (p−1)(q−1), pq(r−1); α and failing to reject it otherwise. For testing H A : a i = σ for all i, the restricted residual sum of squares is s 2 1 =  i  j  k (Y ijk − Y ij0 + Y i00 − Y 000 ) 2 = s 2 E + rq  i (Y i00 − Y 000 ) 2 , with rpq − pq + p − 1 degrees of freedom, and s 2 A = rq  i (Y i00 − Y 000 ) 2 , with p −1 degrees of freedom. With notation analogous to that for the test for H AB , the test for H A is then performed at level α by rejecting H A if ¯s 2 A ¯s 2 E > F (p−1), pq(r−1); α and failing to reject it otherwise. The test for H B is similar. Example An experiment is conducted in which a crop yield is compared for three different levels of pesticide spray and three different levels of anti-fungal seed treatment. There are four replications of the experiment at each level combination. Do the different levels of pesticide spray and anti-fungal treatment effect crop yield and is there a significant interaction? The ANOVA table yields F ratios that are all below the appropriate F value from Table 3 so the experiment has yielded no significant effects and the experimenter needs to find more successful treatments. GOKA: “CHAP05D” — 2006/6/10 — 17:23 — PAGE 144 — #8 144 100 STATISTICAL TESTS Numerical calculation B A I II III 1 956086 85 90 77 74 80 75 74 70 70 2 908983 80 90 70 92 91 75 82 86 72 3 706874 80 73 86 85 78 91 85 93 89 Table of means ¯ Y ij ¯ Y i·· 1 82 75 77 78.0 2 86 89 75 83.3 3 80 78 85 81.0 ¯ Y ··· ¯ Y .j. 82.7 80.7 79.0 80.8 s 2 A = 3 × 4 ×  i ( ¯ Y i·· − ¯ Y ··· ) 2 = 3 × 4 × 14.13 = 169.56 s 2 B = 3 × 4 ×  j ( ¯ Y ·j· − ¯ Y ··· ) 2 = 12 ×6.86 = 82.32 s 2 AB = 4  i  j ( ¯ Y ij· − ¯ Y i·· − ¯ Y ·j· + ¯ Y ··· ) 2 = 4 ×140.45 = 561.80 s 2 E =  i  j  k (Y ijk − ¯ Y ij· ) 2 = 1830.0 ANOVA table Source SS DF MS F ratio A 169.56 2 84.78 1.25 B 82.32 2 41.16 0.61 AB 561.80 4 140.45 2.07 Error 1830.00 27 67.78 Critical values F 2, 27 (0.05) = 3.35 [Table 3], F 4, 27 (0.05) = 2.73 [Table 3]. Hence we do not reject any of the three hypotheses. GOKA: “CHAP05D” — 2006/6/10 — 17:23 — PAGE 145 — #9 THE TESTS 145 Test 79 F -test for testing main effects in a two-way classification Object To test the main effects in the case of a two-way classification with unequal numbers of observations per cell. Limitations This test is applicable if the error in different measurements is normally distributed; if the relative size of these errors is unrelated to any factor of the experiment; and if the different measurements themselves are independent. Method We consider the case of testing the null hypothesis H A : α i = 0 for all i and H B : β j = 0 for all j under additivity. Under H A , the model is: Y ijk = µ + β j + e ijk , with the e ijk independently N(0, σ 2 ). The residual sum of squares (SS) under H A is s 2 2 =  i  j  k Y 2 ijk −  j C 2 j /n ·j· with n −q degrees of freedom, where n ·j· (µ+β j )+  i n ij α i = C j and n ij is the number of observations in the (i, j)th cell and  j n ij = n i· and  i n ij = n ·j· the adjusted SS due to A is SS A ∗ = s 2 2 − s 2 1 =  i ⎛ ⎝ R i −  j p ij C j ⎞ ⎠ ˆα i with p − 1 degrees of freedom, where n i· (µ + α i ) +  j n ij β j = R i , p ij = n ij /n .j . Under additivity, the test statistic for H A is SS A ∗ s 2 1 n − p −q +1 p − 1 , which, under H A , has the F-distribution with (p −1, n −p−q +1) degrees of freedom. Similarly, the test statistic for H B is SS B ∗ s 2 1 n − p −q +1 q − 1 , GOKA: “CHAP05D” — 2006/6/10 — 17:23 — PAGE 146 — #10 146 100 STATISTICAL TESTS which, under H B , has the F-distribution with (q −1, n −p −q +1) degrees of freedom; where SS B ∗ =  j (C j −  i q ij R i ) ˆ β j is the adjusted SS due to B, with q −1 degrees of freedom. Example Three different chelating methods (A) are used on three grades of vitamin supplement (B). The availability of vitamin is tested byastandard timed-release method. Since some of the tests failed there are unequal cell numbers. An appropriate analysis of variance is conducted, so that the sums of squares are adjusted accordingly. Here chelating method produce significantly different results but no interaction is indicated. However, Grade of vitamin has indicated no differences. Numerical calculation A B 123 Total 22 60 (126) 88 26 66 369 1 (172) (71) [0.2857] 84 23 [0.2500] [0.4286] 108 82 98 10 54 2 (308) (34) (196) 538 102 24 60 [0.3750] [0.2857] [0.4286] 108 80 20 50 3 (276) (36) (82) 394 88 16 32 [0.3750] [0.2857] [0.2857] Total 756 141 404 1301 Note 1. Values in parentheses are the totals. 2. Values in brackets are the ratio of the number of observations divided by the column total number of observations, e.g. the first column has 2/8 = 0.25. T = 1301, and T 2 = observation sum of squares = 100 021 CF (correction factor) = T 2 N = 76 936.41 Total SS = T 2 − T 2 N = 23 084.59 GOKA: “CHAP05D” — 2006/6/10 — 17:23 — PAGE 147 — #11 THE TESTS 147 SS between cells = 1 2 (172) 2 + 1 3 (71) 2 +···+ 1 2 (82) 2 − CF = 21 880.59 SS within cells (error) = total SS − SS between cells = 1204.00 SS A unadjusted = 1 8 (756) 2 + 1 7 (141) 2 + 1 7 (404) 2 − CF = 20 662.30 SS B unadjusted = 1 7 (369) 2 + 1 8 (538) 2 + 1 7 (394) 2 − CF = 872.23 C 11 = 7 − 2(0.2500) − 3(0.4286) − 2(0.2857) = 4.6428 C 12 =−5.0178, Q 1 = 369 − 756(0.2500) − 141(0.4286) − 404(0.2857) = 4.145 Q 2 = 41.062, Q 3 =−45.2065, ˆα 1 = 0.8341, ˆα 2 = 5.4146, ˆα 3 =−6.2487 SS B adjusted = Q 1 ˆα 1 + Q 2 ˆα 2 + Q 3 ˆα 3 = 508.27 SS A adjusted = SS B adjusted + SS A unadjusted − SS B unadjusted = 20 298.34 SS interaction = SS between cells −SS B adjusted − SS A unadjusted = 710.02 ANOVA table Source DF SS MS F ratio SSA adjusted 2 20 298.34 10 149.17 109.58 SSB adjusted 2 508.27 254.14 2.744 Interaction AB 4 710.02 177.50 1.92 Error 13 1 204.00 92.62 Critical values F 2,13; 0.05 = 3.81 [Table 3] F 4,13; 0.05 = 3.18 [Table 3] The main effects of A is significantly different, whereas the main effect B and interaction between A and B are not significant. GOKA: “CHAP05D” — 2006/6/10 — 17:23 — PAGE 148 — #12 148 100 STATISTICAL TESTS Test 80 F-test for nested or hierarchical classification Object To test for nestedness in the case of a nested or hierarchical classification. Limitations This test is applicable if the error in different measurements is normally distributed; if the relative size of these errors is unrelated to any factor of the experiment; and if the different measurements themselves are independent. Method In the case of a nested classification, the levels of factor B will be said to be nested with the levels of factor A if any level of B occurs with only a single level of A. This means that if A has p levels, then the q levels of B will be grouped into p mutually exclusive and exhaustive groups, such that the ith group of levels of B occurs only with the ith level of A in the observations. Here we shall only consider two-factor nesting, where the number of levels of B associated with the ith level of A is q i , i.e. we consider the case where there are  i q i levels of B. For example, consider a chemical experiment where factor A stands for the method of analysing a chemical, there being p different methods. Factor B may represent the different analysts, there being q i analysts associated with the ith method. The jth analyst performs the n ij experiments allotted to him. The corresponding fixed effects model is: Y ijk = µ + α i + β ij + e ijk , i = 1, 2, , p; j = 1, 2, , q i ; k = 1, 2, , n ij , p  i=l n i α i =  j all j n ij β j = 0 n i =  j n ij , n =  i n i and e ijk are independently N(0, σ 2 ). We are interested in testing H A : α i = 0, for all i, and H B : β ij = 0, for all i, j. The residual sum of squares is given by s 2 E =  i  j  k (Y ijk − Y ij0 ) 2 with  ij (n ij −1) degrees of freedom; the sums of squares due respectively to A and B are s 2 A =  i n i (Y i00 − Y 000 ) 2 GOKA: “CHAP05D” — 2006/6/10 — 17:23 — PAGE 149 — #13 THE TESTS 149 with p − 1 degrees of freedom, and s 2 B =  i  j n ij (Y ij0 − Y i00 ) with  i (q i − 1) degrees of freedom. To perform the tests for H A and H B we first require the mean squares, ¯s 2 E , ¯s 2 A and ¯s 2 B , corresponding to these sums of squares; we then calculate ¯s 2 A /¯s 2 E to test H A and ¯s 2 B /¯s 2 E to test H B , each of which, under the respective null hypothesis, follows the F-distribution with appropriate degrees of freedom. Nested models are frequently used in sample survey investigations. Example An educational researcher wishes to establish the relative contribution from the teachers and schools towards pupils’ reading scores. She has collected data relating to twelve teachers (three in each of four schools). The analysis of variance table produces an F ratio of 1.46 which is less than the critical value of 2.10 from Table 3. So the differences between teachers are not significant. The differences between schools are, however, significant since the calculated F ratio of 6.47 is greater than the critical value of 4.07. Why the schools should be different is another question. Numerical calculation Scores of pupils from three teachers in each of four schools are shown in the following table. Schools I II III IV Teacher Teacher Teacher Teacher 123123123123 44 39 39 51 48 44 46 45 43 42 45 39 41 37 36 49 43 43 43 40 41 39 40 38 39 35 33 45 42 42 41 38 39 38 37 35 36 35 31 44 40 39 40 38 37 36 37 35 35 34 28 40 37 37 36 35 34 34 32 35 32 30 26 40 34 36 34 34 33 31 32 29 Teacher total 227 210 193 269 244 241 240 230 227 220 223 211 Mean 37.83 35.0 32.17 44.83 40.67 40.17 40.0 38.33 37.83 36.67 37.17 35.17 School total 630 754 697 654 2735 Mean 35.00 41.89 38.72 36.34 T = 2735 CF (correction factor) = 2735 2 72 = 103 892.01 Total sum of squares = 105 637.00 − 103 892.01 = 1744.99 GOKA: “CHAP05D” — 2006/6/10 — 17:23 — PAGE 150 — #14 150 100 STATISTICAL TESTS Between-schools sum of squares = 630 2 18 + 754 2 18 + 697 2 18 + 654 2 18 − CF = 493.60 Between teachers (within school) sum of squares = 227 2 6 + 210 2 6 + 193 2 6 + 630 2 18 + similar terms for schools II, III and IV = 203.55 Within-group sum of squares = 1744.99 −493.60 − 203.55 = 1047.84. ANOVA table DF SS Mean square Schools 3 493.60 164.53 Teachers within school 8 203.55 25.44 Pupils within teachers 60 1047.84 17.46 Total 71 1744.99 Teacher differences: F = 25.44 17.46 = 1.46 Critical value F 8,60; 0.05 = 2.10 [Table 3]. The calculated value is less than the critical value. Hence the differences between teachers are not significant. School differences: F = 164.53 25.44 = 6.47 Critical value F 3,8; 0.05 = 4.07 [Table 3]. The calculated value is greater than the critical value. Hence the differences between schools are significant. GOKA: “CHAP05D” — 2006/6/10 — 17:23 — PAGE 151 — #15 THE TESTS 151 Test 81 F -test for testing regression Object To test the presence of regression of variable Y on the observed value X. Limitations For given X, the Y s are normally and independently distributed. The error terms are normally and independently distributed with mean zero. Method Suppose, corresponding to each value X i (i = 1, 2, , p) of the independent random variable X, we have a corresponding array of observations Y ij ( j = 1, 2, , n i ) on the dependent variable Y . Using the model: Y ij = µ i + e ij , i = 1, 2, , p, j = 1, 2, , n i , where the e ij are independently N (0, σ 2 ), we are interested in testing H 0 : all µ i are equal, against H 1 : not all µ i are equal. ‘H 0 is true’ implies the absence of regression of Y on X. Then the sums of squares are given by s 2 B =  i n i (Y i0 − Y 00 ) 2 , s 2 E =  i  j (Y ij − Y i0 ) 2 . Denoting the corresponding mean squares by ¯s 2 B and ¯s 2 E respectively, then, under H 0 , F =¯s 2 B /¯s 2 E follows the F-distribution with (p − 1, n − p) degrees of freedom. Example It is desired to test for the presence of regression (i.e. non-zero slope) in comparing an independent variable X, with a dependent variable Y. A small-scale experiment is set up to measure perceptions on a simple dimension (Y) to a visual stimulus (X). The results test for the presence of a regression of Y on X. The experiment is repeated three times at two levels of X. Since the calculated F value of 24 is larger than the critical F value from Table 3, the null hypothesis is rejected, indicating the presence of regression. Numerical calculation Y ij X 1 X 2 123 756 n 1 = 3, where Y i0 = n i  j=1 Y ij n i , i = 1, 2, , p n 2 = 3, and Y 00 =  i  j Y ij n , n =  n i [...]... calculation i 1 2 3 4 5 6 7 8 9 10 11 12 xi 150 150 150 200 200 200 250 250 250 300 300 300 yi 77 .4 76 .7 78.2 84.1 84.5 83 .7 88.9 89.2 89 .7 94.8 94 .7 95.9 n = 12, n − 2 = 10 For β = 0, test H0 : β = 0 against H1 : β = 0 154 100 STATISTICAL TESTS The total sum of squares is yi2 − yi 2 n = 513.11 67, and 1 x i yi n 1 xi2 − (xi )2 n 2 xi yi − 2 sR = b = 509.10, 2 ¯2 ¯2 sE = 4.01 17, sR = 42.425, sE = 0.401,... (24 .7) 11 .7 12.2 (24.5) 12.3 136.0 III 11 .7 (21 .7) 10.0 9.8 (21 .7) 11.9 11 .7 (24.3) 12.6 7. 9 (16.0) 8.1 8.3 (16.2) 7. 9 8.6 (19.1) 10.5 119.0 CF (correction factor) = 358.52 /36 = 3 570 .0625 TSS = 7. 82 + · · · + 10.52 − (3 570 .0625) = 123. 57 The sums of squares are given by (103.5)2 + (136.0)2 + (119.0)2 − CF = 44.04 12 61.32 + · · · + 62.92 2 − CF = 6.80 sR = 6 16.52 + · · · + 19.12 2 = 14.54 sE = 7. 82... 0 76 79 100 200 80 43 63 39 76 × 200 80 × 39 = 0.654; β2 = loge = 0.141 79 × 100 43 × 63 0.654 − 0.141 = 1.493 1 1 1 1 1 1 1 1 + + + + + + + 76 79 100 200 80 43 63 39 β1 = loge Z= The critical value at α = 0.05 is 1.96 [Table 1] The calculated value is less than the critical value Hence it is not significant and the null hypothesis (that β is not different across groups) cannot be rejected 158 100 STATISTICAL. ..152 100 STATISTICAL TESTS Hence Y10 = Y00 = 1+2+3 7+ 5+6 = 2, Y20 = = 6, 3 3 1+2+3 +7+ 5+6 =4 6 2 sB = 3(2 − 4)2 + 3(6 − 4)2 = 24 2 sE = (1 − 2)2 + (2 − 2)2 + (3 − 2)2 + (7 − 6)2 + (5 − 6)2 + (6 − 6)2 = 4 ¯2 sB = 24/1 = 24, sE = 4/4 = 1, F = 24/1 = 24 ¯2 Critical value F1,4; 0.05 = 7. 71 [Table 3] Hence reject the null hypothesis, indicating the presence of regression THE TESTS 153 Test 82... sE = 7. 82 + · · · + 10.52 − 2 2 sI = 123. 57 − 44.04 − 6.8 − 14.54 = 58.19 2 sC = Total 61.3 60.8 55.1 57. 6 60.8 62.9 358.5 THE TESTS ANOVA table Source DF SS MS F Column Row Interaction Error 2 5 10 18 44.04 6.80 58.19 14.54 22.02 1.36 5.82 0.81 3 .78 1.68 7. 19 Total 35 123. 57 Critical values F10,18;0.05 = 2.41 [Table 3] F2,10; 0.05 = 4.10 F5,18; 0.05 = 2 .77 Hence H0 : σAB = 0 is rejected 2 H0 : σA... factors is significant but their interaction is significant 162 100 STATISTICAL TESTS Numerical calculation In the following table the values are a combination of classroom and task and represent the independent performance of two subjects in each cell Classroom 1 2 3 4 5 6 Total Tasks II I 7. 8 (16.5) 8 .7 8.0 ( 17. 2) 9.2 4.0 (10.9) 6.9 10.3 (19 .7) 9.4 9.3 (19.9) 10.6 9.5 (19.3) 9.8 103.5 11.1 (23.1) 12.0... calculation n = 16, p = 3, ν = p − 1, ν2 = n − p Critical value F2, 13; 0.05 = 3.81 [Table 3] From the computer output of a certain set of data ¯2 sH = 96 .74 439, sE = 0.28935 ¯2 F = 96 .74 439/0.28935 = 334.35 Hence reject the null hypothesis 160 100 STATISTICAL TESTS Test 86 F -test for variance of a random effects model Object To test for variance in a balanced random effects model of random variables Limitations... (−0.2, −0.3, −0.4, 0.4, 0.3, 0.5) as a random sample from a rectangular distribution Here, n=6 R = 0.5 − (−0.2) = 0 .7, Z = max[0.4, 0.5] = 0.5 λ= R 2Z 6 = (0 .7) 6 = 0.1 176 , 2 loge λ = −4.2809 2 Critical value χ2; 0.05 = 5.99 [Table 5] Hence we reject the null hypothesis that α = 0 THE TESTS 165 Test 89 Uniformly most powerful test for the parameter of an exponential population Object To test the parameter... a sample of size 2 from the population f (X1 θ ) = θ e−θX , X > 0 Consider testing H0 : θ = 1 against H1 : θ = 2, i.e θ > θ0 The critical region is W= X Xi 2 χ0.95,4/2 = X Xi 0 .71 /2 [Table 5] = X Xi 0.36 166 100 STATISTICAL TESTS Test 90 Sequential test for the parameter of a Bernoulli population Object To test the parameter of the Bernoulli population by the sequential method Limitations This test... 0.83 − 0.50 = 2.20 0.50(1 − 0.50)(1 − 0.50) (12 − 1)(0.50) The critical value at α = 0.05 is 1.96 [Table 1] The calculated value is greater than the critical value Hence it is significant 156 100 STATISTICAL TESTS Test 84 Z-test for comparing sequential contingencies across two groups using the ‘log odds ratio’ Object To test the significance of the difference in sequential connections across groups . 2006/6/10 — 17: 23 — PAGE 144 — #8 144 100 STATISTICAL TESTS Numerical calculation B A I II III 1 956086 85 90 77 74 80 75 74 70 70 2 908983 80 90 70 92 91 75 82 86 72 3 70 6 874 80 73 86 85 78 91 85. 2 27 210 193 269 244 241 240 230 2 27 220 223 211 Mean 37. 83 35.0 32. 17 44.83 40. 67 40. 17 40.0 38.33 37. 83 36. 67 37. 17 35. 17 School total 630 75 4 6 97 654 273 5 Mean 35.00 41.89 38 .72 36.34 T = 273 5 CF. ( 172 ) (71 ) [0.28 57] 84 23 [0.2500] [0.4286] 108 82 98 10 54 2 (308) (34) (196) 538 102 24 60 [0. 375 0] [0.28 57] [0.4286] 108 80 20 50 3 ( 276 ) (36) (82) 394 88 16 32 [0. 375 0] [0.28 57] [0.28 57] Total 75 6

Ngày đăng: 23/07/2014, 16:21

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan