R code:
M=c(12,13,10,8,20,22,17,18,4,3,5,1)
f = c("A", "B", "C", "D") # treatment levels
k = 4 # number of treatment levels
n = 3 # number of control blocks
treatment = gl(k, 1, n*k, factor(f)) # matching treatment
block = gl(n, k, k*n)# blocking factor
av = aov(M ~ treatment + block)
summary(av)
Output:
Df Sum Sq Mean Sq F value Pr(>F)
treatment 3 23.6 7.86 3.216 0.104
block 2 512.7 256.33 104.864 2.15e-05 ***
Residuals 6 14.7 2.44
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Hence we fail to reject H01 whereas we reject
H02 i.e. 4 computers are equally awesome but effect of
at least one application is significantly different.
a. Here we consider " Application" as a blocking factor. Since loading time depends on the Application so we need to incorporate blocking factor along with treatment (i.e. Roommate) Let Ti-effect due to computer used by ith roommate, i-A, B,C,D 8,-effect due to ith applicationi-MS Word, Fortnite, Chrome Null hypothesis. Hol : TA= TB = TC = TD vs. Alternative hypothesis, H1 At least one T, is dif ferent from other s. Null hypothesis, Ho2 BMS Word- Fortnite BChrome vs. Alternative hypothesis, Hn: At least one B is different from others.
2. yio-(12 + 13 + 10 + 8)/4-10.75. У20-(20 + 22 + 17-18)/4-1925, у01 (12 + 20 + 4) /3-12. У02-(13 + 22 + 3)/3-1 2.6667, У03-(10 + 17 + 5)/3-10.6667. У04-(8 + 18 + 1)/3-9. у-(12 +134 10 +8 + 20 +22 + 17 + 18+4+3+5+1)/12: 11.0833 SStotal (122+132+102+82+202222172 +182 +42+32+5212) 12 (11.0833)2550.9255 with df 12 111 SSComputer (12212.6667210.66672 +92) 12 11.0833)2 -23.59687 with df 4-1 3 SSApplication 4 (10.752+19.252+3.252) 12 (11.0833)2 512.6755 with df 3-12 SSerrorSStotal -SSComputer SSApplication 550.9255- 23.59687-512.6755 14.65313 with df (3-)(4 1) 6
MSComputer SSComputer/3 - 23.59687/3 -7.8656 MS,Application-512.6755/2 = 256.3378 M Serror SSerror/614.65313/6-2.4422 F - ratio for Computer MSComputer/MSer 7.8656/2.4422- 3.2207 F-ratio for Application = MS Application/ M Serror = 2563378/2.4422 104.9618