최소값, 제1사분위수, 중위수, 산술평균, 제3사분위수, 최대값. 닮았나요?
comments_w$group <- class_roll0305$group[match(comments_w$id, class_roll0305$id)]
tapply(comments_w$total, comments_w$group, summary) %>%
pander
Red:
Min. | 1st Qu. | Median | Mean | 3rd Qu. | Max. |
---|---|---|---|---|---|
0 | 10.7 | 13.8 | 12.61 | 15.6 | 18 |
Black:
Min. | 1st Qu. | Median | Mean | 3rd Qu. | Max. |
---|---|---|---|---|---|
0 | 9.9 | 13.7 | 12.05 | 15 | 18 |
tapply(comments_w$total, comments_w$group, sd) %>%
pander
Red | Black |
---|---|
4.368 | 4.656 |
tapply(comments_w$total == 0, comments_w$group, sum) %>%
pander
Red | Black |
---|---|
20 | 17 |
p-value 를 보고 판단하세요.
t.test(comments_w$total ~ comments_w$group) %>%
pander
Test statistic | df | P value | Alternative hypothesis | mean in group Red | mean in group Black |
---|---|---|---|---|---|
1.887 | 903.1 | 0.05943 | two.sided | 12.61 | 12.05 |
기울기가 45도에 가까운가요?
qqplot(comments_w$total[comments_w$group == "Red"],
comments_w$total[comments_w$group == "Black"],
main = "QQplot for Red and Black",
xlab = "Red",
ylab = "Black")