MulaiMulai sekarang secara gratis

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.

Latihan ini adalah bagian dari kursus

Hypothesis Testing in Python

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Conduct a paired t-test on dem_percent_12 and dem_percent_16
paired_test_results = ____ 




# Print paired t-test results
print(paired_test_results)
Edit dan Jalankan Kode