Beobachtete Statistik und p-value
Du hast jetzt eine Nullverteilung. Um einen p-Wert zu erhalten und die Beweise gegen die Nullhypothese abzuwägen, musst du den Unterschied in den Anteilen berechnen, der in der Stichprobe late_shipments beobachtet wird.
late_shipments ist verfügbar; dplyr, infer und ggplot2 sind geladen.
Diese Übung ist Teil des Kurses
<Kurs>Hypothesentests in R</Kurs>Interaktive praktische Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
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