Exercise

Parametric vs non-parametric tests

Once again we'll be using the Olympic dataset. Here we're going to compare the Height of athletes from both the Norwegian and Chinese 1996 Teams. The data are provided in your workspace as athletes. Do they differ?

Density plot of height of Norwegian and Chinese 1996 Olympians

Do these two distributions look normal or not? First, we'll test whether these sets of samples follow a normal distribution, via a couple of Shapiro-Wilks tests. Then we'll choose what statistical test to use. Finally, we'll test the difference between the Norwegian and Chinese samples.

pandas, scipy.stats, and plotnine have been loaded into the workspace as pd, stats, and p9, respectively.

Instructions 1/3

undefined XP
    1
    2
    3
  • Create two series, named NorwayHeights and ChinaHeights, each of which contains all the values of Height for the members of their respective Team.
  • Perform a Shapiro-Wilks test of NorwayHeights and ChinaHeights and print the p-values.