#----{Reading Runtime Data}----#
library(s20x)
runtime.df = read.table("runtime.txt", header = TRUE)
boxplot(runtime ~ school, data = runtime.df)
#--------------------=------#
Centre: Group A is higher than Group B Spread: Spread looks similar Skew: Group A is slightly more centered whereas Group B is slighty right skewed
#----{Reading Runtime Data}----#
head(runtime.df)
## runtime school
## 1 14.37 A
## 2 14.58 A
## 3 13.02 A
## 4 12.73 A
## 5 15.14 A
## 6 13.16 A
#---------------------------#
#----{Factoring and Modcheck}----#
runtime.df$school = factor(runtime.df$school)
runtime.fit = lm(runtime ~ school, data = runtime.df)
modcheck(runtime.fit)
#---------------------------#
#----{Summary}----#
summary(runtime.fit)
##
## Call:
## lm(formula = runtime ~ school, data = runtime.df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.4225 -0.5825 -0.2185 0.9415 1.8275
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 13.3125 0.2860 46.547 <2e-16 ***
## schoolB -1.0840 0.3966 -2.733 0.0118 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9907 on 23 degrees of freedom
## Multiple R-squared: 0.2452, Adjusted R-squared: 0.2124
## F-statistic: 7.471 on 1 and 23 DF, p-value: 0.01185
#---------------------------#
#----{Multicomp}----#
multipleComp(runtime.fit)
## Estimate Tukey.L Tukey.U Tukey.p
## 1.084038 0.263600 1.904500 0.011800
#---------------------------#
#----{confint}----#
confint(runtime.fit)
## 2.5 % 97.5 %
## (Intercept) 12.720865 13.9041347
## schoolB -1.904488 -0.2635887
#---------------------------#
We have a quantity measurement on two Schools, so we can do a two sample t-test.
I assume each 100m run is independent of the others. The equity of variance appears to look good as spread is equal. The normality assumption is met with a slight devation in the middle however most points lie on the line on the Q-Q plot, we can use central limit theorem to justify this normality assumption. There does not appear to be unduly influential observations.
Our Model is fitted \(runtime_ij\) =\(mew\) + \(alpha_i\) + \(E_(ij)\) where \(mew\) is the overall mean through time, \(alpha_i\) is the effect of being in each configuration either School A or School B and where \(E_(ij)\) ~\(iid\) \(N(0, sigma^2)\).
Our interest in the data is too determine the affect of using a specialist trainer on the performance of students times, running 100m compared to a general pe teacher.
We found that the School trained by a specialist trainers (School A) tends to take longer to run the 100m than the School who were trained by an ordinary pe teacher (School B).
We estimate that on average the school trained by a specialist (School A) took longer to complete the 100m run by between 0.26 and 1.9 seconds then the school trained by a general pe teacher (School B).
Our model explains 25% of the variation in the data and therefore is not a reasonable model for prediction.
We estimate that using a specialist coach is not useful in this instance