Red and Black

기초통계값 비교

최소값, 제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

t-test

p-value 를 보고 판단하세요.

t.test(comments_w$total ~ comments_w$group) %>%
  pander
Welch Two Sample t-test: comments_w$total by comments_w$group
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

QQplot

기울기가 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")