CAN ANYONE SOLVE THIS BY USING R ? CAN YOU PLEASE NOT USE the (CORRECT=F FUNCTION) WHEN SOLVING PART B, I AM NOT VERY CLEAR WITH THAT.
2) From a random sample of 673 items made by a particular manufacturing process, it is found that 27 are defective.
(a) (1 mark) Find a 99.5% confidence interval for the proportion of defective items made by the process. (Also include the commands and output.)
(b) (1 mark) Give the command and output to test the alternative hypothesis that the proportion of defective items made by the process is greater than than 0.03.
(c) (1 mark) What is the p-value for our test?
(d) (1 mark) What is the strength of evidence we have found against H0?
THANK YOU
ANSWER:
(a)
Commands:
X<-27
> n<-673
> p_hat <- X/n
> variance_of_p_hat <- p_hat*(1-p_hat)/n
> standard_deviation_of_p_hat <-
sqrt(variance_of_p_hat)
> zcrit<-qnorm(0.9975)
> error <- zcrit*standard_deviation_of_p_hat
> left <- p_hat - error
> right <- p_hat + error
Output :
> variance_of_p_hat
[1] 5.722043e-05
> standard_deviation_of_p_hat
[1] 0.007564418
> p_hat
[1] 0.04011887
> zcrit
[1] 2.807034
> left
[1] 0.01888529
> right
[1] 0.06135245
(b)
Commands :
p0 = 0.03
test_statistic <- (p_hat - p0)/sqrt((p0*(1-p0))/n)
test_statistic
Output :
> test_statistic
[1] 1.538839
(c)
Command :
> p_value<-pnorm(-abs(test_statistic))
Output :
> p_value
[1] 0.06192185
(d)
Strength of evidence = 0.062
Get Answers For Free
Most questions answered within 1 hours.