User Tools

Site Tools


c:ps1-1:note_on_statistical_test_2

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
c:ps1-1:note_on_statistical_test_2 [2024/12/11 09:01] hkimscilc:ps1-1:note_on_statistical_test_2 [2024/12/11 09:01] (current) – [The meaning of statistical testing] hkimscil
Line 146: Line 146:
 dat <- c(A,B) dat <- c(A,B)
 dat dat
 +
 +# just to remind
 +mean(A)
 +mean(B)
 +sd(A)
 +sd(B)
  
 mean.total <- mean(dat) mean.total <- mean(dat)
 var.total <- var(dat) var.total <- var(dat)
 +mean.total
 +var.total
 # variance를 ms라고 부르기도 한다 # variance를 ms라고 부르기도 한다
 # ms = mean square (square 값을 n 으로 나눈 값이 분산이므로) # ms = mean square (square 값을 n 으로 나눈 값이 분산이므로)
Line 199: Line 207:
 ss.a <- var(A) * df.a ss.a <- var(A) * df.a
 ss.b <- var(B) * df.b ss.b <- var(B) * df.b
 +ss.a
 +ss.b
 +
 ss.within <- ss.a + ss.b ss.within <- ss.a + ss.b
  
Line 204: Line 215:
 df.b <- length(B)-1 df.b <- length(B)-1
 df.within <- df.a + df.b df.within <- df.a + df.b
 +df.within
  
 ms.within <- ss.within / df.within ms.within <- ss.within / df.within
 +ms.within
  
 # 여기까지 우리는  # 여기까지 우리는 
Line 249: Line 262:
 # 차이가 점점 커지게 되는 오른쪽을  # 차이가 점점 커지게 되는 오른쪽을 
 # 계산하기 위해서는 1-x를 취한다 # 계산하기 위해서는 1-x를 취한다
-f.calculated.pvalue <- 1-pf(f.calculated, df1=df.between, df2=df.within)+f.calculated.pvalue <- pf(f.calculated,  
 +                          df1=df.between, df2=df.within,  
 +                          lower.tail = F)
 f.calculated.pvalue f.calculated.pvalue
 +# 위가 의미하는 것은?
 +
 +
 # 한편,  t test를 했었을 때 (A, B 그룹을 가지고 independent  # 한편,  t test를 했었을 때 (A, B 그룹을 가지고 independent 
 # samples t-test를) 아웃 풋은  # samples t-test를) 아웃 풋은 
Line 331: Line 349:
 sqrt(a.res.sum[[1]][1,4]) sqrt(a.res.sum[[1]][1,4])
 t.result$statistic t.result$statistic
 +
  
 </code> </code>
c/ps1-1/note_on_statistical_test_2.1733875279.txt.gz · Last modified: 2024/12/11 09:01 by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki