Skip to Main Content

BSCI 1511L Statistics Manual: 3.4 ANOVA with blocking

Introduction to Biological Sciences lab, second semester

3.4 ANOVA with blocking

                When attempting to show the effect of an experimental treatment, variance within treatment groups is the enemy. We try to reduce variability within a treatment by carefully controlling the conditions under which we conduct the treatment, but sometimes (especially in biology) variability of replicates is unavoidable. For example, if you are conducting a drug trial, uncontrollable differences in the study participants will obscure the results. One possible solution would be to give the drug repeatedly to the same subject, but this would be pseudoreplication - you would really only be testing how the drug worked on that one individual rather than on patients in general. A commonly used way to reduce participant variation is to use standardized laboratory strains of organisms (e.g. “white mice”). But even this strategy will not remove all of the variation. 

                  An alternative method of handling within-treatment variation is blocking. In this strategy, a replicate of each treatment is performed on a single individual (or group of individuals that have in common their position or time of experimentation). For example, both the drug and the placebo could be given to individual mice (at different times, of course). The block would be “the individual mouse” and would be considered an experimental factor in a two-factor ANOVA. We don't really care about whether the block factor is significant or not (it probably is or we wouldn't be worrying about it). What we do care about is that some of the variance in the analysis that would have been in the error term gets allocated to the block effect instead. This increases the likelihood that the F-ratio of the non-block effect (i.e. drug mean square divided by the error mean square) will be big enough to be significant. 

                  Let's illustrate with an example. Earlier, it was shown that there was no significant difference in the amplitude of response of cockroach eyes to 36 standardized pulses of blue and green and red light. The 36 measurements were made on a number of different roaches by different students over a period of three hours, so the history and sensitivity of the eyes, the position of the electrode, and the response of the meter were likely to have varied a lot in an uncontrolled way over the course of the experiment. Fortunately, the measurements were made in pairs, where a particular roach eye was stimulated by a blue and a green and a red pulse over a relatively short period of time. Each set of a blue and a green and a red measurement taken at a certain time from a particular eye was considered a block. There are two null hypotheses in this test:

                  There is no difference between the mean roach eye responses of the three colors.

                  There are no differences among the mean roach eye responses of the different observing groups (blocks of measurements made by particular students).

Table 6 is using the SAME DATA as what was used for Table 3. When analyzed as a two-factor ANOVA, the result is:

Table 6. Analysis of variance of effect of colored light on a roach eye using blocking

Source

Degrees of freedom

Sum of squares

Mean square

F ratio

P

Color

2

857.2

428.60

38.3146

1.606

e-10

Block

23

1481.83

64.43

5.7595

2.415 e-7

Residuals

46

514.57

11.9

 

 

Total

71

2853.6

 

 

 

 

                  By comparison with the ANOVA table (Table 3), you can see from the sum of squares that the color variance and the total variance have not changed (857.2 and 2853.6). But now a huge amount of the variance that was previously attributed to “residuals” has now been partitioned to the block effect. In other words, most of the non-color differences can now be explained by the differences in the eyes when they received the pulses. As a result, the mean square of the residuals has dropped from 42.2 to 11.9, causing the F ratio of the color effect to increase from 14.8 to 38.3146. As a consequence, the difference between the response to blue and green and red pulses changed from significant to highly significant (P=0.005). (Important to note: there is not really such a thing as being "more" significant")  We can reject the null hypothesis that there is no difference between the response to the three colors. The highly significant block effect shows that there are significant differences among the means of the sets of measurements, which makes sense since they were made on different roaches with different LEDs, and different electrode implantations. We would reject the null hypothesis that there are no differences among the mean responses of the blocks. The equipment itself is giving differences. There still is a difference in light response among color, and simply looking at the data you can see that red values are lower than blue or green.  Blue and green look about equal.  For our purposes, simply knowing that there IS a difference...that the cockroach is perceiving light wavelengths differently AND that the equipment/nature of obtaining the data is in turn affecting results is what we need to know.

                  The rationale for including a block effect in an ANOVA may remind you of a paired t-test. In fact, an ANOVA with two treatments in the experimental factor and block as a factor produces exactly the same statistical result as a paired t-test. However, the advantage of an ANOVA with blocking over a paired t-test is that you are not limited to two treatments or a single experimental factor.

AS COMPARSION, with only two groups of data (blue and green, NO RED), this should be the result if doing a two factor ANOVA (color and block), with blocking as a possible factor affecting the data also. The data used to make Table 1 is used here.

Table 7. Analysis of variance of effect of colored light on a roach eye using blocking

Source

Degrees of freedom

Sum of squares

Mean square

F ratio

P

Color

1

53.0

53.0

9.6

0.005

Block

23

1814.6

78.9

14.3

<0.0001

Residuals

23

126.8

5.5

 

 

Total

47

1994.4

 

 

 

 

 

You can see from the sum of squares that the color variance and the total variance have not changed. But now a huge amount of the variance that was previously attributed to “residuals” has now been partitioned to the block effect. In other words, most of the non-color differences can now be explained by the differences in the eyes when they received the pulses. As a result, the mean square of the residuals has dropped from 42.2 to 5.5, causing the F ratio of the color effect to increase from 1.26 to 9.6 . As a consequence, the difference between the response to blue and green pulses changed from non-significant to highly significant (P=0.005).

Caveats!

              You should be aware that we are greatly simplifying the ANOVA. There are many aspects of ANOVA that are beyond the scope of this class. You should consider taking the Biostatistics class to learn more about how to correctly carry out an ANOVA. Here is a list of things we've glossed over:

1. We didn't test that our data meet two important assumptions of ANOVA: normality of residuals and equal variance among treatment groups.

2. We didn't talk about the interaction term between the two main factors in the two factor ANOVA.

3. We didn't distinguish between fixed and random effects in our discussion of blocking. We really should carry out the ANOVA with blocking using a different R script that accounts for the fact that our block effect is random.

4. We didn't mention that the roach eye experiment was an example of a type of experimental design called randomized complete block. In that design, there is no replication within the treatment groups and that requires some changes in the assumptions of how we calculate the F statistic.

5. We didn't talk about a posteriori tests that should come after ANOVAs where there are more than two treatments per factor. We also didn't talk about what to do if the overall ANOVA is not significant, or if there is a significant interaction.

                  At this point in your career, you shouldn't worry about these things, but you should be aware that when you get ready to analyze data that you have collected in your own experiments, the process is more complicated than what we've done here.