Get startedGet started for free

Exploring confounding variables

In this exercise, you're going to do some exploratory data analysis (EDA) to better understand confounding variables. Once again, we'll be looking at trends in weights of Olympic athletes from the athletes DataFrame. We are interested in possible differences between the weights of athletes from different countries, which may be more difficult to determine than it seems.

Are apparent differences between countries due to real differences between the countries, or might they be caused by something else within the data? Exploratory data analysis will help! The athletes DataFrame contains details about Olympic athletes from Ethiopia and Kenya. pandas and plotnine have been loaded into the workspace as pd and p9.

This exercise is part of the course

Performing Experiments in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Create boxplot of Team versus Weight
plotTeamVWeight = p9.ggplot(____)+ p9.aes(x=____, y=____)+ p9.____
Edit and Run Code