I have two samples that I want to verify that variances are equals in order to apply Wilcoxon rank sum test that assume that the variance are equals.
As you can see the variance look similar.
Using wilcox.test I can verify the non normality of these samples>
>shapiro.test(table$tempeture_stationA) Shapiro-Wilk normality test data: table$tempeture_stationA W = 0.94385, p-value = 8.624e-06 > shapiro.test(table$tempeture_stationB) Shapiro-Wilk normality test data: table$tempeture_stationB W = 0.95691, p-value = 0.0001091
As you can see these samples aren't normal distributed. So I can't use var.test, F test to compare two variances, because assume the normality of the samples. So for this reason I decided to use Fligner-Killeen test the result for this two samples is
>fligner.test(table$tempeture_stationA, table$tempeture_stationB) Fligner-Killeen test of homogeneity of variances data: table$tempeture_stationA and table$tempeture_stationB Fligner-Killeen:med chi-squared = 82.85, df = 52, p-value = 0.004177 The p-value from the Fligner-Killeen test is 0.004177
and indicates that variances are different, correct me if I'm wrong please.
In the boxplot you can see that variance are pretty similar, what could be the reason to that test indicate that variances are different.
this is a similar question Fligner-Killeen homogeneity of variances test - is it accurate for unequal sample sizes?, but in my case the sample size is the same for both samples
Before I test with var.test, I know that this test assume the normality, but I expected less difference in the results of these tests
> var.test(table$tempeture_stationA, table$tempeture_stationB) F test to compare two variances data: table$tempeture_stationA and table$tempeture_stationB F = 0.99679, num df = 152, denom df = 152, p-value = 0.9842 alternative hypothesis: true ratio of variances is not equal to 1 95 percent confidence interval: 0.7244371 1.3715303 sample estimates: ratio of variances 0.9967885
The data is the measure every hour between 9:00 am and 4:00pm during a month of two sensors of temperature located in the same place, the purpose is analyse if there are significant difference between the measures of sensors.
Thanks in advance.