최소값, 제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 | 7.1 | 8.4 | 7.924 | 9.7 | 12 |
Black:
Min. | 1st Qu. | Median | Mean | 3rd Qu. | Max. |
---|---|---|---|---|---|
0 | 6.7 | 8.1 | 7.631 | 9.7 | 12 |
tapply(comments_w$total, comments_w$group, sd) %>%
pander
Red | Black |
---|---|
2.756 | 2.866 |
tapply(comments_w$total == 0, comments_w$group, sum) %>%
pander
Red | Black |
---|---|
21 | 19 |
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.573 | 905.5 | 0.1162 | two.sided | 7.924 | 7.631 |
기울기가 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")