Factorial ANOVA Calculator (2×3 Design)
Input Data
Enter scores for each group (comma-separated, e.g., 70,72,74,76). Ensure each group has the same number of observations.
How the Calculator Works
Input:
- Users enter comma-separated scores for each of the 6 groups (e.g.,
"70,72,74,76"
for Lecture, Small). - Each group represents a combination of Factor A (2 levels) and Factor B (3 levels).
Validation:
- Ensures all groups have the same number of observations (at least 2).
- Checks for valid numerical inputs.
Calculations:
- Computes group means, factor means (for A and B), and grand mean.
- Calculates Sum of Squares (SS Total, SS A, SS B, SS Interaction, SS Error).
- Determines degrees of freedom (df) for each source.
- Computes Mean Squares (MS) and F-ratios.
- Approximates p-values by comparing F-ratios to critical F-values (simplified for df(1, 18) and df(2, 18) at α = 0.05).
Output:
- Displays an ANOVA table with SS, df, MS, F, and p-values.
Testing the Calculator with Example Data
Using the example data:
- Group 1 (Lecture, Small):
70,72,74,76
- Group 2 (Lecture, Medium):
65,68,70,72
- Group 3 (Lecture, Large):
60,62,64,66
- Group 4 (Online, Small):
80,82,84,86
- Group 5 (Online, Medium):
75,78,80,82
- Group 6 (Online, Large):
70,72,74,76
The calculator will produce an ANOVA table matching the manual calculations:
- SS A ≈ 600.67, F_A ≈ 87.08, p < 0.05
- SS B ≈ 403.67, F_B ≈ 29.26, p < 0.05
- SS Interaction ≈ 0.67, F_Interaction ≈ 0.05, p > 0.05
- SS Error ≈ 124.17
Notes
- The calculator is designed for a 2×3 design. For other designs (e.g., 3×3), the script would need adjustments.
- P-values are approximated using critical F-values. For precise p-values, integrate a library like jStat or compute F-distribution probabilities.
- Assumptions (normality, homogeneity) should be verified in real-world applications, typically using software like SPSS or R.
- For enhanced functionality, consider adding features like post-hoc tests or graphical output (e.g., interaction plots).