252mvar 3/31/046. Tests for Equality of Variancesa. IntroductionEquality of Multiple Means (ANOVA)Equality of Multiple Medians (Kruskal-Wallis and Friedman)Equality of Multiple Proportions (Chi-squared)So for completeness we need Tests for Equality of Multiple Variances.b. The Bartlett Testc. The Levene Test(i) Find the median of each column. (This is the middle number or the average of the two middle numbers.)(ii) Subtract the median of each column from the column from which it comes and take the absolute value of the result.(iii) Do a 1-way ANOVA on the result. If the results would lead you to reject the null hypothesis (because the computed F is above the table F or the p-value is below your significance level), reject the null hypothesis of equal variances.Levene Test Example: Test the following data for equality of variances.252mvar 3/31/046. Tests for Equality of Variancesa. IntroductionWe have now covered tests for Equality of Multiple Means (ANOVA)Equality of Multiple Medians (Kruskal-Wallis and Friedman)Equality of Multiple Proportions (Chi-squared)So for completeness we need Tests for Equality of Multiple Variances.b. The Bartlett TestThis test seems to require that the underlying distribution be Normal. It should not be used to compare two columns, since a simple F test described earlier is more appropriate. Recall that in the test for comparing 2 means with equal variances we used a pooled variance 211ˆ212222112nnsnsnsp. Assume that we have c columns representing c independent samples. Then the pooled variance would be cnnnnsnsnsnsnscccp321223322221121111. The test statistic used when there are 6 or more rows is 2212log1ˆlog130259.2jjpjcsnsnd where cnncdjj1111311For smaller examples (less than 6 rows) a special table is required and the instructions that I have found are very confusing. Use the computer.Bartlett Test Example (Kanji – heavily edited): Test the following data for equal variances.4220153129.1147.1164.447.5432124232221nnnnssss cnnnnsnsnsnsnscccp321223322221121111 44220153129.114147.111964.41447.530 10489.46293.21796.641.164 7488.810488.909 Note that the denominator can be written as cnnjj1. The test statistic used is 2212log1ˆlog130259.2jjpjcsnsnd where cnncdjj1111311 104141119114130153111 0096153.024902.0052632.0071429.0033333.01511 0115.11726807.1511 2212log1ˆlog130259.2jjpjcsnsnd 29.11log4147.11log1964.4log1447.5log307488.8log1040115.130259.2 052694.141059563.119666518.014737987.030941948.01040115.130259.2 160454.4313164.20331252.9139610.22962592.970115.130259.2 2837.7199636.30115.130259.2 This has 3141 c degrees of freedom and the chi-squared table says that 305.27.8147 Since our computed chi-squared is less than the table chi-square, do not reject the null hypothesis.c. The Levene TestThis test is quite simple. It can be used for non-Normal data and can be used to compare two columns as well as more than two columns.(i) Find the median of each column. (This is the middle number or the average of the two middle numbers.)(ii) Subtract the median of each column from the column from which it comes and take the absolute value of the result.(iii) Do a 1-way ANOVA on the result. If the results would lead you to reject the null hypothesis (because the computed F is above the table F or the p-value is below your significance level), reject the null hypothesis of equal variances. Levene Test Example: Test the following data for equality of variances.Method 1 Method 2 Method 3 Method 4 1.31 1.08 0.85 1.31 1.27 1.10 1.02 1.27 1.28 1.05 0.78 1.28 1.22 1.02 0.87 1.22 1.19 0.99 0.80 1.19 1.30 0.95 0.96 1.30If we write out the numbers in Method 1 in order, we get (1.19, 1.22, 1.27, 1.28, 1.30, 1.31)The median for Method 2 is the halfway point between 1.27 and 1.28, or 1.275. The other medians are 1.035, 0.86 and 1.275. If we subtract the medians we get the following. Method 1 Method 2 Method 3 Method 4 0.035 0.045 -0.01 0.035 -0.005 0.065 0.16 -0.005 0.005 0.015 -0.08 0.005 -0.055 -0.015 0.01 -0.055 -0.085 -0.045 -0.06 -0.085 0.025 -0.085 0.10 0.0252If we take absolute values we get the following. Method 1 Method 2 Method 3 Method 4 0.035 0.045 0.01 0.035 0.005 0.065 0.16 0.005 0.005 0.015 0.08 0.005 0.055 0.015 0.01 0.055 0.085 0.045 0.06 0.085 0.025 0.085 0.10 0.025If we subject these results to a one-way ANOVA, we get the table below and conclude that we cannot rejectthe hypothesis of equal variances.Source SS DF MS F 05.F 0HBetween 0.00491 3 0.00164 1.10ns 10.320,3FVariances equalWithin 0.02980 20 0.00149 Total 0.03471 23 For computer examples see
View Full Document