Hyphothesis, IV, DV, Blocker: We use age as the IV, performance scores as DV, and the task conditions as block

The age of a person will have an influence on this person’s motor skills H0: There is no difference in performance scores between different age groups H1: At least one group’s performance score is different from others’

Assumptions Normality

plot(density(lab3$Performance_score))

library(moments)
agostino.test(lab3$Performance_score)
## 
##  D'Agostino skewness test
## 
## data:  lab3$Performance_score
## skew = -0.11171, z = -0.45976, p-value = 0.6457
## alternative hypothesis: data have a skewness

Indepence

eruption.lm = lm(lab3$Performance_score ~ lab3$Age, data=lab3) 
eruption.res = resid(eruption.lm)
plot(lab3$Performance_score, eruption.res, ylab="Residuals", xlab="Age", main="Indepence Test") 
abline(0, 0)

Equality of Variance

bartlett.test(lab3$Performance_score, lab3$Age)
## 
##  Bartlett test of homogeneity of variances
## 
## data:  lab3$Performance_score and lab3$Age
## Bartlett's K-squared = 1.0587, df = 2, p-value = 0.589
tapply(lab3$Performance_score, lab3$Age, var)
##        1        2        3 
## 12.89901 18.99570 15.83744

Additivity of Interaction

model1 <- aov(lab3$Performance_score ~ lab3$Age*lab3$Condition, data = lab3)
model1
## Call:
##    aov(formula = lab3$Performance_score ~ lab3$Age * lab3$Condition, 
##     data = lab3)
## 
## Terms:
##                  lab3$Age lab3$Condition lab3$Age:lab3$Condition Residuals
## Sum of Squares  1541.3966      1197.2571                  2.4753  183.0958
## Deg. of Freedom         1              1                       1        85
## 
## Residual standard error: 1.467674
## Estimated effects may be unbalanced
summary(model1)
##                         Df Sum Sq Mean Sq F value Pr(>F)    
## lab3$Age                 1 1541.4  1541.4 715.575 <2e-16 ***
## lab3$Condition           1 1197.3  1197.3 555.812 <2e-16 ***
## lab3$Age:lab3$Condition  1    2.5     2.5   1.149  0.287    
## Residuals               85  183.1     2.2                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

ANOVA Model

model2 <- aov(lab3$Performance_score ~ lab3$Age + lab3$Condition, data = lab3)
summary(model2)
##                Df Sum Sq Mean Sq F value Pr(>F)    
## lab3$Age        1 1541.4  1541.4   714.3 <2e-16 ***
## lab3$Condition  1 1197.3  1197.3   554.9 <2e-16 ***
## Residuals      86  185.6     2.2                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Age is significant. Post-Hoc Test

pairwise.t.test(lab3$Performance_score, lab3$Age, paired = FALSE, p.adjust.method = "bonferroni")
## 
##  Pairwise comparisons using t tests with pooled SD 
## 
## data:  lab3$Performance_score and lab3$Age 
## 
##   1       2      
## 2 1e-04   -      
## 3 3.2e-15 7.1e-07
## 
## P value adjustment method: bonferroni
kruskal.test(lab3$Performance_score~factor(lab3$Age), data = lab3)
## 
##  Kruskal-Wallis rank sum test
## 
## data:  lab3$Performance_score by factor(lab3$Age)
## Kruskal-Wallis chi-squared = 47.376, df = 2, p-value = 5.156e-11

Summary Observations from the study were analyzed by conducting a one-way analysis of variance using R version 3.6.1. First, all assumptions are met, and there is no adjustment made. From the result it suggests that Age has a significant effect on the performance (p < .001). the output also shows that condition has an impact on performance score (p <.001). The post-hoc test shows that there exists significant difference between the three age groups. The result suggested that there is a significant difference between age groups.