c:ms:2025:schedule:week06_t-test_and_anova_note
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
c:ms:2025:schedule:week06_t-test_and_anova_note [2025/04/10 10:27] – [t-test] hkimscil | c:ms:2025:schedule:week06_t-test_and_anova_note [2025/04/14 08:35] (current) – [t-test, different approach] hkimscil | ||
---|---|---|---|
Line 462: | Line 462: | ||
abline(v = mean.a, lty=2, lwd=3, col=" | abline(v = mean.a, lty=2, lwd=3, col=" | ||
abline(v = mean.b, lty=2, lwd=3, col=" | abline(v = mean.b, lty=2, lwd=3, col=" | ||
+ | |||
+ | # or | ||
+ | hist(A, xlim=c(0, | ||
+ | hist(B, add=T, col=rgb(0, 1, 0, 0.5)) | ||
+ | abline(v=mean(dat), | ||
+ | abline(v=mean(A), | ||
+ | abline(v=mean(B), | ||
</ | </ | ||
Line 537: | Line 544: | ||
f.calculated.pvalue <- 1-pf(f.calculated, | f.calculated.pvalue <- 1-pf(f.calculated, | ||
f.calculated.pvalue | f.calculated.pvalue | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | x <- rf(500000, df1 = df.between, df2 = df.within) | ||
+ | hist(x, | ||
+ | | ||
+ | freq = FALSE, | ||
+ | xlim = c(0, 7), | ||
+ | ylim = c(0, 3), | ||
+ | xlab = "", | ||
+ | main = " | ||
+ | with df1 = 1 and df2 = 30", | ||
+ | | ||
+ | ) | ||
+ | curve(df(x, df1 = df.between, df2 = df.within), | ||
+ | from = 0, to = 8, n = 5000, | ||
+ | col = " | ||
+ | add = T) | ||
+ | abline(v=f.calculated, | ||
+ | |||
+ | f.calculated.pvalue | ||
+ | 1 - f.calculated.pvalue | ||
+ | </ | ||
+ | |||
+ | < | ||
# 한편, | # 한편, | ||
# samples t-test를) 아웃 풋은 | # samples t-test를) 아웃 풋은 | ||
Line 648: | Line 680: | ||
> abline(v = mean.b, lty=2, lwd=3, col=" | > abline(v = mean.b, lty=2, lwd=3, col=" | ||
> | > | ||
+ | > # or | ||
+ | > hist(A, xlim=c(0, | ||
+ | > hist(B, add=T, col=rgb(0, 1, 0, 0.5)) | ||
+ | > abline(v=mean(dat), | ||
+ | > abline(v=mean(A), | ||
+ | > abline(v=mean(B), | ||
</ | </ | ||
+ | |||
{{c: | {{c: | ||
+ | {{: | ||
< | < | ||
> # mean.total 에서 그룹a의 평균까지의 차이를 구한 후 | > # mean.total 에서 그룹a의 평균까지의 차이를 구한 후 |
c/ms/2025/schedule/week06_t-test_and_anova_note.1744248456.txt.gz · Last modified: 2025/04/10 10:27 by hkimscil