"R t검정"의 두 판 사이의 차이

21번째 줄: 21번째 줄:
</source>
</source>


==2표본==
==2표본 t검정==
<source lang='r'>
<source lang='r'>
t.test(1:10, y = c(7:20))
t.test(1:10, y = c(7:20))

2019년 5월 19일 (일) 17:44 판

1 개요

R t.test()

2 1표본 t검정

(x <- rnorm(12))
##  [1] -0.80677919 -0.53470426  0.98430798  0.70428020  0.25909529  0.05287603
##  [7]  0.39817250  0.15529129 -1.14096331  0.04737570  0.01691522  0.74616298
t.test(x)
## 
## 	One Sample t-test
## 
## data:  x
## t = 0.4003, df = 11, p-value = 0.6966
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  -0.3306406  0.4776456
## sample estimates:
##  mean of x 
## 0.07350254

3 2표본 t검정

t.test(1:10, y = c(7:20))
## 
## 	Welch Two Sample t-test
## 
## data:  1:10 and c(7:20)
## t = -5.4349, df = 21.982, p-value = 1.855e-05
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -11.052802  -4.947198
## sample estimates:
## mean of x mean of y 
##       5.5      13.5
t.test(1:10, y = c(7:20, 200))
## 
## 	Welch Two Sample t-test
## 
## data:  1:10 and c(7:20, 200)
## t = -1.6329, df = 14.165, p-value = 0.1245
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -47.242900   6.376233
## sample estimates:
## mean of x mean of y 
##   5.50000  25.93333

4 같이 보기

5 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}