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

Performing a goodness of fit test

The bar plot of vendor_inco_term suggests that the distribution across the four categories was quite close to the hypothesized distribution. You'll need to perform a chi-square goodness of fit test to see whether the differences are statistically significant.

Recall the hypotheses for this type of test:

\(H_{0}\): The sample matches with the hypothesized distribution.

\(H_{A}\): The sample does not match with the hypothesized distribution.

To decide which hypothesis to choose, we'll set a significance level of 0.1.

late_shipments, incoterm_counts, and hypothesized from the last exercise are available. chisquare from scipy.stats has been loaded.

Bu egzersiz

Hypothesis Testing in Python

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

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Perform a goodness of fit test on the incoterm counts n
gof_test = ____


# Print gof_test results
print(gof_test)
Kodu Düzenle ve Çalıştır