Porisma

Complete reference

The binomial distribution

Use this page when you want the full derivations, source detail, and method notes. The main lesson keeps the shorter study path.

Lesson notes

Three throws: where the binomial formula comes from

The notes introduce binomial distributions as models for real-world counts, then give their mean and variance without proof later in the chapter. Start with X, the number of sixes in three independent throws of an unbiased die. A throw is grouped into “six” (success, probability 1/6) or “not six” (failure, probability 5/6), even though the physical die has six faces.

Every source probability is retained:

P(X=0)=(5/6)(5/6)(5/6)=(30)(1/6)0(5/6)3.P(X=0)=(5/6)(5/6)(5/6)=\binom30(1/6)^0(5/6)^3. P(X=1)=(1/6)(5/6)(5/6)3!2!=(31)(1/6)1(5/6)2.P(X=1)=(1/6)(5/6)(5/6)\frac{3!}{2!}=\binom31(1/6)^1(5/6)^2. P(X=2)=(1/6)(1/6)(5/6)3!2!=(32)(1/6)2(5/6)1.P(X=2)=(1/6)(1/6)(5/6)\frac{3!}{2!}=\binom32(1/6)^2(5/6)^1. P(X=3)=(1/6)(1/6)(1/6)=(33)(1/6)3(5/6)0.P(X=3)=(1/6)(1/6)(1/6)=\binom33(1/6)^3(5/6)^0.

The factor 3!/2!3!/2! counts the three positions of the unique success or unique failure. In general P(X=x)=(3x)(1/6)x(5/6)3−xP(X=x)=\binom3x(1/6)^x(5/6)^{3-x} for x=0,1,2,3x=0,1,2,3. These are the four terms in

(1/6+5/6)3=(30)(1/6)0(5/6)3+(31)(1/6)1(5/6)2+(32)(1/6)2(5/6)1+(33)(1/6)3(5/6)0.(1/6+5/6)^3=\binom30(1/6)^0(5/6)^3+\binom31(1/6)^1(5/6)^2+\binom32(1/6)^2(5/6)^1+\binom33(1/6)^3(5/6)^0.

Their sum is 1. The three die icons on the source page illustrate the three throws; the count X concerns successes, not the sum of their face scores.

Definition, full probability law and counting proof

Let X count the number of successes out of n independent trials, with the same success probability p on each trial. Write X∼B(n,p)X\sim B(n,p), read “X follows a binomial distribution with parameters n and p”. Here n is the fixed number of trials, p the success probability, and 1−p the failure probability.

P(X=x)=(nx)px(1−p)n−x,x=0,1,2,…,n.P(X=x)=\binom nx p^x(1-p)^{n-x},\qquad x=0,1,2,\ldots,n.

The coefficient (nr)=nCr=n!/[r!(n−r)!]\binom nr={}^nC_r=n!/[r!(n-r)!] is given in MF27. The source calls the formula a probability distribution function; for this discrete variable it is specifically a probability mass function.

For the source’s self-reading proof, let Si,FiS_i,F_i denote success and failure on trial i. Fix the order with successes on trials 1 through x and failures on trials x+1 through n. There are n!/[x!(n−x)!]n!/[x!(n-x)!] orders of the x success labels and n−x failure labels. Thus

P(X=x)=P(S1∩⋯∩Sx∩Fx+1∩⋯∩Fn)n!x!(n−x)!=n!x!(n−x)!px(1−p)n−x=nCxpx(1−p)n−x=(nx)px(1−p)n−x.\begin{aligned} P(X=x)&=P(S_1\cap\cdots\cap S_x\cap F_{x+1}\cap\cdots\cap F_n)\frac{n!}{x!(n-x)!}\\ &=\frac{n!}{x!(n-x)!}p^x(1-p)^{n-x}\\ &={}^nC_xp^x(1-p)^{n-x}\\ &=\binom nx p^x(1-p)^{n-x}. \end{aligned}

The printed first line labels the failures F1,…,Fn−xF_1,\ldots,F_{n-x} while also calling S1,…,SxS_1,\ldots,S_x successes on those indexed trials. The intended fixed-order event uses disjoint trial indices, as written above. At the endpoints x=0 or x=n, the success or failure group is empty. The original printed proof is retained unchanged in the source transcription.

