#Dominic
gametrt<-c(25,29,34,27,31)
gamecnt<-c(37,28,28,25,31)
var(gametrt)
## [1] 12.2
var(gamecnt)
## [1] 20.7
var.test(gametrt,gamecnt)
##
## F test to compare two variances
##
## data: gametrt and gamecnt
## F = 0.58937, num df = 4, denom df = 4, p-value = 0.6211
## alternative hypothesis: true ratio of variances is not equal to 1
## 95 percent confidence interval:
## 0.06136396 5.66064080
## sample estimates:
## ratio of variances
## 0.589372
#we do a f-test to satisy the assumption of equal variance.
#The p-value we get is 0.6211.
#Since that is greater than 0.05 then we would fail to reject the null
#hypothesis. Which means we would not have enough evidence to conclude that the variance
#are unequal
t.test(gametrt, gamecnt, alternative = "greater")
##
## Welch Two Sample t-test
##
## data: gametrt and gamecnt
## t = -0.2339, df = 7.4994, p-value = 0.5893
## alternative hypothesis: true difference in means is greater than 0
## 95 percent confidence interval:
## -5.411628 Inf
## sample estimates:
## mean of x mean of y
## 29.2 29.8
#The p-value we get is 0.5893.
#In this case, according to the data, we would fail to reject the null hypothesis
#In conclusion, we do not have enough evidence to claim that the difference in treatment group mean and the control group mean is not greater than 0.
boxplot(gametrt,gamecnt,ylim = c(24,38), main="Game Treatment Group vs Game Control Group", ylab="# of Seconds", col=c("blue","red"), names=c("Treatment Group", "Control Group"))

#The box plot shows the range of values that each group resulted in after playing the game
#The control group has an outlier at 37.