1

I had a questions about 2-sided p-values in a binomial distribution:

Given the symmetric shape of a binomial dist. when $p = 0.5$, why the below observations (i.e., 2 and 13) which have exact opposite positions in such a binomial dist. don't have the same probability. In R, this inequality is shown as follows:

pbinom( 2, 15, prob = .5) # 0.00369

pbinom(13, 15, prob = .5, lower.tail = F) # 0.000488
rnorouzian
  • 3,986

1 Answers1

0

For the first question, this is an off-by-one error. From the documentation:

lower.tail
logical; if TRUE (default), probabilities are P[X ≤ x], otherwise, P[X > x].

so:

pbinom( 2, 15, prob = .5) # 0.00369 =P[X ≤ 2]

pbinom(13, 15, prob = .5, lower.tail = F) # 0.000488 = P[X > 13]

combo
  • 1,257
  • Thanks, you mean in reality P[X >= 13] is equal to P[X <= 2] ? Is this off-by-one error only true in the case binomial dist. or for all symmetric dist. in R? What are your thoughts regarding the second question? – rnorouzian Jun 10 '17 at 14:34
  • 1
    Indeed p(x>=13)=p(x>12) is p(x<=2). The off by one error is not due to the symmetry but because the bionomial distribution is a discrete distribution rather than continuous. Therefore p(x<=2) = p(x=2)+p(x=1)+p(x=0) but p(x>13)= p(x=14)+p(x=15). These differences between strict and weak inequality don't occur for continuous distributions where including or excluding the boundary makes only a nominal difference. – Maarten Punt Jun 10 '17 at 15:29