# Formula for cumulative binomial probability

Is there a simple formula for finding a value of a cumulative binomial probability, eg. like the ones put in cumulative binomial probability tables? eg. X~B(50, 0.234) Find the cumulative binomial probability for 32, with one equation.

• Only if a summation is "one equation". In your example it is $\sum_{k=0}^{32} {50 \choose k} 0.234^k (0.766)^{50-k}$.
– Ian
Apr 1, 2016 at 11:43
• I do not know what you exactly mean, but the CDF can be written in terms of the incomplete beta function (as can be the inverse cumulative distribution function), see en.wikipedia.org/wiki/… Apr 1, 2016 at 11:46
• If it really comes to "finding" these values, then I think the answer to your question is negative. That's why these tables exist. Apr 1, 2016 at 12:36

I don't know of any shortcut formula for computation. The PDF for $Binom(n, p)$ is $f_X(k) = P(X = j) = {n \choose j}p^j(1-p)^{n-j},$ for $j = 0, 1, \dots, n.$ Then the CDF is $$F_X(k) = P(X \le k) = \sum_{j = 0}^k{n \choose j}p^j(1-p)^{n-j},$$ for $k = 0, 1, \dots, n.$ Also, the CDF can be suitably extended for arguments on the real line.

Printed tables usually show CDF values for ease of use. For example, if $n = 20$ and we want $Q = P(5 \le X \le 15),$ then it is easer to evaluate $Q = 0.9882$ as a difference of two CDF values $F_X(15) - F_X(5)$ than as a sum of eleven PDF values $f_X(5) + f_X(6) + \cdots + f_X(15).$

Most sofware packages have functions for both PDF and CDF. For example, in R, these are dbinom and pbinom, respectively.

 n = 20;  p = 1/2
pbinom(15, n, p) - pbinom(4, n, p)
## 0.988182
diff(pbinom(c(4, 15), n, p))
## 0.988182
sum(dbinom(5:15, n, p))
## 0.988182


Printed tables are seen less frequently nowadays because software and calculators are more flexible to use. Here are four-place PDF and CDF tables for $Binom(n=10, p=.52),$ which you are unlikely to find in printed form.

 n=10;  p=.52;  j = 0:10
pdf = dbinom(j, n, p);  cdf = pbinom(j, n, p)
round(cbind(j, pdf, cdf), 4)
j    pdf    cdf
## [1,]  0 0.0006 0.0006
## [2,]  1 0.0070 0.0077
## [3,]  2 0.0343 0.0420
## [4,]  3 0.0991 0.1410
## [5,]  4 0.1878 0.3288
## [6,]  5 0.2441 0.5730
## [7,]  6 0.2204 0.7933
## [8,]  7 0.1364 0.9298
## [9,]  8 0.0554 0.9852
##[10,]  9 0.0133 0.9986
##[11,] 10 0.0014 1.0000


The specific probability you mentioned is very nearly $1$:

n = 50;  p = .234;  pbinom(32, n, p)
## 1

n = 50;  p = .234;  j = 0:50;  pdf  = dbinom(j, n, p)
plot(j, pdf, type="h", lwd=2, main="PDF of BINOM(50, .234)")
abline(h=0, col="green2")


Note: Following the Comment by @gammatester, for given $n$ and $p$, the CDF $F_X(k) = P(X \le k)$ can be written, in terms of an incomplete beta function, as an integral (transcribing from Wikipedia):

$$P(X \le k) = I_{1-p}(n-k,k+1) = (n-k){n \choose k}\int_0^{1-p}t^{n-k-1}(1-t)^k\,dt.$$

However, I have not seen this used in basic probability courses for numerical computation. I have not tried it recently, but I seem to recall that, upon evaluating the integral and simplifying, one is back to my displayed equation near the start of this Answer.

• Thanks for that, your answer has really cleared things up. I would have hoped that there was some sort of formula other than the sum formula, but thanks for all your work! Apr 2, 2016 at 14:39