STA1511-Completely Randomized Design
Definition
The completely randomized design is concerned with the comparison of t population (treatment) means \(\mu_{1}, \mu_{2}, ..., \mu_{t}\). The treatments are randomly allocated to the experimental units in such a way that n1 units receive treatment 1, n2 receive treatment 2, and so on. The objective of the experiment is to make inferences about the corresponding treatment (population) means.
Model
The model for a completely randomized design with t treatments and \(n_i\) observations per treatment can be written in the form:
Table
A Completely Randomized Design
Hypothesis Testing
\(H_{0}:\mu_{1}=\mu_{2}=...=\mu_{t}\)
\(H_{1}:\) Not all \(\mu_{i}\)’s are equal
Analysis of variance table for a completely randomized design:
with
Advantages and Distadvantages
Advantages
The design is extremely easy to construct.
The design is easy to analyze even though the sample sizes might not be the same for each treatment.
The design can be used for any number of treatments.
Disadvantages
Although the completely randomized design can be used for any number of treatments, it is best suited for situations in which there are relatively
few
treatments.The experimental units to which treatments are applied must be as homogeneous as possible. Any extraneous sources of variability will tend to inflate the error term, making it more difficult to detect differences among the treatment means.
Example 1
Suppose the researcher conducts an experiment. The reflective coating is applied to the 16 highway sections and 6 months later the decrease in reflectivity is computed at each section. The resulting measurements are given in Table below. Is there significant evidence at the alpha = 0.05 level that the four paints have different mean reductions in reflectivity?
Answer:
It appears that paint P4 is able to maintain its reflectivity
longer
than the other three paints, because it has the
smallest decrease in reflectivity. We will now attempt to confirm this
observation by testing the hypotheses
.
I.Hypotheses:
\(H_{0}:\mu_{1}=\mu_{2}=\mu_{3}=\mu_{4}\)
\(H_{1}:\) Not all \(\mu_{i}\)’s are equal
II.Significance Level: 5%
III.Test Statistics
We will construct the Analysis of variance table by computing the sum of squares using the formulas given previously:
Complete ANOVA Table:
IV.Rejection Region:
Reject H0 if \(F_{test}>F_{df1;df2;0.05}=3.49\) .
V.Conclusion
Because F_test=0.98<F_table=3.49, we fail to reject H0. There is not a significant difference in the mean decrease in reflectivity for the four types of paints.
Using R:
#Data
library(readxl)
<-read_excel("D:/MATERI KULIAH S2 IPB/ASPRAK 2/RAL.xlsx")
example1 example1
## # A tibble: 16 x 3
## Paint Section Response
## <chr> <dbl> <dbl>
## 1 P1 1 28
## 2 P1 2 35
## 3 P1 3 27
## 4 P1 4 21
## 5 P2 1 21
## 6 P2 2 36
## 7 P2 3 25
## 8 P2 4 18
## 9 P3 1 26
## 10 P3 2 38
## 11 P3 3 27
## 12 P3 4 17
## 13 P4 1 16
## 14 P4 2 25
## 15 P4 3 22
## 16 P4 4 18
#anova table
<-aov(Response~Paint, data=example1)
anovatablesummary(anovatable)
## Df Sum Sq Mean Sq F value Pr(>F)
## Paint 3 136.5 45.50 0.983 0.433
## Residuals 12 555.5 46.29
Example 2
In an experiment to determine the effect of nutrition on the attention spans of elementary school students, a group of 15 students were randomly assigned to each of three meal plans: no breakfast, light breakfast, and full breakfast. Their attention spans in minutes) were recorded during a morning reading period.
What is the most proper procedure to use if you want to test whether a difference in the mean attention spans of students among the three meal plans? Write down the hypotheses of the test you choose.
Answer:
I.Hypotheses:
\(H_{0}:\mu_{1}=\mu_{2}=\mu_{3}\)
\(H_{1}:\) Not all \(\mu_{i}\)’s are equal
II.Significance Level: 5%
III.Test Statistics
Complete ANOVA Table: (Using R)
#Data
library(readxl)
<-read_excel("D:/MATERI KULIAH S2 IPB/ASPRAK 2/RAL.xlsx",sheet="Sheet2")
example2 example2
## # A tibble: 15 x 3
## meal_plans students minutes
## <chr> <dbl> <dbl>
## 1 no_breakfast 1 8
## 2 no_breakfast 2 7
## 3 no_breakfast 3 9
## 4 no_breakfast 4 13
## 5 no_breakfast 5 10
## 6 light_breakfast 1 14
## 7 light_breakfast 2 16
## 8 light_breakfast 3 12
## 9 light_breakfast 4 17
## 10 light_breakfast 5 11
## 11 full_breakfast 1 10
## 12 full_breakfast 2 12
## 13 full_breakfast 3 16
## 14 full_breakfast 4 15
## 15 full_breakfast 5 12
#anova table
<-aov(minutes~meal_plans, data=example2)
anovatablesummary(anovatable)
## Df Sum Sq Mean Sq F value Pr(>F)
## meal_plans 2 58.53 29.267 4.933 0.0273 *
## Residuals 12 71.20 5.933
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
IV.Rejection Region:
Reject H0 if \(F_{test}>F_{2;12;0.05}=3.89\) .
V.Conclusion
Because F_test=4.933>F_table=3.89, H0 is rejected. Therefore, there is a difference in the mean attention spans of students among the three meal plans
Multiple comparisons
From example 2 : we conclude that there is a difference in the mean attention spans of students among the three meal plans, so we need to do multiple comparisons of treatments by means, we can use “Least significant difference(LSD)” test.
library(agricolae)
<-LSD.test(example2$minutes, example2$meal_plans,12,5.933)
LSD LSD
## $statistics
## MSerror Df Mean CV t.value LSD
## 5.933 12 12.13333 20.07507 2.178813 3.356503
##
## $parameters
## test p.ajusted name.t ntr alpha
## Fisher-LSD none example2$meal_plans 3 0.05
##
## $means
## example2$minutes std r LCL UCL Min Max Q25 Q50
## full_breakfast 13.0 2.449490 5 10.626594 15.37341 10 16 12 12
## light_breakfast 14.0 2.549510 5 11.626594 16.37341 11 17 12 14
## no_breakfast 9.4 2.302173 5 7.026594 11.77341 7 13 8 9
## Q75
## full_breakfast 15
## light_breakfast 16
## no_breakfast 10
##
## $comparison
## NULL
##
## $groups
## example2$minutes groups
## light_breakfast 14.0 a
## full_breakfast 13.0 a
## no_breakfast 9.4 b
##
## attr(,"class")
## [1] "group"
From the result above we can conclude that there is no difference in the mean attention spans of students among light_breakfast and full_breakfast meal plans, but there is a difference in the mean attention spans of student among light_breakfast and no_breakfast meal plans, and among full_breakfast and no_breakfast meal plans.
Excercise
The researchers conduct a study involving 100 students. Twenty-five students were randomly assigned to each of the four methods of instruction: no instruction (control), piano lessons, computer video games, or instructor. The researchers measure the effectiveness of the four methods by assessing the children and assigning them a reasoning score both before and after their participation in the program. The difference in these two scores is the response variable. The data are given here.
Conduct an analysis of variance and summarize your results in an Anova table. Test the research hypothesis that there is a difference in mean effectiveness of the methods of instruction. Use alpha 0.05.
Apply a multiple comparison procedure to determine pairwise differences in the three methods. Use alpha 0.05.
Was there significant evidence that all three methods of instruction produced higher mean reasoning scores than the mean reasoning score for the control?