The complete symbolic source distribution, transposed for readability, is:

xProbability
0(n0)p0(1−p)n−0\binom n0p^0(1-p)^{n-0}
1(n1)p1(1−p)n−1\binom n1p^1(1-p)^{n-1}
2(n2)p2(1−p)n−2\binom n2p^2(1-p)^{n-2}
⋯\cdots⋯\cdots
n(nn)pn(1−p)n−n\binom nnp^n(1-p)^{n-n}

The name comes from the n+1 terms of the binomial expansion:

[p+(1−p)]n=(n0)p0(1−p)n−0+(n1)p1(1−p)n−1+⋯+(nn−1)pn−1(1−p)1+(nn)pn(1−p)0=1.[p+(1-p)]^n=\binom n0p^0(1-p)^{n-0}+\binom n1p^1(1-p)^{n-1}+\cdots+\binom n{n-1}p^{n-1}(1-p)^1+\binom nnp^n(1-p)^0=1.

This also verifies that the probabilities sum to one. For p=0 or p=1 use the degenerate law directly: X is always 0 or always n, respectively.

Check all four model conditions

  • Fixed number of trials: n is set before the count is observed. Merely saying the experiment ends after a finite time does not make n fixed.
  • Two mutually exclusive and exhaustive categories: each trial is classified as success or failure. “Success” names the event being counted; it need not mean a desirable result.
  • Same success probability: p is the same for every trial in the independent model.
  • Independent trials: previous outcomes do not alter the conditional probabilities of later success/failure events. The full model uses joint independence across all trials.

Example 1 compares four experiments using every condition before choosing a distribution.

Cumulative probabilities and integer inequalities

For the calculator workflow in Example 2, binompdf(n,p,x) gives P(X=x)P(X=x) and binomcdf(n,p,x) gives P(X≤x)P(X\le x). Both full input sequences and relevant calculator screens are retained beside the example.

The source gives these three conversions for an integer threshold k:

Required eventCalculate
P(X<k)P(X<k)P(X≤k−1)P(X\le k-1)
P(X>k)P(X>k)1−P(X≤k)1-P(X\le k)
P(X≥k)P(X\ge k)1−P(X≤k−1)1-P(X\le k-1)

For a non-integer bound, first identify the permitted integer values, as in Self-Practice 1(v). For an interval, subtract the cumulative probability immediately below its first included integer from the cumulative probability at its last included integer.

The notes use strict endpoints for the word “between” in Example 2; use the stated inequalities to remove ambiguity in other questions. One may instead define success as being right-handed: R=12−X∼B(12,0.85)R=12-X\sim B(12,0.85) in that example, giving the same event probabilities after transforming each bound. Changing what counts as success changes p and the event, not the underlying selection.

For nested binomial counts, Example 3 first calculates the probability that one box qualifies, then uses that unrounded probability in a count of qualifying boxes. Its source remark recommends at least five significant figures in intermediate values for a three-significant-figure final answer.

Mean, variance, standard deviation and the mode

For X∼B(n,p)X\sim B(n,p), the source gives E(X)=μ=npE(X)=\mu=np and Var⁡(X)=σ2=np(1−p)\operatorname{Var}(X)=\sigma^2=np(1-p) in MF27, without proof. Standard deviation is σ=Var⁡(X)=np(1−p)\sigma=\sqrt{\operatorname{Var}(X)}=\sqrt{np(1-p)}. The radicals are essential; text extraction can omit them. Example 9 uses these moments before selecting integer counts within an open interval.

From a data histogram, a mode has greatest frequency. For a probability distribution, its mode or modes are the count values with greatest probability.

The source method is to evaluate P(X=x)P(X=x) over all possible count values and identify the maximum; a calculator table is a way to inspect them.

Example 10 shows a single maximum and an exact two-value tie, including the source warning about floating-point table output.

Example 11 distinguishes a unique mode from a tied mode and corrects a tiny positive mass labelled zero in the printed sketch.

For unknowns, choose the search variable carefully: Example 5 varies integer sample size n, Example 6 varies integer threshold r, while Examples 7 and 8 solve an equation for a probability p between 0 and 1.

A decimal calculator table can bracket p; intersection/zero solving refines the continuous root.

The source’s statement that a table is “not possible” for non-integer p is too categorical; the integer-step search used for n is what must change.