Module 9


gender <- c(1,2,2,1,2,2,1,2,1,2,1,2)
HandUp <-
c(9,11,1,8,2,6,3,4,8,3,10,6)

t.test(gender)

##
##  One Sample t-test
##
## data:  gender
## t = 10.652, df = 11, p-value = 3.921e-07
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  1.256163 1.910503
## sample estimates:
## mean of x
##  1.583333


t.test(HandUp)

##
##  One Sample t-test
##
## data:  HandUp
## t = 6.1819, df = 11, p-value = 6.89e-05
## alternative hypothesis: true mean is not equal to 0
## 95 percent confidence interval:
##  3.810110 8.023224
## sample estimates:
## mean of x
##  5.916667


t.test(gender, HandUp)

##
##  Welch Two Sample t-test
##
## data:  gender and HandUp
## t = -4.4739, df = 11.53, p-value = 0.0008382
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -6.453243 -2.213424
## sample estimates:
## mean of x mean of y
##  1.583333  5.916667


#The two sample means are 1.58 and 5.92

#The degrees of freedom are both 11 and 11.53 together

#The t-test statistic scores are 10.65 and 6.18 and -4.47 together

#The p value is 0.0008 which is not significant

Comments