6
$\begingroup$

25 patients receive treatment, and they each get a difference score (After-Before). 18 of them get positive scores. I would like to test the null hypothesis that p=0.5.

I know that 1-pbinom(17,25,0.5) gives me the probability of 18 or more patients getting a positive score. My question is, to calculate the p-value, why do we have to do

2*(1-pbinom(17,25,0.5))

That is, why do we multiply by 2 here?

$\endgroup$
8
$\begingroup$

If you do not multiply by 2, you will be evaluating the probability of having scores ranging from 18 to 25 (one-sided test).

Multiplying by 2, you are evaluating the probability of having scores ranging from 0 to 7 and 18 to 25 (two-sided test). Your command results in an answer similar to this one:

binom.test(18, 25, 0.5, alternative="two.sided") 
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.