# Binomial CDF - Wikipedia vs Reality

The Binomial distribution article on Wikipedia defines the binomial CDF as $$F_{Bin(n,p)}(k) = I_{1-p}(n-k, k+1)$$, where $$I$$ is the regularized incomplete beta function.

There is a proof for the equality on Mathematics Stackexchange, but I stumbled into a little problem. When $$n=k$$ we get that $$F_{Bin(n,p)}(n) = I_{1-p}(0, n+1)$$, but $$I$$ is not defined for $$0$$.

I am sure I don't understand this correctly, but I can't understand where I'm wrong.

Edit: My friends and I thought about this definition: $$F_{Bin(n,p)}(k)=lim_{m \rightarrow k} I_{1−p}(n−m,m+1)$$. I think it works, but did not find any citation to support it.

## migrated from mathoverflow.netDec 24 '18 at 17:05

This question came from our site for professional mathematicians.

• I don't think you're wrong, but of course $F_{Bin(n,p)}(n) = 1$, so you can just consider the cases $k \neq n$ and $k = n$ separately and apply the SE proof just to the case $k \neq n$. – Todd Trimble Dec 24 '18 at 14:16
• This solution still creates a problem with the definition as $I_p(a,b)=\frac{B(p;a,b)}{B(a,b)}$ which means your solution chances the Beta function definition. My friends and I thought about this definition $F_{Bin(n,p)}(k)=lim_{m \rightarrow k} I_{1−p}(n−m,m+1)$. Does it works? – Yuval Lewi Dec 24 '18 at 16:41
• One can derive, ab initio, a better expression for the Binomial CDF in terms of the incomplete Beta function: see stats.stackexchange.com/questions/4659/…. – whuber Dec 24 '18 at 18:03
• Doesn't stats.stackexchange.com/questions/4659/… lead to the same solution as before? Meaning $I_{1-p}(n-k,k+1)$? In eather case it makes the Wikipedia citetion undefined in case of $n=k$. – Yuval Lewi Dec 25 '18 at 3:56

Whuber's link explains (ab initio) the Relationship between Binomial and Beta distributions

The binomial distribution, which can be seen as a sum of $$n$$ Bernoulli experiments $$y_i$$, is equivalent to picking $$n$$ variables $$x_i$$ from a uniform distribution and assigning $$y_i = 1$$ if $$x_i \leq p$$ and $$y_i = 0$$ if $$x_i > p$$.

Then the probability that the sum of Bernouilli experiments $$z=\sum y_i$$ is equal or above some number $$k$$ relates to the probability that the $$k$$-th order variable in the uniform variables is less than $$p$$ (because $$Z \geq k$$ if and only if $$X_{(k)} \leq p$$).

Thus:

$$P(Z \geq k) \equiv P(X_{(k)} \leq p)$$

where $$X_{(k)} \sim \text{Beta}(k,n+1-k)$$

and

$$P(X_{(k)}\leq p) =I_{p}(k,n+1-k) = \frac{\int_0^p x^{k-1} (1-x)^{n-k} dx}{ \int_0^1 x^{k-1} (1-x)^{n-k}dx}$$

So it is easy to express with an intuitive analogy.

But, when $$k = 0$$ (which relates to your expression $$k=n$$) then you are looking for $$P(X_{(0)}\leq p)$$, this has no meaning although you could assign a value 1 to it if you like.

For this case the analogy and how you build up the expression for the CDF makes no sense. So, indeed, the expression from Wikipedia, with the Beta distribution, does not work (because the analogy of drawing from uniform distribution is limited to ordered variables $$1$$ to $$n$$, which excludes a zero).

If you use

$$P(Z \leq k-1) \equiv 1- P(Z \geq k)$$

then it doesn't make sense to use $$k=0$$ anyway. Although you get back the problem at the other end that you will be looking for $$k=n+1$$ and the meaningless $$P(Z \geq n+1)$$ and $$P(X_{(n+1)} \leq p)$$ (if you like you could say those probabilities are 0, although the expression with the beta function breaks down).