difference 와 standard error 에 대한 이론적인 설명은 생략하였다.
비율 간 비교
평균 간 비교
- independent, comparing two proportions
- Z value 구하기
- Z = difference / standard error
- P value 구하기
- p <- 2 * pnorm(z_value, lower.tail=FALSE)
- p 값이 0.05보다 낮은지 검정
- 한방 솔루션: prop.test
- prop.test(matrix, conf.level=0.99, correct="FALSE")
- independent, comparing two means
- t score 구하기
- t_score <- mean difference / standard error
- p value 구하기
- p <- 2 * pt(t_score, df = 99)
- 신뢰구간 구하기
- mean_difference + qt(0.995, df=99) * se
- mean_difference - qt(0.995, df=99) * se
- 한방 solution: t.test
- t.test(col1 ~ col2, data=dataname, conf.level=0.99)
- dependent, comparing paired samples (two proportions)
- z value
- z <- diff / se
- p value
- p <- 2 * pnorm(z_value, lower.tail=FALSE)
- 한방 솔루션: mcnemar.test
- mcnemar.test(matrix)
- dependent, comparing paired samples (two means)
- t score
- t <- diff / se
- p_value
- p_value <- 2 * pt(t_score, df=99, lower.tail=FALSE)
- 한방 솔루션: t.test
- t.test(x=col1, y=col2, data=dataname, paired=TRUE)
댓글 없음:
댓글 쓰기