Gözlenen istatistik ve p-değeri
Artık bir boş dağılımın var. Bir p-değeri elde etmek ve sıfır hipotezine karşı kanıtı değerlendirmek için, late_shipments örnekleminde gözlenen oranlar farkını hesaplaman gerekiyor.
late_shipments hazır; dplyr, infer ve ggplot2 yüklü.
Bu egzersiz
R ile Hipotez Testi
kursunun bir parçasıdırUygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
null_distn <- late_shipments %>%
specify(
late ~ freight_cost_group,
success = "Yes"
) %>%
hypothesize(null = "independence") %>%
generate(reps = 2000, type = "permute") %>%
calculate(
stat = "diff in props",
order = c("expensive", "reasonable")
)
# Copy, paste, and modify the pipeline to get the observed statistic
obs_stat <- ___
# See the result
obs_stat