The Two-Way ANOVA (Analysis of Variance) Calculator helps you analyze the effects of two independent variables (factors) on a dependent variable. It tests whether there are significant differences between the means of different groups, considering both main effects and interaction effects between factors. It provides comprehensive statistical analysis including F-statistics, p-values, and effect sizes to help you interpret the relationships between your variables. To learn about the data format required and test this calculator, click here to populate the sample data.
Calculator
1. Load Your Data
2. Select Columns & Options
Learn More
Two-Way ANOVA
Definition
- Factors: The independent categorical variables.
- Levels: The groups or categories within each factor.
- Interaction: Determines whether the effect of one factor depends on the level of the other factor.
Formulas
Total Sum of Squares Decomposition:
where is the grand mean
where is the mean of level of Factor A, and is the number of levels in Factor B.
where is the mean of level $j$ of Factor B, and $a$ is the number of levels in Factor A.
Where:
- = Sum of Squares for Factor A, where is the number of levels in Factor A
- = Sum of Squares for Factor B, where is the number of levels in Factor B
- = Sum of Squares for interaction with
- = Residual Sum of Squares,
Mean Square:
F-Statistic for each factor:
F-statistics are calculated separately for each factor and interaction effect
Key Assumptions
Practical Example
Step 1: State the Data
Weight loss study examining effects of diet and exercise:
Raw Data:
Diet | Exercise | Weight Loss (pounds) |
---|---|---|
Low-fat | Yes | 8, 10, 9 |
Low-fat | No | 6, 7, 8 |
High-fat | Yes | 5, 7, 6 |
High-fat | No | 3, 4, 5 |
Summary Statistics:
Diet | Exercise | Mean | N |
---|---|---|---|
Low-fat | Yes | 9.00 | 3 |
Low-fat | No | 7.00 | 3 |
High-fat | Yes | 6.00 | 3 |
High-fat | No | 4.00 | 3 |
Step 2: State Hypotheses
Main Effects:
- Diet:
- Exercise:
Interaction:
- for all
Step 3: Calculate Test Statistics
Source | df | SS | MS | F | p-value |
---|---|---|---|---|---|
Diet | 1 | 27.0 | 27.0 | 27.0 | 0.000826 |
Exercise | 1 | 12.0 | 12.0 | 12.0 | 0.008516 |
Diet:Exercise | 1 | 0.0 | 0.0 | 0.0 | 1.0000 |
Residuals | 8 | 8 | 1 |
Step 4: Draw Conclusions
- Significant main effect of Diet (p = 0.000826)
- Significant main effect of Exercise (p = 0.008516)
- No significant interaction effect (p = 1.0000)
- Diet and Exercise appear to have a significant effect on weight loss at
- The interaction between Diet and Exercise are not statistically significant
Effect Size
Partial Eta-squared:
For the example above,
- Diet: (large effect)
- Exercise: (large effect)
- Interaction: (no effect)