본문 바로가기
3. 등분산검정/1) F test

[R 통계분석] F test (등분산검정)

by makhimh 2019. 11. 28.
반응형

[R 통계분석] F test (등분산검정)


#1. 방법


var.test(x, y, ratio = 1,
         alternative = c("two.sided", "less", "greater"),
         conf.level = 0.95, ...)


x,y 자리에 데이터 입력.



#2. 예제


> 코드


#표본생성

set.seed(1)
group1=rnorm(50,0,1)
group2=rnorm(50,0,1)


#F test 수행
var.test(group1,group2)


> 실행결과


> var.test(group1,group2)

    F test to compare two variances

data:  group1 and group2
F = 0.73641, num df = 49, denom df = 49, p-value = 0.2876
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
 0.4178958 1.2976955
sample estimates:
ratio of variances
         0.7364113


반응형

댓글