Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Pertemuan 26 Metode Non Parametrik-2 Matakuliah: A0064 / Statistik Ekonomi Tahun: 2005 Versi: 1/1.

Similar presentations


Presentation on theme: "1 Pertemuan 26 Metode Non Parametrik-2 Matakuliah: A0064 / Statistik Ekonomi Tahun: 2005 Versi: 1/1."— Presentation transcript:

1 1 Pertemuan 26 Metode Non Parametrik-2 Matakuliah: A0064 / Statistik Ekonomi Tahun: 2005 Versi: 1/1

2 2 Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : Menyimpulkan hasil pengujian hipotesis dengan menggunakan uji peringkat bertanda Wilcoxon dan Uji Kruskal-Wallis

3 3 Outline Materi Uji Peringkat Bertanda Wilcoxon Uji Kruskal-Wallis

4 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-4 The null and alternative hypotheses: H 0 : The median difference between populations are 1 and 2 is zero H 1 : The median difference between populations are 1 and 2 is not zero Find the difference between the ranks for each pair, D = x 1 -x 2, and then rank the absolute values of the differences. The Wilcoxon T statistic is the smaller of the sums of the positive ranks and the sum of the negative ranks: For small samples, a left-tailed test is used, using the values in Appendix C, Table 10. The large-sample test statistic: The null and alternative hypotheses: H 0 : The median difference between populations are 1 and 2 is zero H 1 : The median difference between populations are 1 and 2 is not zero Find the difference between the ranks for each pair, D = x 1 -x 2, and then rank the absolute values of the differences. The Wilcoxon T statistic is the smaller of the sums of the positive ranks and the sum of the negative ranks: For small samples, a left-tailed test is used, using the values in Appendix C, Table 10. The large-sample test statistic: 14-5 The Wilcoxon Signed-Ranks Test (Paired Ranks)

5 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-5 Sold Sold Rank Rank Rank (1) (2) D=x 1 -x 2 ABS(D) ABS(D)(D>0) (D<0) 564016169.09.00 4870-222212.00.012 10060404015.015.00 857015158.08.00 22814147.07.00 4440442.02.00 3545-10106.00.06 287212111.011.00 5260-885.00.05 7770773.53.50 8990-111.00.01 10100**** 6585-202010.00.010 9061292913.013.00 7040303014.014.00 3326773.53.50 Sum:8634 Sold Sold Rank Rank Rank (1) (2) D=x 1 -x 2 ABS(D) ABS(D)(D>0) (D<0) 564016169.09.00 4870-222212.00.012 10060404015.015.00 857015158.08.00 22814147.07.00 4440442.02.00 3545-10106.00.06 287212111.011.00 5260-885.00.05 7770773.53.50 8990-111.00.01 10100**** 6585-202010.00.010 9061292913.013.00 7040303014.014.00 3326773.53.50 Sum:8634 T=34 n=15 P=0.0530 P=0.02525 P=0.0120 P=0.00516 H 0 is not rejected (Note the arithmetic error in the text for store 13) T=34 n=15 P=0.0530 P=0.02525 P=0.0120 P=0.00516 H 0 is not rejected (Note the arithmetic error in the text for store 13) Example 14-6

