1. Learn
  2. /
  3. Courses
  4. /
  5. Hypothesis Testing in Python

Connected

Exercise

Wilcoxon signed-rank test

You'll explore the difference between the proportion of county-level votes for the Democratic candidate in 2012 and 2016 to identify if the difference is significant.

sample_dem_data is available, and has columns dem_percent_12 and dem_percent_16 in addition to state and county names. The following packages have also been loaded: pingouin and pandas as pd.

Instructions 1/2

undefined XP
  • 1
    • Conduct a paired t-test on the percentage columns using an appropriate alternative hypothesis.
  • 2
    • Conduct a Wilcoxon-signed rank test on the same columns.