What is an ANOVA?

Welcome to the ANOVAs! This group of parametric tests is designed to compare multiple groups. If you have a complex dataset and are thinking, “Where do I even start?”— look no further! This session will help you determine if your data is suitable for ANOVA analysis.

What is ANOVA?

ANOVA stands for Analysis of Variance, a statistical analysis method be used to analyze differences among means of two or more groups or treatments. This analysis is widely used in various fields of research, and is particularly useful in experimental studies (like my thesis!).

Depending on which ANOVA you choose, it can examine the variance (potentially) within each group as well as the variance between groups. Understanding this concept can be challenging, especially if you’re new to it, but I promise it becomes more straight forward with practice. Let’s break it down a bit:

Imagine you are conducting a study to compare the exam scores of students from three different schools: School A, School B and School C. You have collected the exam scores from each school and want to determine if there are significant differences in the average scores amongst the three schools. When testing for between-group variation, you’re assessing the variance in the mean exam scores across all three schools. Within-group variation, on the other hand, examines the variability of exam scores within each individual school — for example, we look at how much each students scores vary from each groups mean. In other words, within-group variance involves assessing the variance how spread out the exam scores are within School A, then School B, and finally School C.

By calculating the within-group variance for each school individually, this helps us gain insight into the consistency of student performance within that specific school. A higher within-group variance suggests that exam scores within that particular school are more spread out, creating larger variability amongst students’ performance on the exam within that school.

ANOVA can compare the magnitude of the between-group variation to the within-group variation. If the between-group variation is significantly larger than the within-group variation, it suggests that there are genuine differences in the means of the groups. On the contrary, if significant differences are found within-groups but not between them, it indicates that while individuals within each group may vary in their scores, the overall averages across the three groups are similar. If both within- and between-groups variances are significant, this means that there are individual differences within each group and meaningful differences across all three groups.

Types of ANOVAs
Unsurprisingly enough, statisticians have developed a range of ANOVAs for different experimental designs. Initially, I found this overwhelming when conducting analyses for my thesis because there were so many options to choose from. Fortunately, I’m here to help guide you, so you won’t have to struggle as much as I did. Below are the common types of ANOVA analyses and examples of when you should use them:

1. One-Way ANOVA (The OG)
Also known as a single-factor ANOVA, this test is used when you have one categorical independent variable (with three or more levels) and one continuous dependent variable. It assesses differences in means among the levels of the independent variable.

Example:
*When running statistical analyses, you should change your data to be more statistically “friendly”. This means assigning numbers to each variable. This will be done for all examples. See below:

Independent variable
Treatment (with 3 levels: control = 1; low does = 2; high dose = 3)

Dependent variable
Blood pressure (continuous variable) → treatment blood_pressure

treatment blood_pressure
1 120
1 118
2 128
2 122
3 135
3 140

2. Two-Way ANOVA
Also known as factorial ANOVA, this test is used when you have two categorical independent variables (factors) and one continuous dependent variable. It examines the main effect of each independent variable as well as the interaction between them.

Example:
Independent variable
Treatment (control = 1; experimental = 2) and Gender (male = 1, female = 2)

Dependent variable
Weight loss (continuous)

treatment weight gender
1 120 1
1 118 1
1 128 2
2 122 2
2 135 2
2 140 1

3. Repeated Measures ANOVA
This test is used when you have one group of participants measured multiple times under different conditions. It handles autocorrelation (the tendency of data points taken close together in time to be related to one another) by accounting for the fact that repeated measurement are not independent.

Example:
Independent variable
Within-subject factors → Levels: Pre_Training, Post_Training, Follow_Up (time points)

Dependent variable
Score

Participant Pre_Training Post_Training Follow_Up
1 70 85 80
2 60 78 75
3 65 80 77
4 72 88 85
5 68 83 82

Here the same participant was measured under three different times.

