One-way analysis of variance (ANOVA) is a statistical test that compares the means of 3 or more samples. The null hypothesis is that all k means are identical, and the alternative hypothesis is that at least 2 of the k means differ.
The assumptions of the ANOVA test are as follows: (1) independence of observations, (2) normal distribution of dependent variables, and (3) homogeneity of variance.
Example: a priori
Assume that a study investigated the effects of 4 analgesics: A, B, C, and D. Pain will be measured at 6 hours postoperatively using a VAS. The researchers wanted to determine the sample size for the null hypothesis to be rejected at α=0.05 and β=0.2.
When the effect size is determined: For the ANOVA test, Cohen suggested the effect sizes of “small,” “medium,” and “large” as 0.1, 0.25, and 0.4, respectively [
12], and G*Power provides conventional effect size values when the cursor is moved onto the “effect size” in the “input parameters” field. In this case, we calculated the sample size using a medium effect size (0.25).
After opening G*Power, go to “test>means>many groups: ANOVA: one-way (one independent variable).” In the main window, set “type of power analysis” as “a priori: compute required sample size-given α, power, and effect size.” Since we decided to use a medium effect size, α=0.05, and β=0.2, we enter 0.25 for “effect size f,” 0.05 for “α err prob,” and 0.8 for “power (1-β err prob).” Moreover, as we compared 4 analgesics, we input 4 for “number of groups.” Pushing the “calculate” button computes the total sample size as 180, as shown in the “total sample size” in the “output parameters” area.
When the effect size is not determined: Assume that a pilot study showed the following means and SDs (of VAS) at 6 hours postoperation for drugs A, B, C, and D: 2±2, 4±1, 5±1, and 5±2, respectively, in 5 patients for each group.
Push the “determine” button and the effect size calculator window will appear. Here, we can find 2 options: “effect size from means” and “effect size from variance.” Select “effect size from means” in the “select procedure” drop-down menu and select 4 in the “number of groups” drop-down menu.
Here, as G*Power does not provide the common SD, we must calculate this. The formula for the common SD is as follows:
Spooled: common SD
S1, S2, S3, S4: SDs in each group
n1, n2, n3, n4: numbers of patients in each group
Using the above formula, we obtain the following:
Herein, the common SD will be 1.58. Thus, input 1.58 into the blank of “SD σ within each group.” As the means and numbers of patients in each group are 2, 4, 5, and 5 and 5, 5, 5, and 5, respectively, input each value, and then click the “calculate and transfer to main window” button. Then, the corresponding effect size “0.7751550” will be automatically calculated and appear in the blank for “effect size f” in the main window.
Since we decided to use 4 groups, α=0.05, and β=0.2, input 4 for “number of groups,” 0.05 for “α err prob,” and 0.8 for “power (1-β err prob).” Pushing the “calculate” button computes the total sample size as 24, as shown in the “total sample size” in the “output parameters” area.
Example: post hoc
Assume that a clinical trial showed the following means and SDs of VAS at 6 hours postoperation in drugs A, B, C, and D : 2±2, 4±1, 5±1, and 5±2, respectively, in 20 patients for each group. The researchers want to determine the power with 2-tailed testing, α=0.05, and β=0.2.
After opening G*Power, go to “test>means>many groups: ANOVA: one-way (one independent variable).” In the main screen, select “type of power analysis” as “post hoc: compute achieved power-given α, sample size and effect size,” and then push the “determine” button to show the effect size calculator screen.
Using the above formula, the common SD is 1.58. Thus, input 1.58 into the blank of “SD σ within each group.” As the means and numbers of patients in each group are 2, 4, 5, and 5, and 20, 20, 20, and 20, respectively, input these values into the corresponding blank; next, click the “calculate and transfer to main window” button.
Then, the corresponding effect size “0.7751550” and the total number of patients will be calculated automatically and appear in the blanks for “effect size f” and “total sample size” on the main screen.
Since the clinical trial used 4 groups and we decided to use α=0.05, input 4 for “number of groups” and 0.05 for “α err prob.” Pushing the “calculate” button will compute the power as 0.9999856 at “power (1-β err prob)” in the “output parameters” area.