I get the same p-value for a one-tailed and two-tailed exact binomial test for some combinations of x, n, and p. Does anyone know why this happens? What formula does R use to calculate the p-value for two-tailed binomial tests?
>binom.test(x=2,n=9,p=.1, alternative="greater")
Exact binomial test
data: 2 and 9
number of successes = 2, number of trials = 9, p-value = 0.2252
alternative hypothesis: true probability of success is greater than 0.1
95 percent confidence interval:
0.04102317 1.00000000
sample estimates:
probability of success
0.2222222
> binom.test(x=2,n=9,p=.1, alternative="two.sided")
Exact binomial test
data: 2 and 9
number of successes = 2, number of trials = 9, p-value = 0.2252
alternative hypothesis: true probability of success is not equal to 0.1
95 percent confidence interval:
0.02814497 0.60009357
sample estimates:
probability of success
0.2222222