I try to understand the difference of +/-1 in the result of two functions using the binomial distribution.
I need to know the critical value of a situation where I have n=9 tests, the probability of success of each one is prob = 1/10 and the type I error is 0.05.
With sensR::findcr(sample.size=9, alpha=0.05, p0=1/10, test="difference"), the result is 4.
And with qbinom(size = 9, p=0.95, prob = 1/10), the result is 3.
I tried with other sample sizes and success probabilities, out of curiosity, and this +/-1 difference is still there.
I read this conversation and saw the same difference of 1 (the line is "we see that the critical value is c=40" but it refers to qbinom(.95, 64, .5) which gives 39).
I feel stupid because there is clearly something obvious that I do not understand, could someone enlighten me, please?
sensR::findcr. I suspect it's just a difference in convention, concerning whether an inequality or a strict inequality is used in defining the critical value. – whuber Sep 26 '22 at 16:20