2.5 Solved 2 Way Anova With Replication
2.5 Solved 2 Way Anova With Replication
BSCS-3rd year
Department of Computer Science (UOK)
Supervisor: Dr. Shaista Rais
Suppose a botanist wants to know if plant growth is influenced by sunlight exposure and
watering frequency. She plants 40 seeds and lets them grow for one month under different
conditions for sunlight exposure and watering frequency.
After one month, she records the height of each plant. The results are shown below:
In the table above, we see that there were five plants grown under each combination of
conditions.
For example, there were five plants grown with daily watering and no sunlight and their heights
after two months were 4.8 inches, 4.4 inches, 3.2 inches, 3.9 inches, and 4.4 inches:
Grand mean = (4.8 + 5 + 6.4 + 6.3 + … + 3.9 + 4.8 + 5.5 + 5.5) / 40 = 5.1525
Next, we will calculate the mean height of all plants watered daily:
Mean of Daily = (4.8 + 5 + 6.4 + 6.3 + … + 4.4 + 4.8 + 5.8 + 5.8) /20 = 5.155
Next, we will calculate the mean height of all plants watered weekly:
Mean of Weekly = (4.4 + 4.9 + 5.8 + 6 + … + 3.9 + 4.8 + 5.5 + 5.5) /20 = 5.15
Next, we will calculate the sum of squares for the factor “watering frequency” by using the
following formula:
Σn(Xj – X..)2
where:
In our example, we calculate the sum of squares for the factor “watering frequency” to be:
20(5.155-5.1525)2 + 20(5.15-5.1525)2 = .00025
Grand mean = (4.8 + 5 + 6.4 + 6.3 + … + 3.9 + 4.8 + 5.5 + 5.5) / 40 = 5.1525
Next, we will calculate the mean height of all plants with no sunlight exposure:
Mean of No Sunlight = (4.8 + 4.4 + 3.2 + 3.9 + 4.4 + 4.4 + 4.2 + 3.8 + 3.7 + 3.9) / 10 = 4.07
We will repeat this calculation to find the mean height of plants with various sunlight exposures:
Next, we will calculate the sum of squares for the factor “sunlight exposure” by using the
following formula:
Σn(Xj – X..)2
where:
In our example, we calculate the sum of squares for the factor “sunlight exposure” to be:
10(4.07-5.1525)2 + 10(5.1-5.1525)2 + 10(5.89-5.1525)2 + 10(5.55-5.1525)2 = 18.76475
Next, we will calculate the sum of squares within by taking the sum of squared differences
between each combination of factors and the individual plant heights.
For example, the mean height of all plants watered daily with no sunlight exposure is 4.14. We
can then calculate the sum of squared differences for each of these individual plants as:
We can then take the sum of all of these values to find the sum of squares within (error):
Sums of squares within = 1.512 + .928 + 1.788 + 1.648 + .34 + .548 + .652 + 1.268 = 8.684
Next, we can calculate the total sum of squares by taking the sum of the differences between
each individual plant height and the grand mean:
Operation Research
BSCS-3rd year
Department of Computer Science (UOK)
Supervisor: Dr. Shaista Rais
Next, we will calculate the sum of squares interaction by using the following formula:
Lastly, we’ll fill in the values for the two-way ANOVA table:
ANOVA
Source of Variation SS df MS F P-value F crit
Sample 0.00025 1 0.00025 0.000921 0.975975 4.15
Columns 18.76475 3 6.254917 23.04898 3.9E-08 2.90112
Interaction 1.01075 3 0.336917 1.241517 0.310898 2.90112
Within 8.684 32 0.271375
Total 28.45975 39
Criticle value Interaction: The f- criticle value (2.90) that corresponds to F value of
1.241517 with df numerator = 3 and df denominator = 32
Note #1: n = total observations, j = number of levels for watering frequency, k = number of
levels for sunlight exposure.
The critical value for the interaction between watering frequency and sunlight exposure
was 2.90. This is not statistically significant at α = 0.05.
The critical value for watering frequency was 4.15. This is not statistically significant at α =
0.05.
The critical value for sunlight exposure was 2.90. This is statistically significant at α = 0.05.
These results indicate that sunlight exposure is the only factor that has a statistically significant
effect on plant height.
And because there is no interaction effect, the effect of sunlight exposure is consistent across
each level of watering frequency.
That is, whether a plant is watered daily or weekly has no impact on how sunlight exposure
affects a plant.