data <- read.csv("testdata/three_sample.csv") head(data) data # 귀무 : 3가지 교육 방법에 따른 교육생 만족율에 차이가 없다. # 연구 : 3가지 교육 방법에 따른 교육생 만족율에 차이가 있다. nrow(data) #subset method <- data$method survey <- data$survey table(method,survey) table(method, survey, useNA = "ifany") #비율차이 검정 #양측 검정 prop.test(c(34,37,39), c(50,50,50)) prop.test(c(34,37,39), c(50,50,50), alternative = "two.sided", conf.level = 0.95) # p-value(0.5232)>0.05 귀무가설을 기각할 수 없다