例題:
二群の分散が等しいといえるかどうか,有意水準 5% で両側検定しなさい。
gr1 | 22.4 | 19.7 | 23.6 | 16.9 | 17.3 | 20.0 | 18.5 | 19.9 | 21.0 | 16.9 |
---|---|---|---|---|---|---|---|---|---|---|
gr2 | 20.5 | 21.5 | 19.3 | 21.1 | 16.8 | 18.2 | 20.1 | 22.7 | 17.7 | 17.5 |
R による解析
> gr1 <- c(22.4, 19.7, 23.6, 16.9, 17.3, 20.0, 18.5, 19.9, 21.0, 16.9) # 第一群 > gr2 <- c(20.5, 21.5, 19.3, 21.1, 16.8, 18.2, 20.1, 22.7, 17.7, 17.5) # 第二群 > var.test(gr1, gr2) F test to compare two variances data: gr1 and gr2 F = 1.3701, num df = 9, denom df = 9, p-value = 0.6466 alternative hypothesis: true ratio of variances is not equal to 1 95 percent confidence interval: 0.3403068 5.5159069 sample estimates: ratio of variances 1.370073