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 04:41] – [t-test, different approach] hkimscil | c:ms:2025:schedule:week06_t-test_and_anova_note [2025/04/13 23: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 538: | Line 545: | ||
| f.calculated.pvalue | f.calculated.pvalue | ||
| </ | </ | ||
| + | |||
| < | < | ||
| - | df.between | ||
| - | df.within | ||
| x <- rf(500000, df1 = df.between, df2 = df.within) | x <- rf(500000, df1 = df.between, df2 = df.within) | ||
| hist(x, | hist(x, | ||
| | | ||
| freq = FALSE, | freq = FALSE, | ||
| - | xlim = c(0, 3), | + | xlim = c(0, 7), |
| - | ylim = c(0, 1), | + | ylim = c(0, 3), |
| xlab = "", | xlab = "", | ||
| main = " | main = " | ||
| Line 552: | Line 558: | ||
| | | ||
| ) | ) | ||
| - | curve(df(x, df1 = df.one, df2 = df.two), | + | curve(df(x, df1 = df.between, df2 = df.within), |
| - | from = 0, to = 4, n = 5000, | + | from = 0, to = 8, n = 5000, |
| col = " | col = " | ||
| add = T) | add = T) | ||
| abline(v=f.calculated, | abline(v=f.calculated, | ||
| + | f.calculated.pvalue | ||
| + | 1 - f.calculated.pvalue | ||
| </ | </ | ||
| + | |||
| < | < | ||
| # 한편, | # 한편, | ||
| Line 671: | 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.1744260114.txt.gz · Last modified: by hkimscil
