KNOWLEDGEBASE - ARTICLE #1038

How can I determine needed sample size for an experiment to be analyzed by two-way ANOVA?

Computing required sample size for experiments to be analyzed by ANOVA is pretty complicated, with lots of possiblilities. To learn more, consult books by Cohen or Bausell and Li, but plan to spend at least several hours. Two-way ANOVA, as you'd expect, is more complicated than one-way.

The complexity comes from the many possible ways to phrase your question about sample size. The rest of this article strips away most of these choices, and helps you determine sample size in one common situation, where you can make the following assumptions:

  • There are two levels of the first factor, say the factor is Drug and you either gave the drug or gave vehicle (placebo). So two possible treatments, or two "levels" of the factor.
  • There are two levels of the second factor. If the factor is genotype, then you compare wild-type to mutant.
  • You care most about the interaction. This means you don't care so much if the first factor has an effect, nor the second. Your prime experimental question is whether the second factor has the same effect for both "levels" of the first factor. So in our example, you ask whether the difference between drug and vehicle is the same effect in wild-type and mutant cells.
  • You want to compute sample size for 80% power, which is common.
  • You define statistical significance as P<0.05, which is arbitrary but very standard.

If those limitations aren't a problem for you, then read on for a simple way to compute necessary sample size.

Sample size is always determined to detect some hypothetical difference. It takes huge samples to detect tiny differences but tiny samples to detect huge differences, so you have to specify the size of the effect you are trying to detect. In our example, we are measuring receptor number in control and treated cells and plan to compare wild-type and mutant cells. To express the effect size you care about, you need to specify the difference between the difference -- the treated minus control difference for wild-type cells minus that same difference for mutant cells.

What about units? That difference between differences will be expressed in the same units as your data (in receptor number for this example). You need to divide this difference  by the standard deviation you expect to see to turn the results into a unitless effect size. To do this, you need to estimate the SD you expect to see by looking at prior data. If you have no idea what SD you expect to see, then it is impossible to calculate a sample size.

Another way to look at this is to express the difference you expect to see as a fraction of the mean. Then express the scatter as a coefficient of variance (CV), which is the SD divided by the mean. Divide the relative difference by the CV, and the means divide out, and the result is what we are looking for -- the difference divided by the expected SD.

So, to reiterate, step 1 is to state the smallest effect you want to detect expressed as the difference in one group minus the difference in the other, with the results normalized to the expected SD.

Step 2 is to divide the result in step 1 by 2.00 to get the standardized effect size ES.

Step 3 is to look in the table below to look up the needed sample size (per group, and total for the entire experiment). This table is abridged from Table 9-26 of  by Bausell and Li, who unfortunately do not adequately explain how it is computed.

 

ES N Total N
0.3 87 348
0.5 39 156
0.7 17 68
0.8 13 52
1.0 9 36
1.5 5 20
2.0 4 16
3.0 3 12
     

 

 

Explore the Knowledgebase

Analyze, graph and present your scientific work easily with GraphPad Prism. No coding required.