4. Mixed ANOVA
Combines both the repeated measures and between-subjects designs. It evaluates if there are significant differences in the dependent variable not only across different conditions or timepoints (repeated measures), but also between groups (between-subjects).

Example:
Independent variables
Between-subject factors → Levels: Method A, Method B)

Within-subject factors → Levels: Pre_Training, Post_Training, Follow_Up

Dependent variable
Score (continuous)

Participant Teaching_Method Pre_Training Post_Training Follow_Up
1 A 70 85 80
2 A 60 78 75
3 A 65 80 77
4 B 72 88 85
5 B 68 83 82
6 B 64 81 78
7 A 66 82 79
8 B 71 86 84

5. Multivariate ANOVA (MANOVA)
This is used when you have two or more dependent variables and one or more categorical independent variables. This assesses the overall group differences across dependent variables at the same time.

Example:
Independent variable
Treatment (control = 1; experimental = 2)

Dependent variable:
Blood Pressure, Heart Rate

treatment blood_pressure heart_rate
1 120 70
1 118 68
1 122 72
2 130 75
2 128 73
2 132 78

6. Analysis of Covariance (ANCOVA)
This combines features of ANOVA and regression analysis. It is used when you have one or more continuous covariates (predictor values) in addition to one or more categorical independent variables. It helps control for the effects of the covariates on the dependent variables while you look at the group differences.

Example:
Independent variable
Treatment (control = 1; experimental = 2)
Covariate: Age (continuous)

Dependent variable
Weight loss (continuous)

treatment age weight_loss
1 35 2.5
1 40 3.0
1 45 2.0
2 35 4.0
2 40 3.5
2 45 4.5

7. Multivariate Analysis of Covariance (MANCOVA)
An extension of the MANOVA, this test includes covariates (a variable that is considered to have an effect on the dependent variable, but it is not something we are inherently testing for). It allows for the assessment of group differences across multiple dependent variables while simultaneously controlling the effects of the covariates.

Example:
Independent variable
Treatment (control = 1; experimental = 2)
Covariate: Age (continuous)

Dependent variables
Blood Pressure, Heart Rate

treatment age blood_pressure heart_rate
1 35 120 70
1 40 118 68
1 45 122 72
2 35 130 75
2 40 128 73
2 45 132 78

Thanks for joining me on this exploration of ANOVAs! I hope this little information session has helped you figure out what test you can use on your dataset!

Keywords: AI statistics, AI statistical analysis, GPT, Statistical Analysis, Parametric Tests, ANOVA, Analysis of Variance, one-way ANOVA, two-way ANOVA, repeated measures ANOVA, mixed ANOVA, multivariate ANOVA, analysis of covariance

References & Further Reading:

  1. Kim T. K. (2017). Understanding one-way ANOVA using conceptual figures. Korean journal of anesthesiology , 70 (1), 22–26. Understanding one-way ANOVA using conceptual figures
  2. Liu, X. (2016). Methods and applications of longitudinal data analysis. Academic Press.
  3. Montgomery, D. C. (2019). Design and Analysis of Experiments (10th ed.). Wiley.
  4. Muhammad L. N. (2023). Guidelines for repeated measures statistical analysis approaches with basic science research considerations. The Journal of clinical investigation , 133 (11), e171058. JCI - Guidelines for repeated measures statistical analysis approaches with basic science research considerations
  5. Tabachnick, B. G., & Fidell, L. S. (2013). Using Multivariate Statistics, 6th ed. Boston: Allyn and Bacon.
2 Likes

Thanks for the additional resources. :ok_hand:

2 Likes

Hello, my question is whether Julius could perform an ANCOVA, and possibility even other functions that a typical SPSS could do? If not, do you know of any other AI tools that could do the same? I’m looking to replace my SPSS subscription.

Hey Tim,

Just jumping in here: I believe it should be possible, as it can perform a MANCOVA, which is an extension of ANCOVA. However, I haven’t personally tried this myself. Have you given it a try yet?