User Tools

Site Tools


t-test

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
t-test [2020/10/06 15:32] – [모집단의 평균만을 알고 있을 경우, 예] hkimscilt-test [2022/04/24 19:02] – [예 2] hkimscil
Line 519: Line 519:
 According to (1), $t_{cal}=3.844$ . Then what is the value of $df$ (case number-1)? = (16-1) = 15. According to (1), $t_{cal}=3.844$ . Then what is the value of $df$ (case number-1)? = (16-1) = 15.
 When critical value = .05, $ t_{crit} = \pm{2.13} $ When critical value = .05, $ t_{crit} = \pm{2.13} $
 +
 +==== 예 1 ====
  
 <code> <code>
Line 633: Line 635:
  
 </code> </code>
 +==== 예 2 ====
 +<code>
 +# sample size = n 
 +n <- 36 # 36명이 있다
 +# 이들이 평가한 네이버의 UI 점수는 76점이고 
 +# 이들이 시간을 두고 평가한 새로운 네이버의 UI는 80점이라고 하고.
 +# 이 차이가 UI가 향상했다는 증거로 삼을 수 있는지 검증하고자 한다.
 +n <- 36
 +rnorm2 <- function(n,mean,sd) { mean+sd*scale(rnorm(n)) }
 +set.seed(101)
 +time1 <- rnorm2(n, 76, 5)
 +time2 <- rnorm2(n, 80, 5)
 +time1
 +time2
 +# 위에서 t1과 t2는 동일한 집단 (샘플)
 +# 샘플의 평균이 다를 뿐
 +time.diff <- time2 - time1
 +mean.diff <- mean(time.diff)
 +se.diff <- sd(time.diff)/sqrt(n)
 +t.calc <- mean.diff/se.diff
 +mean.diff
 +se.diff
 +t.calc
 +# 위의 t calculated value를 t distribution table의 t값과 비교 (t critical value)
 +# t.crit 값은 qt를 이용해서 구함
 +t.crit <- qt(.975, 35) # n-1 = 35
 +t.crit
 +
 +t.calc > t.crit 
 +# 위의 값이 true이므로 t2와 t1 간의 차이가 충분히 크다고 판단하여 
 +# naver의 UI 점수가 t2에서 좋아졌다고 검증한다.
 +</code>
 +
  
 ===== 가설테스트, 예 ===== ===== 가설테스트, 예 =====
t-test.txt · Last modified: 2022/07/07 10:05 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki