Levene and Bartlett Variance Test
Paste two or more groups and see whether their spreads differ, with five tests side by side, the working for each, a box plot of every group and the Welch ANOVA if the variances are unequal.
Tarayıcınızda çalışır. Dosyalarınız cihazınızdan asla çıkmaz. Nasıl kontrol edeceğinizi görün
…
Nasıl yapılır
- 1Paste the groups
Use columns, group and value pairs or one line per group, or import a CSV.
- 2Read the verdict
See the Brown-Forsythe p-value and the plain advice on which ANOVA to use.
- 3Compare the tests
Open All tests for Levene, trimmed Levene, Bartlett, Fligner-Killeen and F.
- 4Follow the working
Pick a centre and read the deviations, sums of squares and Bartlett's correction.
- 5Look at the spread
Use the box plot with mean and SD bars to see which group differs.
- 6Export
Download the results CSV, copy the lines or print the report.
Bu araç hakkında
The classic two-sample t-test and the one-way ANOVA both assume that the groups being compared have the same variance. When one group is much more spread out than the others, especially with unequal group sizes, the false positive rate of those tests can drift far from the stated 5 percent. Checking homogeneity of variance is therefore a routine step in a lab report, a thesis or a quality study. This tool runs every common test on the same data. Levene's original test runs an ANOVA on the absolute distances of each value from its group mean. The Brown-Forsythe version uses distances from the group median and is the default in R's car package because it stays reliable for skewed data. A 10 percent trimmed-mean version sits between the two. Bartlett's test is the most powerful when the data really are normal, but it reacts to non-normality as much as to unequal spread. The rank-based Fligner-Killeen test resists outliers, and for two groups the classic F ratio is added. Data can be pasted as columns with a header, as group and value pairs, or as one line per group. Each test shows its working: the centres, the mean absolute deviations, the sums of squares and Bartlett's correction factor. A box plot with mean and standard deviation bars lets you see the spreads.
Which result to trust
Start with Brown-Forsythe. It controls false alarms well under skew and heavy tails and still has good power. If your data look normal on a Q-Q plot, Bartlett adds power; if they do not, ignore Bartlett, because its small p-value may only be telling you that the data are not normal. A rule of thumb from many textbooks says the classic ANOVA is safe while the largest variance is under about four times the smallest and the group sizes are similar; the tool shows that ratio. If the spreads do differ, the Next step tab gives the Welch ANOVA, which drops the equal-variance assumption, alongside the classic version.
Worked example
The first sample is R's PlantGrowth data: dry weights of 30 plants in a control group and two treatments, ten each. The standard deviations are 0.583, 0.794 and 0.443, so the largest variance is 3.22 times the smallest. Brown-Forsythe gives F(2, 27) = 1.119 with p = 0.341, Levene with the mean gives F = 1.237 with p = 0.306, and Bartlett gives K² = 2.879 on 2 df with p = 0.237. Fligner-Killeen gives χ² = 2.350 with p = 0.309. All of these match R's car::leveneTest, bartlett.test and fligner.test. None of the tests rejects equal variances, so the classic ANOVA (F = 4.846, p = 0.0159) is reasonable, and the Welch ANOVA agrees (F = 5.181 on 2 and 17.13 df, p = 0.0174).
Limits
A non-significant variance test does not prove the spreads are equal; with small groups it has little power. These tests compare spread only and do not check normality or independence. They do not cover paired or repeated measures, where the Pitman-Morgan test or a mixed model is needed.
Çözümlü örnek
PlantGrowth, 3 groups of 10: Brown-Forsythe F = 1.12 (p = 0.341), Bartlett K² = 2.88 (p = 0.237): equal variances not rejected.
Kısaca
- Kategori: Matematik ve bilim
- Tarayıcınızda çalışır, kayıt yok, yükleme yok.
- Girdiğiniz bilgiler cihazınızda kalır.
- İngilizce olarak mevcut.
- İçeriğin son gözden geçirilmesi:
- Resmî kaynak: NIST/SEMATECH e-Handbook of Statistical Methods, Levene test section 1.3.5.10
Sık sorulan sorular
What is the difference between Levene and Brown-Forsythe?
Both run an ANOVA on absolute deviations. Levene measures deviations from each group mean; Brown-Forsythe measures them from each group median, which keeps the test accurate when the data are skewed.
Why does Bartlett give a different answer from Levene?
Bartlett compares log variances and assumes normal data. When the data have heavy tails it often rejects even though the spreads are similar, so a disagreement usually points to non-normality.
My groups have unequal variances. What now?
Use Welch's t-test for two groups or Welch's ANOVA for more, followed by Games-Howell comparisons. Both are given or named in the tool and do not need equal variances.
How should I paste my data?
Use one column per group with names in the first row, or two columns of group and value, or one line per group written as name: value value value. A CSV file in any of these layouts also works.
Do the groups need to be the same size?
No. Every test handles unequal sizes. Unequal sizes actually make the equal-variance assumption more important, because the classic ANOVA is least robust then.
How do I report the result?
Give the test, the statistic with its degrees of freedom and the p-value, for example: Brown-Forsythe test, F(2, 27) = 1.12, p = 0.34. Copy results produces lines in this form.
