Session Ready
Exercise

Shapiro-Wilk test

Previously, you looked at country-level Unemployment and GDP per capita (GDP_per_cap) data (available in your workspace as countrydata). Now, you will use a Shapiro-Wilk test to examine whether the distribution of values seen in these samples, as seen in the Q-Q plots below, departs significantly from the normal distribution. This test tells us how closely a given sample fits the patterns expected from a normal distribution.

Density plot of life expectancy per country and GDP per country

pandas and scipy.stats have been loaded into the workspace as pd and stats.

Instructions 1/2
undefined XP
  • 1

    Perform a Shapiro-Wilk test on the Unemployment figures and print the output.

    • 2

      Perform a Shapiro-Wilk test on the GDP_per_cap figures and print the output.