Question: What would be the code using the package wperm from RStudios for an example like this? A quality control engineer collects a sample of gears,

What would be the code using the package "wperm" from RStudios for an example like this?

A quality control engineer collects a sample of gears, examining 1000 gears from each of two companies: the current supplier, and a competitor. The competitor is more expensive, but claims their gears are more reliable, lowering warranty claims. At a 91 percentage level, evaluate the difference in quality control: is there a statistical increase in reliability for the competitor versus the current supplier?Results of Experiment

Current Competitor

Pass 850 957

Fail 150 43

Use set.seed(120) for the randomization, and the wPerm package to explore the difference in proportions, proportion passing QC (competitor) minus proportion passing QC (current supplier). Use R = 1e4 replicates, and a data vector in 'stacked' form using the code:

dat <- data.frame(QCPass = c(rep(1, 850), rep(0, 150), rep(1, 957), rep(0, 43)), Company = factor(c(rep(1, 1000), rep(2, 1000))))

For the hypothesis test of competitor greater than current, as reported by wPerm:

The observed difference:

The empirical p-value:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!