Session Ready
Exercise

One-way ANOVA

Let's have another look at some data from our Olympic dataset. How does the Weight of athletes vary between teams from different countries? In this exercise, you're going to use a one-way ANOVA to check for the presence of significant variation in Weight of Olympic athletes. You have been provided with the athletes DataFrame, containing details about male athletes from the Team of the United States, France, and China. Here is a set of boxplots of Weight for the athletes from those three countries.

Density plot of the body weights of Olympic athletes from three competing countries

A one-way ANOVA will allow you to see whether any differences between these groups of values are significant. pandas, scipy.stats, and plotnine have been loaded into the workspace as pd, stats, and p9, respectively.

Instructions
100 XP
  • Create three arrays, France_athletes, US_athletes, and China_athletes, for the athletes' Weights from each country.
  • Using f_oneway(), perform a one-way ANOVA on the arrays, save the result as anova, and print it.