Lably
Skip to content

Binomial distribution

Probability distribution

  • 15 min read
  • 6 chapters
  • 1 lab on Lably

Learn it on Lably

The binomial distribution is frequently used to model the number of successes in a sample of size n drawn with replacement from a population of size N. If the sampling is carried out without replacement, the draws are not independent and so the resulting distribution is a hypergeometric distribution, not a binomial one. However, for N much larger than n, the binomial distribution remains a good approximation, and is widely used.

Definitions

Probability mass function

If the random variable X follows the binomial distribution with parameters n∈N (a natural number) and p ∈ [0, 1], we write X ~ B(n, p). The probability of getting exactly k successes in n independent Bernoulli trials (with the same rate p) is given by the probability mass function: f(k,n,p)=Pr(X=k)=(nk)pk(1−p)n−k for k = 0, 1, 2, ..., n, where (nk)=n!k!(n−k)! is the binomial coefficient. The formula can be understood as follows: pk qn−k is the probability of obtaining the sequence of n independent Bernoulli trials in which k trials are "successes" and the remaining n − k trials are "failures". Since the trials are independent with probabilities remaining constant between them, any sequence of n trials with k successes (and n − k failures) has the same probability of being achieved (regardless of positions of successes within the sequence). There are (nk) such sequences, since the binomial coefficient (nk) counts the number of ways to choose the positions of the k successes among the n trials. The binomial distribution is concerned with the probability of obtaining any of these sequences, meaning the probability of obtaining one of them (pk qn−k) must be added (nk) times, hence ⁠Pr(X=k)=(nk)pk(1−p)n−k⁠.

In creating reference tables for binomial distribution probability, usually, the table is filled in up to ⁠n2⁠ values. This is because for ⁠k>n2⁠, the probability can be calculated by its complement as f(k,n,p)=f(n−k,n,1−p).

Looking at the expression f(k, n, p) as a function of k, there is a k value that maximizes it. This k value can be found by calculating f(k+1,n,p)f(k,n,p)=(n−k)p(k+1)(1−p) and comparing it to 1. There is always an integer M that satisfies (n+1)p−1≤M<(n+1)p.

f(k, n, p) is monotone increasing for k < M and monotone decreasing for k > M, with the exception of the case where (n + 1)p is an integer. In this case, there are two values for which f is maximal: (n + 1)p and (n + 1)p − 1. M is the most probable outcome (that is, the most likely, although this can still be unlikely overall) of the Bernoulli trials and is called the mode.

Example

Suppose a biased coin comes up heads with probability 0.3 when tossed. The probability of seeing exactly 4 heads in 6 tosses is f(4,6,0.3)=(64)0.34(1−0.3)6−4=0.059535.

Cumulative distribution function

The cumulative distribution function can be expressed as: F(k;n,p)=Pr(X≤k)=∑i=0⌊k⌋(ni)pi(1−p)n−i, where ⌊k⌋ is the "floor" under k; that is, the greatest integer less than or equal to k.

It can also be represented in terms of the regularized incomplete beta function, as follows: F(k;n,p)=Pr(X≤k)=I1−p(n−k,k+1)=(n−k)(nk)∫01−ptn−k−1(1−t)kdt, which is equivalent to the cumulative distribution functions of the beta distribution and of the F-distribution: F(k;n,p)=Fbeta-distribution(x=1−p;α=n−k,β=k+1) F(k;n,p)=FF-distribution(x=1−ppk+1n−k;d1=2(n−k),d2=2(k+1)).

Some closed-form bounds for the cumulative distribution function are given below.

Sign in to keep reading

5 more chapters are free with a Lably account.

More in Statistics and probability