ANOVA & Post-hoc Tests

One-way ANOVA in R with aov(), then Tukey’s post-hoc test to find which groups differ — plus a boxplot.

Compare the means of three or more groups, then find out which pairs differ.

Run the code

Everything in the video — edit it and press Run Code to run real R right here, or copy it:

Download this R script  ·  ▶ Open the full playground

When to use it. Use ANOVA when comparing 3+ group means on a roughly normal outcome; follow a significant result with Tukey’s HSD, which adjusts for multiple comparisons.

Read one-way ANOVA with post-hoc · t-test vs ANOVA.

Next: Non-parametric Tests →