BaşlayınÜcretsiz Başlayın

Bonferroni correction

Let's implement multiple hypothesis tests using the Bonferroni correction approach that we discussed in the slides. You'll use the imported multipletests() function in order to achieve this.

Use a single-test significance level of .05 and observe how the Bonferroni correction affects our sample list of p-values already created.

Bu egzersiz

Practicing Statistics Interview Questions in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Compute a list of the Bonferroni adjusted p-values using the imported multipletests() function.
  • Print the results of the multiple hypothesis tests returned in index 0 of your p_adjusted variable.
  • Print the p-values themselves returned in index 1 of your p_adjusted variable.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

from statsmodels.sandbox.stats.multicomp import multipletests
pvals = [.01, .05, .10, .50, .99]

# Create a list of the adjusted p-values
p_adjusted = multipletests(____, alpha=____, method='bonferroni')

# Print the resulting conclusions
print(____)

# Print the adjusted p-values themselves 
print(____)
Kodu Düzenle ve Çalıştır