MT LESSON 7
📚 MT-LESSON-7.pdf
Brief overview
This document introduces and details the statistical methodology of Analysis of Variance (ANOVA), focusing on one-way and two-way designs. Understanding ANOVA is crucial for comparing means across multiple groups and interpreting experimental results in various fields.
Key points
- Overview of the principles and learning objectives for Analysis of Variance (ANOVA).
- Manual calculation and MS Excel/SPSS application of one-way ANOVA.
- Detailed manual calculation and MS Excel/SPSS application of two-way ANOVA.
- Understanding the assumptions and interpretation of ANOVA results.
- References for further study in statistical analysis.
1. Introduction to analysis of variance (ANOVA)
1.1 Overview of ANOVA
ANOVA, or Analysis of Variance, is a statistical method developed by Sir Ronald Fisher. It is used to determine mean differences between two or more groups.
ANOVA is an inferential procedure using sample data to draw conclusions about populations. It is considered a robust test, meaning it can still provide appropriate results even if data is not perfectly normally distributed.
ANOVA is widely used in experimental and social research. There are two primary types of ANOVA discussed: one-way and two-way.
- One-way ANOVA: Compares means of two or more independent groups. It is used when you have one independent (grouping) variable with multiple levels and one continuous dependent variable. This test is suitable for field studies, experiments, and quasi-experiments. While an independent samples t-test can compare two groups, one-way ANOVA is used for three or more.
- Two-way ANOVA (Factorial ANOVA): This is an extension of one-way ANOVA. It involves two or more independent variables and one dependent variable. A two-way ANOVA can identify main effects of each independent variable and also detect interaction effects between them.
1.2 Manual computation of one-way ANOVA
Manually calculating a one-way ANOVA involves several steps to test for significant differences between group means.
1.2.1 Hypotheses and significance level
- Null Hypothesis (H0): States there is no significant difference between the means of the groups.
- Alternative Hypothesis (H1): States there is a significant difference between at least two group means.
- Level of Significance (α): Typically set at 0.05, indicating the probability of rejecting a true null hypothesis.
1.2.2 Calculation steps
The manual calculation of a one-way ANOVA follows these steps:
-
Calculate the Correction Factor (CF): This is a constant value used in subsequent calculations. CF=Nt(∑xt)2 Where:
- ∑xt is the sum of all scores across all groups.
- Nt is the total number of observations.
-
Calculate the Total Sum of Squares (TSS): This measures the total variability in the data. TSS=∑xt2−CF Where:
- ∑xt2 is the sum of the squared scores for all observations.
-
Calculate the Between Sum of Squares (BSS): This measures the variability between the group means. BSS=∑ni(∑xi)2−CF Where:
- ∑xi is the sum of scores for each group i.
- ni is the number of observations in each group i.
-
Calculate the Within Sum of Squares (WSS): This measures the variability within each group. It is often called the error sum of squares. WSS=TSS−BSS
1.2.3 ANOVA table and F-value
The calculated sums of squares are organized into an ANOVA table.
Where:
- K is the number of groups.
- Nt is the total number of observations.
The F-value is the ratio of the variance between groups to the variance within groups. If the computed F-value is greater than the tabular (critical) F-value at the chosen significance level, the null hypothesis is rejected, indicating a significant difference between group means.
Key Relationship: Reject H0 if Fcomputed>Ftabular.
1.3 ANOVA using software
Statistical software like MS Excel and SPSS can automate ANOVA calculations, reducing the chance of manual errors and providing additional diagnostic information.
1.3.1 Using MS Excel
MS Excel offers a "Data Analysis" tool that can perform a one-way ANOVA.
- Steps: Navigate to Data > Data Analysis > Anova: Single Factor. Select the data ranges, specify grouping by columns, and check for labels if present. Excel uses a default alpha of 0.05.
- Decision Rule: If the p-value from the output is less than 0.05, reject the null hypothesis.
1.3.2 Using SPSS
SPSS is a powerful statistical software package that can also perform one-way ANOVA.
-
Steps: Go to Analyze > Compare Means > One-Way ANOVA. Input the dependent variable and the independent (factor) variable. Options allow for post hoc tests (like Tukey) and descriptive statistics.
-
Assumptions: Before running ANOVA, several assumptions must be checked:
- Dependent variable: Interval or ratio level (continuous).
- Independent variable: Two or more categorical, independent groups.
- Independence of observations: No relationship between observations in different groups.
- No significant outliers: Extreme data points that could skew results.
- Normality: Dependent variable is approximately normally distributed for each group.
- Homogeneity of variances: Variances of the dependent variable are roughly equal across groups (tested using Levene's test).
-
Interpreting SPSS Output: The output includes descriptive statistics, the ANOVA table with an F-statistic and p-value, and post hoc test results to identify which specific groups differ.
🔑 Important: If ANOVA assumptions are violated, alternative tests like Welch ANOVA or non-parametric equivalents may be necessary.
1.4 Reporting ANOVA results
When reporting ANOVA results, include key statistics and interpretations.
- General reporting: State the type of ANOVA used (e.g., one-way ANOVA), the F-statistic, degrees of freedom, and the p-value. Report post hoc test findings to specify which groups differ significantly.
- Effect Size: It is increasingly common to report an effect size (e.g., eta-squared, η2) alongside ANOVA results. Effect size indicates the proportion of variance in the dependent variable explained by the independent variable, providing a measure of the magnitude of the effect.
Example Reporting: "A one-way ANOVA revealed a statistically significant difference in scores between the three groups (F(2,27)=4.467, p=.021). Post hoc Tukey tests indicated that the beginner group scored significantly lower than the intermediate (p=.046) and advanced groups (p=.034), with no significant difference between the intermediate and advanced groups (p=.989)."
🔑 Important: ANOVA tells you if there's a difference, but post hoc tests and effect sizes tell you where and how big that difference is.
2. Two-way ANOVA calculations and applications
2.1 Understanding Two-way ANOVA
A two-way ANOVA (Analysis of Variance) is used to determine if there are significant differences between the means of groups based on two independent categorical variables (factors). It allows us to assess the individual effects of each factor and their combined effect (interaction) on a continuous dependent variable.
A two-way ANOVA tests for effects of two factors and their interaction on a dependent variable.
| Factor | Description |
|---|---|
| Independent Variables | Two categorical variables defining the groups. |
| Dependent Variable | One continuous variable being measured. |
| Interaction | The combined effect of the two independent variables. |
2.2 Manual Calculation of Two-way ANOVA
Manual calculation involves computing sums of squares (SS), degrees of freedom (df), mean squares (MS), and F-ratios.
2.2.1 Calculating Sums of Squares (SS)
The process starts with calculating the total sum of squares (SSt), which represents the total variation in the data. This is then partitioned into variation explained by the factors and their interaction (SSb) and variation not explained by the factors (SSw).
| Sum of Squares | Formula |
|---|---|
| SSt | ∑X2−Nt(∑X)2 (Total variation) |
| SSb | ∑Number in Group(Group Sum)2−Nt(∑Xt)2 (Variation due to the combination of factors) |
| SSw | SSt−SSb (Within-group or error variation) |
The variation explained by the factors (SSb) is further broken down into:
| Sum of Squares | Formula |
|---|---|
| SSA | ∑Number in Factor A Group(∑Factor A Group Sum)2−Nt(∑Xt)2 (Variation due to Factor A alone) |
| SSB | ∑Number in Factor B Group(∑Factor B Group Sum)2−Nt(∑Xt)2 (Variation due to Factor B alone) |
| SSA×B | SSb−SSA−SSB (Variation due to the interaction of Factor A and Factor B) |
SSt is total variation; SSb is explained variation; SSw is unexplained variation.
2.2.2 Calculating Degrees of Freedom (df)
Degrees of freedom represent the number of independent pieces of information available to estimate a parameter.
| df | Formula |
|---|---|
| dfA | Number of levels of A - 1 |
| dfB | Number of levels of B - 1 |
| dfA×B | dfA×dfB |
| dfw | Nt−(Number of groups) |
df helps determine the critical value for hypothesis testing.
2.2.3 Calculating Mean Squares (MS) and F-ratios
Mean squares are calculated by dividing each sum of squares by its corresponding degrees of freedom. These are estimates of variance.
The F-ratio is the ratio of a mean square for a factor or interaction to the mean square within groups.
| Measure | Formula |
|---|---|
| MSA | SSA/dfA |
| MSB | SSB/dfB |
| MSA×B | SSA×B/dfA×B |
| MSw | SSw/dfw |
| FA | MSA/MSw |
| FB | MSB/MSw |
| FA×B | MSA×B/MSw |
The F-ratio compares the variance explained by a factor to the error variance.
2.2.4 Hypothesis Testing and Interpretation
Hypothesis testing involves comparing the calculated F-ratios to critical F-values from an F-distribution table. If the calculated F-ratio exceeds the critical value, the null hypothesis is rejected, indicating a significant effect.
Decision Rule: If computed F > critical F, reject the null hypothesis.
| Source of Variation | SS | df | MS | F-ratio (computed) | F-critical (.05) | Significance |
|---|---|---|---|---|---|---|
| Factor A | 0.58 | 2 | 0.29 | 0.76 | 3.56 | NS |
| Factor B | 3.76 | 1 | 3.76 | 9.89 | 4.41 | S |
| Factor A x B | 1.33 | 2 | 0.67 | 1.76 | 3.56 | NS |
| Within (Error) | 6.82 | 18 | 0.38 | - | - | - |
- Factor B had a significant effect because its F-ratio (9.89) was greater than the critical value (4.41).
- Factor A and the interaction (A x B) did not show statistically significant effects.
2.3 Two-way ANOVA in Software
Software like MS Excel and SPSS simplifies two-way ANOVA calculations and interpretation.
2.3.1 MS Excel
Excel's Data Analysis ToolPak provides options for "Two-Factor With Replication" and "Two-Factor Without Replication." The "With Replication" option is used when there are multiple observations per group, ensuring a balanced design (equal observations per group).
Excel requires balanced designs for its two-way ANOVA functions.
Interpreting Excel Output:
- P-value column: Check if p-values for main effects and the interaction are below the significance level (alpha, usually 0.05).
- Main effects: Significant if their p-values are less than alpha.
- Interaction effect: If significant, it dictates how main effects are interpreted.
2.3.2 SPSS Statistics
SPSS Statistics offers a robust interface for conducting two-way ANOVA, allowing for detailed analysis of main effects and interactions.
Key Steps in SPSS:
- Analyze > General Linear Model > Univariate: This opens the main dialog box.
- Input Variables: Assign the dependent variable and the two independent variables (factors).
- Plots: Create profile plots to visually inspect for interactions. Non-parallel lines often suggest a significant interaction.
- Post Hoc Tests: Used for factors with more than two groups to conduct pairwise comparisons (e.g., Tukey's test).
- Options: Request descriptive statistics and other relevant information.
SPSS uses profile plots to visually identify potential interaction effects.
2.4 Assumptions of Two-way ANOVA
Before interpreting results, it's crucial to check several assumptions to ensure the validity of the analysis.
| Assumption # | Name | Description | How to Check (SPSS) |
|---|---|---|---|
| 1 | Continuous Dependent Var. | The dependent variable must be measured on an interval or ratio scale. | N/A (Design/Measurement) |
| 2 | Categorical Independent Vars. | Each independent variable must have two or more distinct categories. | N/A (Design/Measurement) |
| 3 | Independence of Obs. | Observations within and between groups must be independent. | N/A (Study Design) |
| 4 | No Significant Outliers | Data points should not be extreme values that distort results. | Explore tool (Descriptive Stats) > Outliers > Boxplots. Compare 5% trimmed mean with mean. |
| 5 | Normality | The dependent variable should be approximately normally distributed for each combination of the independent variables. | Shapiro-Wilk test, Skewness/Kurtosis, Histograms, Normal Q-Q plots (Analyze > Descriptive Statistics > Explore or Analyze > Descriptive Statistics > Frequencies). |
| 6 | Homogeneity of Variances | The variances of the dependent variable should be equal across all groups. | Levene's test for Homogeneity of Variances (Analyze > Descriptive Statistics > Explore > Statistics > Outliers; or Analyze > Compare Means > One-Way ANOVA > Post Hoc > Levene's test). |
Robustness: ANOVA is relatively robust to minor violations of normality and homogeneity.
If Levene's test p-value is > 0.05, homogeneity is met. If < 0.05, it's violated.
2.5 Interpreting Two-way ANOVA Results
Interpretation prioritizes the interaction effect before considering main effects.
- Interaction Effect: If the interaction term is statistically significant (p < alpha), it means the effect of one independent variable on the dependent variable depends on the level of the other independent variable.
- If significant, report simple main effects. These analyze the effect of one factor at each level of the other factor.
- Main Effects: If the interaction is not significant (p > alpha), then the main effects can be interpreted independently.
- A significant main effect indicates that the factor has a significant impact on the dependent variable, averaged across the levels of the other factor.
Report the interaction effect first, then main effects if the interaction is not significant.
Reporting Results:
When reporting, state the F-statistic, degrees of freedom, and p-value for the interaction and main effects. For example: "A two-way ANOVA revealed a significant interaction between gender and education level on interest in politics, F(2,54)=4.643,p=.014."
🔑 Important: Always report the interaction effect before the main effects in a two-way ANOVA.
3. References
3.1 Sources and statistical tools
This section lists the primary sources consulted for this document. These include textbooks on psychological statistics and guides for performing statistical analyses using SPSS software.
- Psychological Statistics: This text provides foundational knowledge in statistical methods relevant to psychology.
- A Handbook of Statistical Analyses Using SPSS: This guide focuses on practical application of statistical techniques using SPSS, a widely used statistical software package 38.
© 2026 Maeve. All rights reserved. This content is protected by copyright.