Introduction to ANOVA

Goran Kardum

History

  • Have been employed since the early eighteenth century (Serlin, 2005)

  • Basic model with modern statistics around early nineteenth century

  • R.A. Fisher in early twentieth century - systematic method and usage in science as inferential method with random sample from a hypothetical infinite population (around 1925 in the book about statistical methods for research workers)

  • First used by behavioral scientists in the 1930s, use of Analysis of Variance (ANOVA) grew quickly after World War II

  • critiques by psychologists of its overuse and misuse (ref)

ANOVA - general consideration

  • Parametric analysis, in the majority of experiments with two or more different groups (independent research design) or two or more repeated measures (dependent research design)

  • Dependent variable (subject matter): interval/ratio scale

  • Estimating how a quantitative dependent variable changes according to the levels of one or more categorical independent variables.

  • Statistical procedure used to test the degree to which two or more groups are different in dependent variable (subject matter) within research design or experiment

  • Whether there is a difference in means of the groups at each level of the independent variable.

  • Null hypothesis (H0) of the ANOVA there are no difference in means or assumption that there will be no difference between groups

  • Alternative hypothesis (Ha): means are different from one another

N-way ANOVA (independent research design)

  • one-way ANOVA: difference in verbal IQ tested among three faculties (Faculty of Law, Faculty of Humanities and Social Sciences and Medical School)

  • two-way ANOVA: difference in verbal IQ tested among three faculties (Faculty of Law, Faculty of Humanities and Social Sciences and Medical School) and Age group

  • three-way ANOVA: difference in verbal IQ tested among three faculties (Faculty of Law, Faculty of Humanities and Social Sciences and Medical School), Age group and Gender

R steps

  • loading the data

  • check the assumptions

  • performing ANOVA test

  • performing post-hoc test

  • find the best fit model

  • plot the results in a graph

  • report the results (according to APA rule)

ANOVA assumptions

ANOVA is relatively robust in respect to these assumptions:

  • Check for homoscedasticity

  • Homogeneity of variance: We assume that each of our populations has the same variance

  • Normality: We assume that the scores for each condition are normally distributed

  • In a repeated-measures analysis: additional assumption - sphericity

Steps: practical usage of ANOVA

  1. Descriptive statistics: means, standard deviations, confidence intervals and graphical illustrations such as box and whisker plots

  2. Test the assumptions for usage ANOVA

  3. Effect size: the magnitude of the difference between the conditions, d, and an overall measure of effect, partial eta^2(\(\eta^2\))

  4. Inferential tests: a statistical test called Analysis of Variance (ANOVA) evaluates differences between the conditions expressed as F-value and corresponding p.

  5. Post hoc tests: if F-value was significant

Understanding the basic concepts of ANOVA

  • independent research design we partitioned the variance into two parts: between-groups variance and within-groups variance

  • dependent research design the within-groups variance consist of: the variability in scores because of individual differences and the variability due to random error

Steps

  1. calculates the mean for each of the groups.
  2. Calculates the grand mean (the means are added together, then divided by number of groups).
  3. For each group separately, the total deviation of each individual’s score from the mean of the group is calculated. This is the within-groups variation.
  4. Deviation of each group mean from the grand mean is calculated. This is the between-groups variation.

Independent research design F-ratio

\[ F=\frac{\text{Between-groups variance}}{\text{Within-groups variance}}\]

Two estimates of the variance are made

  • Variance between samples: An estimate of \(\sigma^2\) that is the variance of the sample means multiplied by n (when the sample sizes are the same.)

  • Variance within samples: An estimate of \(\sigma^2\) that is the average of the sample variances (pooled variance). When the sample sizes are different, the variance within samples is weighted.

  • \(SS~between\) = the sum of squares that represents the variation among the different samples

  • \(SS~within\) = the sum of squares that represents the variation within samples that is due to chance.

  • MS means “mean square” \(MS~between\) is the variance between groups, and \(MS~within\) is the variance within groups.

Independent research design F-ratio

\[ F=\frac{M{S}_{\text{between}}}{M{S}_{\text{within}}}\]

ANOVA variations

ANOVA variations

ANOVA large one-way effect

Anova in R

  • Anova with aov()

  • Anova with lm()

Data visualisation with ggplot2

Implementation in psychology

  • tutorials for using R in psychological research (Revelle, 2022)