Session Ready
Exercise

Two-way ANOVA with interactive effects

Once again, you're going to look at our dataset of Olympic athletes. As in previous exercises, you'll be looking at the variation in athlete Weight. You're going to look at athletes of either Sex competing in one of two Events: the 100 meter and 10,000 meter run. Have a look at these data in the boxplots below.

Density plot of athlete weight in relation to sex and event

This dataset is provided in your workspace as athletes. An ANOVA will allow you to work out which of these variables affect Weight and whether an interactive effect is present. pandas, statsmodels, and plotnine have been loaded into the workspace as pd, sm, and p9, respectively.

Instructions
100 XP
  • Perform a two-way ANOVA to test whether Sex, Event, or the interaction between the two has a significant effect on Weight.
  • Using anova_lm() on your model, extract and print the table of results produced by your ANOVA.