> shapiro.test(x)
Shapiro-Wilk normality test
data: x
W = 0.9743, p-value = 0.2346
> shapiro.test(y)
Shapiro-Wilk normality test
data: y
W = 0.9782, p-value = 0.3584
> var.test(x,y)
F test to compare two variances
data: x and y
F = 0.2324, num df = 59, denom df = 59, p-value = 8.321e-08
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
0.1388203 0.3890740
sample estimates:
ratio of variances
0.2324034
先检验两个是否为正态分布,如果为正态分布,就可以用var。test来检验equality of variance!
其他检验equality of variance有bartlett.test,(levene.test也可以,如果数据不服从正态分布的话,不过要载入数据包,忘了是那个数据包!哈哈)