relatively quick question regarding this course question:
Hearing about your brilliant success in working with M&Ms, Mars Inc. transfers you over to the Skittles department. They recently have had complaints about tropical Skittles being mixed in with original Skittles. You decide to conduct a frequentist analysis. If the findings suggest than more than 1% of sampled supposedly original Skittles are actually tropical you will recommend action to be taken and the production process to be corrected. You will use a significance level of \alpha = 0.1α=0.1. You randomly sample 300 supposedly original skittles, and you find that five of them are tropical. What should be the conclusion of your hypothesis test? Hint - H_0: p = 0.01H 0 :p=0.01 and H_1: p > 0.01H 1 :p>0.01.
Reject H_0H 0 , since the p-value is equal to 0.027, which is less than \alpha = 0.1α=0.1
Fail to reject H_0H 0 , since the p-value is equal to 0.245, which is greater than \alpha = 0.1α=0.1
Fail to reject H_0H 0 , since the p-value is equal to 0.101, which is greater than \alpha = 0.1α=0.1
Fail to reject H_0H 0 , since the p-value is equal to 0.184, which is greater than \alpha = 0.1α=0.1
By googling around, I know the answer can be discovered via "1-sum(dbinom(0:4, 300, 0.01".
My question is why is it only covering 0:4 and not 0:5 if 5 skittles were observed?
sum(dbinom(0:4,300,0.01))? Why is that subtracted from $1$? How does that compare to the (more perspicuous) calculationpbinom(5-1, 300, 0.01, lower.tail=FALSE)or evensum(dbinom(5:300, 300, 0.01))? If you're unsure, consult the help page for these functions with?dbinom. If these hints are just completely puzzling, then please check out our thread at https://stats.stackexchange.com/questions/31. – whuber Dec 13 '18 at 20:46Ris decidedly inconsistent in its functional interface. You cannot rely on the behavior of one function to indicate how a similar one will act. It pays, therefore, to focus on the underlying concepts rather than memorizing what the software does. – whuber Dec 13 '18 at 21:04So why is it summing 0:4 and not 0:5 ? Is there a simple answer?
– RichardMillington Dec 14 '18 at 14:48