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

Performing a chi-square test

The chi-square independence test compares proportions of successes of a categorical variable across categories of another categorical variable.

Trade deals often use a form of business shorthand in order to specify the exact details of their contract. These are International Chamber of Commerce (ICC) international commercial terms, or incoterms for short.

The late_shipments dataset includes a vendor_inco_term that describes the incoterms that applied to a given shipment. The choices are:

  • EXW: "Ex works". The buyer pays for transportation of the goods.
  • CIP: "Carriage and insurance paid to". The seller pays for freight and insurance until the goods board a ship.
  • DDP: "Delivered duty paid". The seller pays for transportation of the goods until they reach a destination port.
  • FCA: "Free carrier". The seller pays for transportation of the goods.

Perhaps the incoterms affect whether or not the freight costs are expensive. Test these hypotheses with a significance level of 0.01.

\(H_{0}\): vendor_inco_term and freight_cost_group are independent.

\(H_{A}\): vendor_inco_term and freight_cost_group are associated.

late_shipments is available; ggplot2 and infer are loaded.

Bu egzersiz

Hypothesis Testing in R

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

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Plot vendor_inco_term filled by freight_cost_group.
# Make it a proportional stacked bar plot.
___
Kodu Düzenle ve Çalıştır