Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
53 3.2. The C.I. and Hypothesis Testing: F and 2 (I) 1 100% confidence intervals: One sample 2 : 2 2 n 1s , n 1s n21, n21,1 2 2 Two samples . 12 : 22 s12 s12 s22 s22 , 2 f f n2 1, n 1,1 n1 1, n2 1, 2 1 2 2 (II) Hypothesis testing: One sample 2 : n 1s 2 2 2 0 2 Two samples 1 22 : s12 f s22 2 12 Summary table: One sample Point estimate Classical approach (critical values) s Two samples 2 s12 n21, , n21,1 , , 2 n 1, 2 2 n 1,1 f n1 1,n2 1, , f n1 1,n2 1,1 , 2 f n 1,n 1, , f n 1,n 1,1 1 Null distribution (p-value) n21 53 s 22 2 2 1 Fn1 1,n2 1 2 2 54 ANOVA for testing the equality of k population means. n x k j 1 f= n k j 1 2 j j j x 2 k 1 ~ Fk 1, n k T 1 s 2j nT k test for proportions of a multinomial population and for the independence (contingency table). k i 1 p m i 1 j 1 f f i ei 2 ~ ei eij k21 , 2 ij eij ~ p 1m 1 2 Example 1: A sample size of 12 provides a sample variance of 0.042. Test H 0 : 2 0.03 with 0.05 . [solution:] n 1s 2 11 0.042 15,4 2 2 19.68 not reject H . 2 0 n 1, 11, 0.05 0.03 02 Example 2: Given the following talbe, Sample Size Sample 1 n1 15 Sample 2 n2 11 s1 0.8 s2 0.6 Sample Standard Deviation test H 0 : 12 22 with 0.05 . [solution:] s12 2 2 s 1 1 f14,10,0.975 f 2 3.15 f10,14,0.025 12 0.8 2 not reject H 0 . 54 0.6 2 1.77 f f14,10,0.025 3.55 n1 1, n2 1, 2 1 55 Example 3: The following data are from 4 different populations. Population 1 8.2 8.7 9.4 9.2 Population 2 Population 3 7.7 8.4 8.6 8.1 8.0 6.9 5.8 7.2 6.8 7.4 Population 4 6.8 7.3 6.3 6.9 7.1 1 , 2 , 3 and 4 Let 6.1 be the mean number of products of the 4 production lines. (a) Provide the ANOVA table. (b) Please test the hypothesis H 0 : 1 2 3 4 with 0.05 . [solution:] 4 nj x1 8.875, x2 8.16, x3 6.7, x4 6.88, x 7.545, x 2j ,i 1157.89 j 1 i 1 n1 4, n2 5, n3 6, n4 5, nT 20 x nj 4 (a) j 1 i 1 n x j 4 2 j ,i nj j 1 i 1 2 4 j 1 x x 2j ,i nT x 2 19.35 , j x 48.875 7.545 58.16 7.545 66.7 7.545 56.88 7.545 15.462 2 n 4 and j 1 j 2 2 2 1s 2j 19.35 15.462 3.888 . The ANOVA table is Source SS df MS Between 15.462 k 1 3 15.462 5.154 3 Within 3.888 nT k 16 3.888 0.243 16 19.35 nT 1 19 Total (b)Since f 21.21 3.24 f 3,16, 0.05 f k 1, nT k , 55 F 5.154 0.243 21.21 f ,we reject H0 . 56 Example 4: Five observations were selected from each of three populations. The data obtained follow. Observation Sample 1 Sample 2 Sample 3 1 32 30 30 26 32 30 6 44 43 44 46 48 45 4 33 36 35 36 40 36 6.5 2 3 4 5 Sample mean Sample variance (i) Set up the ANOVA table for this problem. (ii) At the 0.01 level of significance, test the null hypothesis that the three population means are equal? [solution:] n x 3 j 1 j n 3 j 1 j x 530 37 545 37 536 37 570, 2 j 2 2 2 1s 2j 4 6 4 4 4 6.5 66 Therefore, Source SS DF MS F Between 570 2 285 51.82 Within 66 12 5.5 Total 636 14 (ii) f 51.82 6.93 f 2,12, 0.01 reject H 0 . Example 5: The following are the number of wrong answers for the number of the students. Number of wrong answers 0 1 2 3 Number of the students 21 31 12 0 Suppose X is the random variable representing the number of wrong answers. Please test X is distributed as Binomial(3,0.25) with 56 0.05 . 57 (Note: the distribution function for Binomial(3,0.25) is 3 x 3 x f x 0.25 0.75 , x 0,1,2,3. . x [solutions:] As H0 is true, the distribution for the number of wrong answers is 3 27 0 3 p1 P X 0 0 0.25 0.75 64 , 3 27 1 2 p2 P X 1 1 0.25 0.75 64 , 3 9 2 1 p3 P X 2 2 0.25 0.75 64 , 3 1 3 01 p4 P X 3 3 0.25 0.75 64 , n 21 31 12 0 64 , the expected numbers Since the sample size under H 0 : p1 27 27 9 1 , p2 , p3 , p4 64 64 64 64 are 27 27 27, e2 np2 64 27, 64 64 . 9 1 e3 np3 64 9, e4 np4 64 1, 64 64 e1 np1 64 Therefore, 4 2 fk k 1 2 21 27 27 3.92 ek ek 2 2 31 27 27 2 12 9 9 2 1 1 Since 2 3.92 7.81 32,0.05 k21, , we do not reject H0 . Example 6: Some diet pills are supposed to cause significant weight loss. The following table shows the results of a recent study where some individuals took the diet pills and 57 58 some did not. Diet Pills No Diet Pills Total No Weight Loss 80 20 100 Weight Loss 100 100 200 Total 180 120 300 With a 5% level of significance, test to see if losing weight is dependent on taking the diet pills. [solutions:] eij The table for the expected numbers is Diet Pills No Diet Pills Total 180 100 60 300 120 100 40 300 100 Weight Loss 180 200 120 300 120 200 80 300 200 Total 180 120 300 No Weight Loss Thus, p m 2 i 1 f j 1 eij 2 ij eij 80 602 60 2 2 i 1 j 1 2 20 40 40 f eij 2 ij eij 2 100 120 120 2 100 80 80 25 Since 2 25 3.84 12,0.05 22121,0.05 2p1m1, , we reject H0 . 58