方差检验

Reads: 863 Edit

两样本的方差相等性检验

> x=c(0.051,0.926,0.209,0.358,1.672,-1.191,1.404,1.112,0.108,-0.429,0.746,1.304,0.292,-1.587,-0.815)
> y=c(-0.488,-0.466,2.464,-0.959,0.592,-0.925,0.0206,0.048,-1.857,0.708)
> var.test(x,y)

    F test to compare two variances

data:  x and y
F = 0.66801, num df = 14, denom df = 9, p-value = 0.4809
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
 0.1758872 2.1438492
sample estimates:
ratio of variances 
         0.6680114 

说明:p-value = 0.4809>0.05,因而接受原假设,认为x和y的方差相等!


Comments

Make a comment