6 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-6 Hourly Rank Rank Rank Messages Md 0 D=x 1 -x 2 ABS(D) ABS(D) (D>0) (D<0) 151149221.01.00.0 144149-552.00.02.0 123149-262613.00.013.0 178149292915.015.00.0 105149-444423.00.023.0 112149-373720.00.020.0 140149-994.00.04.0 167149181810.010.00.0 177149282814.014.00.0 185149363619.019.00.0 129149-202011.00.011.0 16014911116.06.00.0 110149-393921.00.021.0 170149212112.012.00.0 198149494925.025.00.0 16514916168.08.00.0 109149-404022.00.022.0 118149-313116.50.016.5 155149663.03.00.0 102149-474724.00.024.0 16414915157.07.00.0 180149313116.516.50.0 139149-10105.00.05.0 16614917179.09.00.0 82149333318.018.00.0 Sum:163.5161.5 Hourly Rank Rank Rank Messages Md 0 D=x 1 -x 2 ABS(D) ABS(D) (D>0) (D<0) 151149221.01.00.0 144149-552.00.02.0 123149-262613.00.013.0 178149292915.015.00.0 105149-444423.00.023.0 112149-373720.00.020.0 140149-994.00.04.0 167149181810.010.00.0 177149282814.014.00.0 185149363619.019.00.0 129149-202011.00.011.0 16014911116.06.00.0 110149-393921.00.021.0 170149212112.012.00.0 198149494925.025.00.0 16514916168.08.00.0 109149-404022.00.022.0 118149-313116.50.016.5 155149663.03.00.0 102149-474724.00.024.0 16414915157.07.00.0 180149313116.516.50.0 139149-10105.00.05.0 16614917179.09.00.0 82149333318.018.00.0 Sum:163.5161.5 Example 14-7

7 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-7 Example 14-7 using the Template Note 1: Note 1: You should enter the claimed value of the mean (median) in every used row of the second column of data. In this case it is 149. Note 2: Note 2: In order for the large sample approximations to be computed you will need to change n > 25 to n >= 25 in cells M13 and M14.

8 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-8 The Kruskal-Wallis hypothesis test: H 0 : All k populations have the same distribution H 1 : Not all k populations have the same distribution The Kruskal-Wallis test statistic: If each n j > 5, then H is approximately distributed as a  2. The Kruskal-Wallis hypothesis test: H 0 : All k populations have the same distribution H 1 : Not all k populations have the same distribution The Kruskal-Wallis test statistic: If each n j > 5, then H is approximately distributed as a  2. 14-6 The Kruskal-Wallis Test - A Nonparametric Alternative to One-Way ANOVA

9 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-9 SoftwareTimeRank Group RankSum 14514190 13810256 15616325 16017 14715 16518 2308 24011 2287 24413 2255 24212 3224 3193 3151 3319 3276 3172 SoftwareTimeRank Group RankSum 14514190 13810256 15616325 16017 14715 16518 2308 24011 2287 24413 2255 24212 3224 3193 3151 3319 3276 3172  2 (2,0.005) =10.5966, so H 0 is rejected. Example 14-8: The Kruskal-Wallis Test

10 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-10 Example 14-8: The Kruskal-Wallis Test – Using the Template

11 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-11 If the null hypothesis in the Kruskal-Wallis test is rejected, then we may wish, in addition, compare each pair of populations to determine which are different and which are the same. Further Analysis (Pairwise Comparisons of Average Ranks)

12 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-12 Pairwise Comparisons: Example 14-8

13 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-13 The Friedman test is a nonparametric version of the randomized block design ANOVA. Sometimes this design is referred to as a two-way ANOVA with one item per cell because it is possible to view the blocks as one factor and the treatment levels as the other factor. The test is based on ranks. 14-7 The Friedman Test for a Randomized Block Design The Friedman hypothesis test: H 0 : The distributions of the k treatment populations are identical H 1 : Not all k distribution are identical The Friedman test statistic: The degrees of freedom for the chi-square distribution is (k – 1). The Friedman hypothesis test: H 0 : The distributions of the k treatment populations are identical H 1 : Not all k distribution are identical The Friedman test statistic: The degrees of freedom for the chi-square distribution is (k – 1).

14 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-14 Example 14-10 – using the Template Note: Note: The p-value is small relative to a significance level of  = 0.05, so one should conclude that there is evidence that not all three low- budget cruise lines are equally preferred by the frequent cruiser population

15 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-15 The Spearman Rank Correlation Coefficient is the simple correlation coefficient calculated from variables converted to ranks from their original values. 14-8 The Spearman Rank Correlation Coefficient

