# Thread: Fligner test vs Bartlett test for homoscedasticity

1. ## Fligner test vs Bartlett test for homoscedasticity

Hi all,
I have an unexpected difference from the tests on homoscedasticity of the data performed with Fligner and Bartlett-

In one case I get that the p-value is greather than 0.05, in the other I found that the p-value is less than 0.05. They should be equal, or at least both greather than 0.05.

I would like to know why and what do you think about it.

Here the R code and the results:

Hole_1 = c(7, 7, 7, 6, 7, 7, 7, 7, 7, 1, 7, 7, 6, 7, 7)
Hole_2 = c(7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 6, 7)
Hole = c(7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 7, 7, 7, 7, 7)
Hole_S1 = c(6, 7, 7, 7, 7, 7, 7, 7, 6, 7, 3, 7, 6, 7, 6)
Hole_S2 = c(7, 7, 7, 7, 6, 7, 7, 7, 6, 4, 5, 7, 7, 7, 7)

dati_hole = c(Hole_1,Hole_2,Hole,Hole_S1,Hole_S2)
gruppi_hole = factor(rep(c("Hole_1","Hole_2","Hole","Hole_S1","Hole_S2"),each=15))

# Fligner test:

> fligner.test(dati_hole,gruppi_hole)

Fligner-Killeen test of homogeneity of variances

data: dati_hole and gruppi_hole
Fligner-Killeen:med chi-squared = 1.9302, df = 4, p-value = 0.7486

# Barlett test:

> bartlett.test(dati_hole,gruppi_hole)

Bartlett test of homogeneity of variances

data: dati_hole and gruppi_hole
Bartlett's K-squared = 9.6875, df = 4, p-value = 0.04603

2. First off just because two tests are testing a similar idea doesn't mean that they will agree in p-value or even in the decision you should make from them.

Second, reading up on these tests you quickly learn that Bartlett's is quite sensitive to departure from normality (and thus might only be testing if the samples are normal) while Fligner is a test that is robust to the departure from normality.

Your data doesn't seem to be normally distributed so I'd go with Fligner's test. Or possibly Levene's test (in the cars package).

3. Thanks a lot!!!!

Originally Posted by Dason
Your data doesn't seem to be normally distributed.
Could you please tell me which test I have to perform in order to check if the data are normally distributed?

Moreover, if they ar not normally distributed, is it correct or not to perform the ANOVA on them?

Best regards

Frodo

4. [QUOTE=frodo.jedi;32828]Thanks a lot!!!!

Could you please tell me which test I have to perform in order to check if the data are normally distributed?
The easiest way to test is just to make a histogram. If it looks normal, you can make that assumption. If not, then don't.

Moreover, if they are not normally distributed, is it correct or not to perform the ANOVA on them?
ANOVA is pretty robust and people use it all the time (even when the data is not normally distributed, though they usually have the benefit of a very large dataset). I wouldn't recommend it to you since your data is so small and does not look normally dist. The alternative non-parametric test to ANOVA is the Kruskal-Wallis Test.

HTH

5. Thanks a lot!!!!!!!!!!!!!!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts