c:ps1-1:note_on_statistical_test_2
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| c:ps1-1:note_on_statistical_test_2 [2024/12/11 09:01] – hkimscil | c: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, | + | f.calculated.pvalue <- pf(f.calculated, |
| + | | ||
| + | lower.tail = F) | ||
| f.calculated.pvalue | f.calculated.pvalue | ||
| + | # 위가 의미하는 것은? | ||
| + | |||
| + | |||
| # 한편, | # 한편, | ||
| # samples t-test를) 아웃 풋은 | # samples t-test를) 아웃 풋은 | ||
| Line 331: | Line 349: | ||
| sqrt(a.res.sum[[1]][1, | sqrt(a.res.sum[[1]][1, | ||
| t.result$statistic | t.result$statistic | ||
| + | |||
| </ | </ | ||
c/ps1-1/note_on_statistical_test_2.1733875279.txt.gz · Last modified: by hkimscil