16 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-16 Table 11:  =0.005 n. 7------ 80.881 90.833 100.794 110.818. r s =1- (6)(4) (10)(10 2 -1) =1- 24 990 =0.9758>0.794     1 6 2 1 2 1 d i i n nn() H 0 rejected MMIS&P100R-MMIR-S&PDiffDiffsq 220151 7 611 218150 5 500 216148 3 300 217149 4 400 215147 2 200 213146 1 100 219 152 6 7-11 236165 910-11 23716210 911 235161 8 800 Sum:4 MMIS&P100R-MMIR-S&PDiffDiffsq 220151 7 611 218150 5 500 216148 3 300 217149 4 400 215147 2 200 213146 1 100 219 152 6 7-11 236165 910-11 23716210 911 235161 8 800 Sum:4 Spearman Rank Correlation Coefficient: Example 14-11

17 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-17 Spearman Rank Correlation Coefficient: Example 14-11 Using the Template Note:The p- values in the range J15:J17 will appear only if the sample size is large (n > 30) Note: The p- values in the range J15:J17 will appear only if the sample size is large (n > 30)

18 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-18 l Steps in a chi-square analysis: Formulate null and alternative hypotheses Compute frequencies of occurrence that would be expected if the null hypothesis were true - expected cell counts Note actual, observed cell counts Use differences between expected and actual cell counts to find chi-square statistic: Compare chi-statistic with critical values from the chi-square distribution (with k-1 degrees of freedom) to test the null hypothesis l Steps in a chi-square analysis: Formulate null and alternative hypotheses Compute frequencies of occurrence that would be expected if the null hypothesis were true - expected cell counts Note actual, observed cell counts Use differences between expected and actual cell counts to find chi-square statistic: Compare chi-statistic with critical values from the chi-square distribution (with k-1 degrees of freedom) to test the null hypothesis 14-9 A Chi-Square Test for Goodness of Fit

19 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-19 The null and alternative hypotheses: H 0 : The probabilities of occurrence of events E 1, E 2...,E k are given by p 1,p 2,...,p k H 1 : The probabilities of the k events are not as specified in the null hypothesis The null and alternative hypotheses: H 0 : The probabilities of occurrence of events E 1, E 2...,E k are given by p 1,p 2,...,p k H 1 : The probabilities of the k events are not as specified in the null hypothesis Assuming equal probabilities, p 1 = p 2 = p 3 = p 4 =0.25 and n=80 PreferenceTanBrownMaroonBlackTotal Observed1240 82080 Expected(np)2020 202080 (O-E)-820-12 00 Example 14-12: Goodness-of-Fit Test for the Multinomial Distribution

20 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-20 Example 14-12: Goodness-of-Fit Test for the Multinomial Distribution using the Template Note: the p- value is 0.0000, so we can reject the null hypothesis at any  level.

21 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-21 50-5 0.4 0.3 0.2 0.1 0.0 z f ( z ) Partitioning the Standard Normal Distribution 1 -0.440.44 0.1700 0.1713 0.1587 0.1700 0.1713 1. Use the table of the standard normal distribution to determine an appropriate partition of the standard normal distribution which gives ranges with approximately equal percentages. p(z<-1) = 0.1587 p(-1<z<-0.44)= 0.1713 p(-0.44<z<0)= 0.1700 p(0<z<0.44)= 0.1700 p(0.44<z<14)= 0.1713 p(z>1) = 0.1587 2. Given z boundaries, x boundaries can be determined from the inverse standard normal transformation: x =  +  z = 125 + 40z. 3. Compare with the critical value of the  2 distribution with k-3 degrees of freedom. Goodness-of-Fit for the Normal Distribution: Example 14-13

22 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-22 iO i E i O i - E i (O i - E i ) 2 (O i - E i ) 2 / E i 11415.87-1.873.496900.22035 22017.132.878.236910.48085 31617.00-1.001.000000.05882 41917.002.004.000000.23529 51617.13-1.131.276900.07454 61515.87-0.870.756900.04769  2 :1.11755 iO i E i O i - E i (O i - E i ) 2 (O i - E i ) 2 / E i 11415.87-1.873.496900.22035 22017.132.878.236910.48085 31617.00-1.001.000000.05882 41917.002.004.000000.23529 51617.13-1.131.276900.07454 61515.87-0.870.756900.04769  2 :1.11755  2 (0.10,k-3) = 6.5139 > 1.11755  H 0 is not rejected at the 0.10 level Example 14-13: Solution

