Calculate the p value for a two sided exact binomial test Ca
Calculate the p value for a two sided exact binomial test. Calculate the p value of the two sided exact binomial test, using the distance approach and then again with the probability approach.
a) po= .3 n=10 x=1
b) po= .3 n=25 x=3
c) po= .7 n=20 x=11
Solution
1.
a) po= 0.3 n=10 x=1
q=0.7
P(x=r) = nCr * p^r * q^(n-r)
P(x=1) = 10C1 * 0.3^1 * 0.7^9
P(x=1)= 0.1210
b) po= 0.3 n=25 x=3
q = 0.7
P(x=3) = 25C3 * 0.3^3 * 0.7^22
P(x=3) = 0.0243
c) po= .7 n=20 x=11
P(x=11)= 20C11 * 0.7^11 * 0.3^9
P(x=11) = 0.0653
