Reading the data

library(GAD)
## Loading required package: matrixStats
## Loading required package: R.methodsS3
## R.methodsS3 v1.8.2 (2022-06-13 22:00:14 UTC) successfully loaded. See ?R.methodsS3 for help.
basic <- c(21,20,25,22,21,22,22,24,24,23,21,25,23,24,24)
cone <- c(28,28,25,29,29,27,30,29,29,29,30,26,26,26,28)
bucket <- c(23,23,23,21,21,22,20,22,22,22,19,19,21,18,18)

obs <- c(21,20,25,22,21,22,22,24,24,23,21,25,23,24,24,
          28,28,25,29,29,27,30,29,29,29,30,26,26,26,28,
          23,23,23,21,21,22,20,22,22,22,19,19,21,18,18)

name <- c(rep("basic",15),rep("cone",15),rep("bucket",15))

game <- data.frame(obs,name)
game$name <- as.fixed(game$name)

Item a - Side-by-side boxplot

boxplot(basic,cone,bucket,
        names=c("Basic Zombie","Cone Zombie", "Bucket Zombie"),
        main="Box Plot")

From the boxplot it is possible to assume that the variances are constant, since the size of the boxes are pretty much the same. However, We can already see that there is an interesting difference in the mean of the boxes, since these are no aligned.

Therefore, it is up to us to use a statistical test to understand if this differance is significant or not.

Item b - Statistical Test

Hypothesis

\[ H_o: \mu_1=\mu_2=\mu_3=\mu \\ H_a: At \; least \; one \; \mu_k \; is \; different \]

Statistical Test

game.model <- aov(obs~name, data=game)
summary(game.model)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## name         2  396.4  198.20    73.8 1.79e-14 ***
## Residuals   42  112.8    2.69                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Since \(p-value=1.79e^{14} < \alpha=0.05\), we can reject \(H_o\) and assume that there is at least one mean that is different.

Item c - Equality of variances and normality

plot(game.model,1)

As we can see in the plot above, the the size of the scatter plots are pretty much the same, which inicates that we can assume that the variances are constant and that the ANOVA model is adequate for this test.

plot(game.model,2)

From the plot above, eventhough the data kind of follows the normal line, it is not extremly normal. But, since the ANOVA is extremly rigid only for the contant variance assumption, we can still say that this test is appropriate for the test.

Item d - Tukey’s test

Tukey <- TukeyHSD(game.model,conf.level=0.95)
plot(Tukey)

Tukey
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = obs ~ name, data = game)
## 
## $name
##              diff       lwr        upr     p adj
## bucket-basic -1.8 -3.253835 -0.3461652 0.0120723
## cone-basic    5.2  3.746165  6.6538348 0.0000000
## cone-bucket   7.0  5.546165  8.4538348 0.0000000

From the results above, it is possible to assume that the Cone Zombies has a mean that differ the most with the grand mean, since the difference between the basic zombie and the bucket zombie are really big.

The boxplot also has shown this to us, beacuse the Cone Zombie has a box that is not aligned to the rest of the data.