Get startedGet started for free

Performing a goodness of fit test

The bar plot of vendor_inco_term suggested that its 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.

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

late_shipments is available; tibble, dplyr, ggplot2, and infer are loaded.

This exercise is part of the course

Hypothesis Testing in R

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

hypothesized_props <- c(
  EXW = 0.75, CIP = 0.05, DDP = 0.1, FCA = 0.1
)

# Run chi-square goodness of fit test on vendor_inco_term
test_results <- ___





# See the results
test_results
Edit and Run Code