23 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-23 Example 14-13: Solution using the Template Note: p-value = 0.8002 > 0.01  H 0 is not rejected at the 0.10 level

24 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-24 14-9 Contingency Table Analysis: A Chi-Square Test for Independence

25 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-25 Null and alternative hypotheses: H 0 : The two classification variables are independent of each other H 1 : The two classification variables are not independent Chi-square test statistic for independence: Degrees of freedom: df=(r-1)(c-1) Expected cell count: A and B are independent if:P(AUB) = P(A)P(B). If the first and second classification categories are independent:E ij = (R i )(C j )/n A and B are independent if:P(AUB) = P(A)P(B). If the first and second classification categories are independent:E ij = (R i )(C j )/n Contingency Table Analysis: A Chi-Square Test for Independence

26 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-26 ijOEO-E(O-E) 2 (O-E) 2 /E 114228.813.2174.246.0500 121831.2-13.2174.245.5846 21619.2-13.2174.249.0750 223420.813.2174.248.3769  2 : 29.0865 ijOEO-E(O-E) 2 (O-E) 2 /E 114228.813.2174.246.0500 121831.2-13.2174.245.5846 21619.2-13.2174.249.0750 223420.813.2174.248.3769  2 : 29.0865  2 (0.01,(2-1)(2-1)) =6.63490 H 0 is rejected at the 0.01 level and it is concluded that the two variables are not independent.  2 (0.01,(2-1)(2-1)) =6.63490 H 0 is rejected at the 0.01 level and it is concluded that the two variables are not independent. Contingency Table Analysis: Example 14-14

27 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-27 Since p-value = 0.000, H 0 is rejected at the 0.01 level and it is concluded that the two variables are not independent. Contingency Table Analysis: Example 14-14 using the Template Note: When the contingency table is a 2x2, one should use the Yates correction.

28 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-28 14-11 Chi-Square Test for Equality of Proportions tests of homogeneity. Tests of equality of proportions across several populations are also called tests of homogeneity. In general, when we compare c populations (or r populations if they are arranged as rows rather than columns in the table), then the Null and alternative hypotheses: H 0 : p 1 = p 2 = p 3 = … = p c H 1 : Not all p i, I = 1, 2, …, c, are equal Chi-square test statistic for equal proportions: Degrees of freedom: df = (r-1)(c-1) Expected cell count:

29 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-29 14-11 Chi-Square Test for Equality of Proportions - Extension The Median Test Here, the Null and alternative hypotheses are: H 0 : The c populations have the same median H 1 : Not all c populations have the same median

30 COMPLETE 5 t h e d i t i o n BUSINESS STATISTICS Aczel/Sounderpandian McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., 2002 14-30 Chi-Square Test for the Median: Example 14-16 Using the Template Note:The template was used to help compute the test statistic and the p- value for the median test. First you must manually compute the number of values that are above the grand median and the number that is less than or equal to the grand median. Use these values in the template. See Table 14-16 in the text. Note: The template was used to help compute the test statistic and the p- value for the median test. First you must manually compute the number of values that are above the grand median and the number that is less than or equal to the grand median. Use these values in the template. See Table 14-16 in the text. Since the p-value = 0.6703 is very large there is no evidence to reject the null hypothesis.

31 31 Penutup Metode Non parametrik pada hakekatnya merupakan suatu uji hipotesis yang membahas masalah ukuran skala ordinal dan nominal, uji ini tidak memerlukan asumsi terhadap populasi yang akan diuji (uji bebas distribusi)


Download ppt "1 Pertemuan 26 Metode Non Parametrik-2 Matakuliah: A0064 / Statistik Ekonomi Tahun: 2005 Versi: 1/1."

Similar presentations


Ads by Google