Discrete Random Variables and Their Distributions

Random variables as functions on Omega, discrete type, pmf, support, and the cdf as a step function; pmfs of dice sums, maxima and distinct faces, truncated geometric, coupon-collector tails and the r e^(-n/r) bound; expectation, frequency and center-of-gravity readings, indicators, the bus and friendship paradoxes (size-biased sampling), LOTUS and its proof, linearity of expectation, the newsvendor stocking rule and expected utility; variance, standard deviation, standardization, Var(aX+b) = a^2 Var(X), Var = E[X^2] - (E[X])^2 and E[X^2] >= (E[X])^2; the Bernoulli trial family (Bernoulli, binomial, geometric, negative binomial) with applications from screws and juries to voter power and the Banach matchbox problem; reliability applications (union bound, s-t network outage, flow-network capacity, an 8x8 parity array code, backup reliability); and discrete failure rate (hazard) functions; the Poisson distribution as a binomial limit, the Poisson paradigm (birthday pairs and triples, longest runs), Poisson processes and Erlang arrival times; the hypergeometric distribution (capture–recapture, acceptance sampling, finite-population correction) and the zeta distribution; and expectation as a sum over outcomes. Hajek's time-scaled Bernoulli process is still pending.

· 58 min read · 11,484 words

Motivation: from outcomes to numbers

A limitation of the event-level view of probability-foundations motivates this chapter: we usually care about a number, not the outcome. Rolling two dice, we care that the sum is 7, not which of (1,6),(2,5),…(1,6),(2,5),\dots occurred. Flipping coins, we care how many heads, not the exact sequence. A random variable packages an experiment’s outcome into a number, and its probability mass function packages the outcome’s probability.

IntuitionThe central questions

How do we summarize an experiment by a numerical quantity and its distribution, what are the summary statistics (mean, variance) of that distribution, and — for the workhorse model of repeated independent trials — what are the resulting named distributions of counts and waiting times, and how do they show up in reliability engineering?

ToolPackagesSummary statistics / rules
random variable + pmfoutcome → number; probability → pmfmean, variance
Bernoulli trial familycounts and waits in independent trialsBernoulli, binomial, geometric, negative binomial
reliabilityindependent component/link failuresunion bound, network outage, hazard functions

NoteConditioning and independence live in a companion note

Conditional probability, independence of events, independent random variables, the law of total probability, and Bayes’ formula are covered in conditional-probability-and-independence — split out from this note because they apply to events in general, not just to the distributions covered here.


Random variables and probability mass functions

DefinitionRandom variable (Hajek Def. 2.1.1)

A random variable is a real-valued function X:Ω→RX : \Omega\to\mathbb R. When the experiment selects ω\omega, the realized value is X(ω)X(\omega). For A⊆RA\subseteq\mathbb R, {X∈A}={ω:X(ω)∈A}\{X\in A\} = \{\omega : X(\omega)\in A\} is an event, and we write P{X∈A}P\{X\in A\}.

IntuitionAn event is a binary random variable

An event either occurs or it doesn’t, which is a 0/1 quantity. A random variable generalizes this to many values. The indicator of AA is IA(ω)=1I_A(\omega) = 1 if ω∈A\omega\in A and 00 otherwise.

DefinitionDiscrete type, pmf, support

XX is discrete-type if there is a finite or countably infinite set {u1,u2,… }\{u_1,u_2,\dots\} with P{X∈{u1,u2,… }}=1P\{X\in\{u_1,u_2,\dots\}\} = 1. Its probability mass function is pX(u)=P{X=u},∑ipX(ui)=1.(2.1)p_X(u) = P\{X = u\},\qquad \sum_ip_X(u_i) = 1. \tag{2.1} The support is {u:pX(u)>0}\{u : p_X(u) > 0\}. The pmf determines every event about XX: P{X∈A}=∑i: ui∈ApX(ui)P\{X\in A\} = \sum_{i:\,u_i\in A}p_X(u_i).

ComponentDetail
SignaturepX:R→[0,1]p_X : \mathbb R\to[0,1]
Domaina candidate value uu of XX
Codomainthe probability that XX takes exactly that value
Not an inputthe outcome ω\omega; the pmf forgets which outcomes produced uu

DefinitionCumulative distribution function (Ross)

F(x)=P{X≤x}=∑u≤xp(u),−∞<x<∞.F(x) = P\{X\le x\} = \sum_{u\le x}p(u),\qquad -\infty < x < \infty. FF is nondecreasing: if a≤ba\le b, then {X≤a}⊂{X≤b}\{X\le a\}\subset\{X\le b\}. For discrete XX, FF is a step function that jumps by p(xi)p(x_i) at each xix_i and is constant in between.

ExampleA pmf and its cdf

p(1)=14p(1) = \frac14, p(2)=12p(2) = \frac12, p(3)=p(4)=18p(3) = p(4) = \frac18 gives

F(a)={0a<1141≤a<2342≤a<3783≤a<41a≥4.F(a) = \begin{cases}0 & a < 1\\ \frac14 & 1\le a < 2\\ \frac34 & 2\le a < 3\\ \frac78 & 3\le a < 4\\ 1 & a\ge 4.\end{cases}

The step at each value equals its probability mass.

The running example: dice

Random variable (two fair dice, 36 equally likely outcomes)pmf
one die XXpX(i)=16p_X(i) = \frac16, i=1..6i = 1..6
sum SSpS(k)=6−∣k−7∣36p_S(k) = \frac{6 - \lvert k-7\rvert}{36}, k=2..12k = 2..12 (peak 16\frac16 at 7)
maximum Y=max⁡{i,j}Y = \max\{i,j\}pY(k)=2k−136p_Y(k) = \frac{2k-1}{36}: 136,336,…,1136\frac1{36},\frac3{36},\dots,\frac{11}{36}
product X1X2X_1X_2read off the 6×66\times6 multiplication table
DerivationWhere the closed forms come from

Sum. The outcomes with i+j=ki + j = k lie on an anti-diagonal of the 6×66\times6 grid. Its length is k−1k - 1 for k≤7k\le7 and 13−k13 - k for k≥7k\ge7, i.e. 6−∣k−7∣6 - |k-7|.

Maximum. {Y≤k}\{Y\le k\} is a k×kk\times k square, so P{Y=k}=k2−(k−1)236=2k−136P\{Y = k\} = \frac{k^2 - (k-1)^2}{36} = \frac{2k-1}{36}.

(The chapter shows these as figures. The closed forms are mine.)

ExampleMore pmfs from counting (Ross)
  • Heads in 3 fair coins: 18,38,38,18\frac18,\frac38,\frac38,\frac18 for 0,1,2,30,1,2,3.
  • Two insured clients dying independently with probabilities .05 and .10 (payout units of $100k): P{X=0}=.95⋅.9=.855P\{X = 0\} = .95\cdot.9 = .855, P{X=1}=.05⋅.9+.95⋅.1=.140P\{X = 1\} = .05\cdot.9 + .95\cdot.1 = .140, P{X=2}=.005P\{X = 2\} = .005.
  • Largest of 4 balls drawn from 1..20: P{X=i}=(i−13)/(204)P\{X = i\} = \binom{i-1}3/\binom{20}4 for i=4..20i = 4..20. More directly, P{X>10}=1−(104)/(204)=1−2104845≈0.957P\{X > 10\} = 1 - \binom{10}4/\binom{20}4 = 1 - \frac{210}{4845}\approx 0.957.
  • Flip until a head or nn flips: P{X=i}=(1−p)i−1pP\{X = i\} = (1-p)^{i-1}p for i<ni < n, and P{X=n}=(1−p)n−1P\{X = n\} = (1-p)^{n-1}. The masses sum to 1 via the geometric series.
  • Normalizing a pmf: p(i)=cλi/i!p(i) = c\lambda^i/i! forces c=e−λc = e^{-\lambda} (the Poisson form). Then P{X>2}=1−e−λ(1+λ+λ2/2)P\{X > 2\} = 1 - e^{-\lambda}(1 + \lambda + \lambda^2/2).
ExampleCoupon collecting (Ross)

There are rr equally likely coupon types. Let TT be the number of draws until every type has appeared. With AjA_j = “type jj missing from the first nn draws”, P(Aj1⋯Ajk)=(r−kr)nP(A_{j_1}\cdots A_{j_k}) = \big(\frac{r-k}r\big)^n, so by inclusion–exclusion

P{T>n}=∑i=1r−1(ri)(r−ir)n(−1)i+1,P{T=n}=P{T>n−1}−P{T>n}.(1.1)P\{T > n\} = \sum_{i=1}^{r-1}\binom ri\Big(\frac{r-i}r\Big)^n(-1)^{i+1}, \qquad P\{T = n\} = P\{T > n-1\} - P\{T > n\}. \tag{1.1}

Boole bound: P{T>n}≤r(1−1r)n≤re−n/rP\{T > n\}\le r(1 - \frac1r)^n\le re^{-n/r}, using e−x≥1−xe^{-x}\ge1 - x.

Distinct types among nn draws, DnD_n: choose which kk types appear ((rk)\binom rk), require all nn draws to land in them ((k/r)n(k/r)^n), and require all kk to be represented (use (1.1) with kk types):

P{Dn=k}=(rk)(kr)n[1−∑i=1k−1(ki)(k−ik)n(−1)i+1].P\{D_n = k\} = \binom rk\Big(\frac kr\Big)^n\Big[1 - \sum_{i=1}^{k-1} \binom ki\Big(\frac{k-i}k\Big)^n(-1)^{i+1}\Big].

The mean and variance of a random variable

Expectation

DefinitionMean (expectation, first moment)

E[X]=∑iui pX(ui).E[X] = \sum_iu_i\,p_X(u_i). This is a weighted average of the possible values, weighted by their probabilities.

IntuitionTwo readings

  • Frequency: over many independent plays, a value xix_i occurs a fraction p(xi)p(x_i) of the time, so the average winnings per game converge to ∑xip(xi)\sum x_ip(x_i).
  • Mechanics: put mass p(xi)p(x_i) at position xix_i on a weightless rod. E[X]E[X] is the balance point, because ∑i(xi−E[X])p(xi)=0\sum_i(x_i - E[X])p(x_i) = 0 means the torques cancel.

ExampleFirst computations

  • Fair die: E[X]=1+⋯+66=72E[X] = \frac{1+\cdots+6}6 = \frac72.
  • Indicator of AA: E[IA]=1⋅P(A)+0⋅P(Ac)=P(A)E[I_A] = 1\cdot P(A) + 0\cdot P(A^c) = P(A). The expectation of an indicator is a probability. This is a workhorse identity.
  • Distinct numbers YY on three dice (Hajek): ∣{Y=1}∣=6|\{Y = 1\}| = 6, ∣{Y=2}∣=6⋅5⋅3=90|\{Y = 2\}| = 6\cdot5\cdot3 = 90, ∣{Y=3}∣=6⋅5⋅4=120|\{Y = 3\}| = 6\cdot5\cdot4 = 120. These sum to 216, as a check. So E[Y]=1⋅136+2⋅1536+3⋅2036=9136≈2.53.E[Y] = 1\cdot\tfrac1{36} + 2\cdot\tfrac{15}{36} + 3\cdot\tfrac{20}{36} = \tfrac{91}{36}\approx2.53.

WarningThe mean is not the average of the possible values

E[Y]≠1+2+33E[Y]\ne\frac{1+2+3}3 for the three-dice example, because the values are not equally likely.

ExampleThe bus paradox — size-biased sampling (Ross)

120 students ride buses of 36, 40 and 44 students. Pick a student at random and let XX be the size of their bus:

E[X]=36⋅36120+40⋅40120+44⋅44120≈40.27>40=average bus size.E[X] = 36\cdot\tfrac{36}{120} + 40\cdot\tfrac{40}{120} + 44\cdot \tfrac{44}{120}\approx40.27 > 40 = \text{average bus size}.

Bigger buses contain more students, so a random student is more likely to be on one.

ExampleWhich question first? (Ross)

Answering question ii correctly pays ViV_i and happens with probability PiP_i (independently). You may attempt the second question only if the first is right. Starting with question 1 is better iff V1P11−P1≥V2P21−P2.\frac{V_1P_1}{1-P_1}\ge\frac{V_2P_2}{1-P_2}. With (V1,P1)=(200,.6)(V_1,P_1) = (200, .6) and (V2,P2)=(100,.8)(V_2,P_2) = (100, .8): 300<400300 < 400, so start with the cheaper, surer question.

DerivationThe comparison

Question 1 first earns V1P1(1−P2)+(V1+V2)P1P2V_1P_1(1-P_2) + (V_1+V_2)P_1P_2. Question 2 first earns V2P2(1−P1)+(V1+V2)P1P2V_2P_2(1-P_1) + (V_1+V_2)P_1P_2. The shared term cancels, leaving V1P1(1−P2)V_1P_1(1-P_2) vs V2P2(1−P1)V_2P_2(1-P_1). Divide by (1−P1)(1−P2)(1-P_1)(1-P_2).

The law of the unconscious statistician

The problem. To find E[g(X)]E[g(X)] by definition, you’d first compute the pmf of Y=g(X)Y = g(X) by merging values of XX that map to the same yy. That is tedious.

TheoremLOTUS (Hajek eq. 2.2; Ross Prop. 4.1)

E[g(X)]=∑ig(ui) pX(ui).E[g(X)] = \sum_ig(u_i)\,p_X(u_i). Similarly E[g(X,Y)]=∑i,jg(ui,vj)P{X=ui,Y=vj}E[g(X,Y)] = \sum_{i,j}g(u_i,v_j)P\{X = u_i, Y = v_j\}.

ProofGroup terms with equal gg-values

Let y1,y2,…y_1, y_2, \dots be the distinct values of g(xi)g(x_i). Then

∑ig(xi)p(xi)=∑j∑i: g(xi)=yjyjp(xi)=∑jyj P{g(X)=yj}=E[g(X)].\sum_ig(x_i)p(x_i) = \sum_j\sum_{i:\,g(x_i) = y_j}y_jp(x_i) = \sum_jy_j\,P\{g(X) = y_j\} = E[g(X)].

The key step: summing over xx and then grouping by yy is exactly how one would have built the pmf of g(X)g(X). LOTUS just skips writing that pmf down.

∎

ExampleLOTUS in action

  • XX uniform on {−2,…,5}\{-2,\dots,5\}, Y=X2Y = X^2 (Hajek): via the pmf of YY, or directly, E[Y]=18∑u=−25u2=608=7.5E[Y] = \frac18\sum_{u=-2}^5u^2 = \frac{60}8 = 7.5.
  • Product of two dice: E[X1X2]=136∑i,jij=136(∑ii)2=(72)2=494E[X_1X_2] = \frac1{36}\sum_{i,j}ij = \frac1{36}\big(\sum_ii\big)^2 = \big(\frac72\big)^2 = \frac{49}4.
  • E[X2]E[X^2] vs (E[X])2(E[X])^2 (Ross): with P{X=−1}=.2P\{X = -1\} = .2, P{X=0}=.5P\{X = 0\} = .5, P{X=1}=.3P\{X = 1\} = .3, E[X2]=.5E[X^2] = .5 but (E[X])2=.01(E[X])^2 = .01.

WarningE[g(X)]≠g(E[X])E[g(X)]\ne g(E[X]) in general

Squaring after averaging is not averaging after squaring. The product example E[X1X2]=E[X1]E[X2]E[X_1X_2] = E[X_1]E[X_2] works only because the dice are independent (conditional-probability-and-independence).

TheoremLinearity of expectation

E[ag(X)+bh(X)+c]=aE[g(X)]+bE[h(X)]+c,(2.3)E[ag(X) + bh(X) + c] = aE[g(X)] + bE[h(X)] + c, \tag{2.3} and for random variables on a common space, E[ag(X,Y)+bh(X,Y)+c]=aE[g(X,Y)]+bE[h(X,Y)]+cE[ag(X,Y) + bh(X,Y) + c] = aE[g(X,Y)] + bE[h(X,Y)] + c. In particular:

  • E[aX+b]=aE[X]+bE[aX + b] = aE[X] + b;
  • E[X+Y]=E[X]+E[Y]E[X + Y] = E[X] + E[Y], with no independence needed.
ProofLinearity is linearity of a weighted sum

By LOTUS, ∑i(ag(ui)+bh(ui)+c)p(ui)\sum_i(ag(u_i) + bh(u_i) + c)p(u_i) splits into three sums, and ∑ip(ui)=1\sum_ip(u_i) = 1 handles the constant. For example, E[X2+3X]=E[X2]+3E[X]E[X^2 + 3X] = E[X^2] + 3E[X].

∎

TheoremExpectation as a sum over outcomes (Ross Prop. 9.1)

If Ω\Omega is finite or countable, with p(ω)=P{ω}p(\omega) = P\{\omega\}, E[X]=∑ω∈ΩX(ω) p(ω).E[X] = \sum_{\omega\in\Omega}X(\omega)\,p(\omega).

ProofGroup outcomes by the value of XX

Let Si={ω:X(ω)=xi}S_i = \{\omega : X(\omega) = x_i\}. Then

∑ixiP{X=xi}=∑ixi∑ω∈Sip(ω)=∑i∑ω∈SiX(ω)p(ω)=∑ωX(ω)p(ω),\sum_ix_iP\{X = x_i\} = \sum_ix_i\sum_{\omega\in S_i}p(\omega) = \sum_i \sum_{\omega\in S_i}X(\omega)p(\omega) = \sum_\omega X(\omega)p(\omega),

since the SiS_i partition Ω\Omega.

∎

CorollaryExpectation of a sum (Ross Cor. 9.2)

E[∑i=1nXi]=∑i=1nE[Xi]E\big[\sum_{i=1}^nX_i\big] = \sum_{i=1}^nE[X_i], because ∑ω(∑iXi(ω))p(ω)\sum_\omega\big(\sum_iX_i(\omega)\big)p(\omega) splits into nn sums. Ross notes that the result holds without the countability assumption too.

ExampleLinearity without independence (Ross)

  • Two flips with heads probability pp: by the pmf, E[X]=0⋅q2+1⋅2pq+2p2=2pE[X] = 0\cdot q^2 + 1\cdot2pq + 2p^2 = 2p. By outcomes, 2p2+pq+qp=2p2p^2 + pq + qp = 2p.
  • Sum of nn dice: E=3.5nE = 3.5n.
  • Successes in dependent trials: if trial ii succeeds with probability pip_i, the expected number of successes is ∑ipi\sum_ip_i, whatever the dependence. For example, it gives the hypergeometric mean (Sampling without replacement: the hypergeometric distribution).
ExampleNewsvendor: how much to stock (Ross)

Each unit sold earns bb, and each unsold unit loses ℓ\ell. Demand XX has pmf pp. Stocking ss gives

E[P(s)]=sb+(b+ℓ)∑i=0s(i−s)p(i),E[P(s+1)]−E[P(s)]=b−(b+ℓ)∑i=0sp(i).E[P(s)] = sb + (b+\ell)\sum_{i=0}^s(i - s)p(i),\qquad E[P(s+1)] - E[P(s)] = b - (b+\ell)\sum_{i=0}^sp(i).

The increment is positive iff ∑i≤sp(i)<bb+ℓ\sum_{i\le s}p(i) < \frac b{b+\ell}. The left side increases in ss, so if s∗s^* is the largest such ss, the expected profit rises up to s∗+1s^*+1 and falls afterwards. Stock s∗+1s^* + 1. In words: stock until the demand cdf first reaches the critical ratio b/(b+ℓ)b/(b+\ell).

ExampleExpected utility (Ross)

To compare actions over consequences C1..CnC_1..C_n: give the worst consequence value 0 and the best value 1. Give each other CiC_i the probability u(Ci)u(C_i) at which you’d be indifferent between CiC_i for sure and a lottery “best with probability uu, worst otherwise.” An action yielding CiC_i with probability pip_i is then equivalent to getting the best consequence with probability ∑ipiu(Ci)\sum_ip_iu(C_i). So choose the action with the largest expected utility.

Variance

ExampleSame mean, very different risk (Hajek)

X=100X = 100 surely, versus Y=100,000Y = 100{,}000 with probability 11000\frac1{1000} and 0 otherwise. Both have mean 100. Would you be equally happy with either? The mean alone can’t tell them apart.

DefinitionVariance and standard deviation

With μX=E[X]\mu_X = E[X],

Var(X)=E[(X−μX)2],σX=Var(X).(2.4)\mathrm{Var}(X) = E[(X - \mu_X)^2],\qquad \sigma_X = \sqrt{ \mathrm{Var}(X)}. \tag{2.4}

X−μXX - \mu_X is the deviation, the error in predicting XX by its mean. It has mean zero. σX\sigma_X has the same units as XX, and the variance has squared units.

NoteWhy the square?

E[∣X−μ∣]E[|X - \mu|] and E[(X−μ)4]E[(X - \mu)^4] also measure spread. The square wins because it is mathematically convenient: expansions, the scaling rule and additivity for independent sums all work cleanly. In mechanics it is the moment of inertia, just as the mean is the center of gravity.

TheoremShift and scale

Var(X+b)=Var(X),Var(aX)=a2Var(X),Var(aX+b)=a2Var(X).\mathrm{Var}(X + b) = \mathrm{Var}(X),\qquad \mathrm{Var}(aX) = a^2\mathrm{Var}(X),\qquad \mathrm{Var}(aX + b) = a^2\mathrm{Var}(X).
ProofFrom linearity

X+b−E[X+b]=X−E[X]X + b - E[X+b] = X - E[X], so shifting leaves the deviation unchanged. aX−E[aX]=a(X−E[X])aX - E[aX] = a(X - E[X]), so the squared deviation scales by a2a^2.

∎

DefinitionStandardized random variable

X−μXσX\dfrac{X - \mu_X}{\sigma_X} has mean 0 and variance 1, and is dimensionless.

FormulaComputational formula

Var(X)=E[X2]−μX2.(2.5)\mathrm{Var}(X) = E[X^2] - \mu_X^2. \tag{2.5} Variance is the second moment minus the square of the first. (The ii-th moment is E[Xi]E[X^i].)

DerivationExpand and use linearity

E[X2−2μX+μ2]=E[X2]−2μE[X]+μ2=E[X2]−μ2E[X^2 - 2\mu X + \mu^2] = E[X^2] - 2\mu E[X] + \mu^2 = E[X^2] - \mu^2. Use (2.4) for meaning and scaling, and (2.5) for computation.

ExampleVariances

  • Fair die: E[X2]=916E[X^2] = \frac{91}6, so Var(X)=916−494=3512\mathrm{Var}(X) = \frac{91}6 - \frac{49}4 = \frac{35}{12}.
  • The payments above: Var(X)=0\mathrm{Var}(X) = 0. For YY, E[Y2]=1010/103=107E[Y^2] = 10^{10}/10^3 = 10^7, so Var(Y)=107−104≈107\mathrm{Var}(Y) = 10^7 - 10^4\approx10^7 and σY≈3160\sigma_Y\approx3160. (This computation is mine.)
  • W≡0W\equiv0, Y=±1Y = \pm1 and Z=±100Z = \pm100, each sign with probability 12\frac12, all have mean 0. Their variances are 0, 1 and 10410^4.

CorollaryE[X2]≥(E[X])2E[X^2]\ge(E[X])^2

Variance is a sum of nonnegative terms, so Var(X)≥0\mathrm{Var}(X)\ge0. Equality holds iff XX is constant.

ExampleThe friendship paradox (Ross)

In a friendship graph on nn people, person ii has f(i)f(i) friends, and f=∑if(i)f = \sum_if(i).

  • A random person XX (uniform) has on average E[f(X)]=f/nE[f(X)] = f/n friends.
  • A random friend YY: everyone writes each friend’s name on a separate sheet, and we draw a sheet. Then P(Y=i)=f(i)/fP(Y = i) = f(i)/f and E[f(Y)]=∑if(i)2f=E[f(X)2]E[f(X)]≥E[f(X)].E[f(Y)] = \frac{\sum_if(i)^2}f = \frac{E[f(X)^2]}{E[f(X)]}\ge E[f(X)].

On average, your friends have at least as many friends as you do. Equality holds only if everyone has the same number of friends.

IntuitionSize bias again

YY is chosen with probability proportional to popularity, exactly as a random student lands on a big bus. Any average taken over a reweighted population is biased toward whatever drove the weights. (This matters for network sampling; compare cascading-behavior-in-networks.)

ExampleShared birthdays make more sharing likely (Ross)

Birthdays fall on day rr with probability prp_r. Let Ai,jA_{i,j} = ”ii and jj share a birthday.” Then P(A1,3)=∑rpr2P(A_{1,3}) = \sum_rp_r^2 and P(A1,3∣A1,2)=∑rpr3/∑rpr2P(A_{1,3}\mid A_{1,2}) = \sum_rp_r^3/\sum_rp_r^2. So P(A1,3∣A1,2)≥P(A1,3)P(A_{1,3}\mid A_{1,2})\ge P(A_{1,3}) iff ∑pr3≥(∑pr2)2\sum p_r^3\ge(\sum p_r^2)^2. This is E[X2]≥(E[X])2E[X^2]\ge(E[X])^2 for X=prX = p_r with probability prp_r. Intuition: knowing 1 and 2 match makes it likelier that their shared day is a popular one.


The Bernoulli trial family

The workhorse model of discrete probability is a sequence of independent trials, each a success with probability pp. Coin flips, defective screws, voters, detected bits and working links are all instances. Different questions about the same sequence produce different named distributions.

Question about the trialsDistributionMeanVariance
did trial 1 succeed?Bernoulli(p)(p)ppp(1−p)p(1-p)
how many successes in nn trials?binomial(n,p)(n,p)npnpnp(1−p)np(1-p)
how many trials until the first success?geometric(p)(p)1/p1/p(1−p)/p2(1-p)/p^2
how many trials until the rr-th success?negative binomial(r,p)(r,p)r/pr/pr(1−p)/p2r(1-p)/p^2

Reliability reuses the same model with the labels swapped. Each component fails independently with a small probability. The system’s structure (series, parallel, bridge, parity checks, backups) decides which combinations of failures matter.


Bernoulli distribution

DefinitionBernoulli(p)(p)

XX is Bernoulli with parameter p∈[0,1]p\in[0,1] if P{X=1}=p,P{X=0}=1−p.(6.1)P\{X = 1\} = p,\qquad P\{X = 0\} = 1 - p. \tag{6.1} It is the indicator of a single “success.” Named after Jacques (James, Jakob) Bernoulli.

FormulaMean and variance

E[X]=p,Var(X)=p(1−p).E[X] = p,\qquad \mathrm{Var}(X) = p(1-p).

DerivationX2=XX^2 = X

A 0/1 variable equals its square, so E[X2]=E[X]=pE[X^2] = E[X] = p. Then Var(X)=p−p2\mathrm{Var}(X) = p - p^2.

RemarkMaximum uncertainty at a fair coin

p(1−p)p(1-p) is symmetric about 12\tfrac12, where it reaches its maximum 14\tfrac14. The bound p(1−p)≤14p(1-p)\le\tfrac14 is what makes polling error bars computable without knowing pp.


Binomial distribution

DefinitionBinomial(n,p)(n,p)

XX is the number of successes in nn independent Bernoulli(p)(p) trials: pX(k)=(nk)pk(1−p)n−k,k=0,1,…,n.(6.2)p_X(k) = \binom nkp^k(1-p)^{n-k},\qquad k = 0,1,\dots,n. \tag{6.2} Bernoulli(p)(p) is binomial(1,p)(1,p).

DerivationWhy the pmf has this form, and why it sums to one

Each arrangement: a particular sequence with kk successes, such as 11010101 with n=8n = 8, k=5k = 5, has probability pk(1−p)n−kp^k(1-p)^{n-k} by independence.

How many arrangements: choose which kk of the nn trials succeed, which gives (nk)\binom nk disjoint sequences. For example, n=4n = 4, k=2k = 2 has 6: ssff, sfsf, sffs, fssf, fsfs, ffss.

Normalization: by the binomial theorem, ∑k(nk)pk(1−p)n−k=(p+(1−p))n=1\sum_k\binom nkp^k(1-p)^{n-k} = (p + (1-p))^n = 1. Hajek substitutes x=p/(1−p)x = p/(1-p) into the Maclaurin series of (1+x)n(1+x)^n to get the same result.

Mean and variance

TheoremMoments of the binomial

E[X]=np,Var(X)=np(1−p).E[X] = np,\qquad \mathrm{Var}(X) = np(1-p).

ProofThree derivations

1. Indicators and linearity (Ross §4.9). Write X=∑i=1nXiX = \sum_{i=1}^nX_i with XiX_i the indicator that trial ii succeeds. Then E[X]=∑iE[Xi]=npE[X] = \sum_iE[X_i] = np. This needs no independence. For the variance, expand E[X2]=∑iE[Xi2]+∑i≠jE[XiXj]E[X^2] = \sum_iE[X_i^2] + \sum_{i\ne j}E[X_iX_j] with E[Xi2]=piE[X_i^2] = p_i and E[XiXj]=pi,j=P(trials i,j both succeed)E[X_iX_j] = p_{i,j} = P(\text{trials }i,j\text{ both succeed}):

Var(X)=∑ipi+∑i∑j≠ipi,j−(∑ipi)2.(9.1)\mathrm{Var}(X) = \sum_ip_i + \sum_i\sum_{j\ne i}p_{i,j} - \Big(\sum_ip_i \Big)^2. \tag{9.1}

Independent trials with pi=pp_i = p have pi,j=p2p_{i,j} = p^2, which gives np+n(n−1)p2−n2p2=np(1−p)np + n(n-1)p^2 - n^2p^2 = np(1-p).

2. Moment recursion (Ross). Using i(ni)=n(n−1i−1)i\binom ni = n\binom{n-1}{i-1} and shifting the index,

E[Xk]=np E[(Y+1)k−1],Y∼binomial(n−1,p).E[X^k] = np\,E\big[(Y + 1)^{k-1}\big],\qquad Y\sim\text{binomial}(n-1, p).

k=1k = 1 gives npnp. k=2k = 2 gives np[(n−1)p+1]np[(n-1)p + 1], so Var(X)=np[(n−1)p+1]−(np)2=np(1−p)\mathrm{Var}(X) = np[(n-1)p + 1] - (np)^2 = np(1-p).

3. Directly (Hajek, eq. 2.7): the same index shift inside ∑kk(nk)pk(1−p)n−k\sum_kk\binom nkp^k(1-p)^{n-k}.

∎

ImportantFormula (9.1) is more general than the binomial

(9.1) holds for any sum of indicators, dependent or not. Only the pairwise probabilities pi,jp_{i,j} are needed. For example, sampling without replacement has pi=m/Np_i = m/N and pi,j=mNm−1N−1p_{i,j} = \frac mN\frac{m-1}{N-1}.

Shape: mode, median, recursion

PropositionUnimodality (Ross Prop. 6.1)

For 0<p<10 < p < 1, p(k)p(k) increases up to k∗=⌊(n+1)p⌋k^* = \lfloor(n+1)p\rfloor and decreases afterwards. If (n+1)p(n+1)p is an integer, p(k∗−1)=p(k∗)p(k^*-1) = p(k^*) tie.

ProofRatio of consecutive terms

p(k)p(k−1)=(n−k+1)pk(1−p)≥1  ⟺  k≤(n+1)p.\frac{p(k)}{p(k-1)} = \frac{(n-k+1)p}{k(1-p)}\ge1\iff k\le(n+1)p.

∎

ExampleWhere the peak is

n=24n = 24, p=1/3p = 1/3: (n+1)p=8.33(n+1)p = 8.33, so the mode is k∗=8k^* = 8, close to np=8np = 8. n=10n = 10, p=12p = \tfrac12: the mode is 5.

NoteThe median is also near the mean

Every median mm satisfies ∣m−np∣≤max⁡{p,1−p}|m - np|\le\max\{p,1-p\} (Kaas–Buhrman, cited without proof).

FormulaRecursion for computing the pmf and cdf

P{X=k+1}=p1−p⋅n−kk+1 P{X=k}.(6.3)P\{X = k+1\} = \frac p{1-p}\cdot\frac{n-k}{k+1}\,P\{X = k\}. \tag{6.3} Start from P{X=0}=(1−p)nP\{X = 0\} = (1-p)^n and accumulate to get P{X≤i}P\{X\le i\}. For example, n=6n = 6, p=.4p = .4:

kk0123456
P{X=k}P\{X = k\}.0467.1866.3110.2765.1382.0369.0041

ExampleStandardizing a binomial (Hajek)

Binomial(4,12)(4,\tfrac12) has mean 2 and variance 1. So the standardized version is simply X−2X - 2, a shift with no rescaling. A fair die needs both a shift (3.5) and a rescale (σ≈1.708\sigma\approx1.708).

Applications

ExampleCounting successes (Ross)

  • Five fair coins: P{X=k}=(5k)/32P\{X = k\} = \binom5k/32, i.e. 132,532,1032,1032,532,132\frac1{32},\frac5{32},\frac{10}{32},\frac{10}{32},\frac5{32}, \frac1{32}.
  • Money-back screws: each screw is defective with probability .01, and a pack of 10 is replaced if more than one is defective: 1−.9910−10(.01)(.99)9≈.0041 - .99^{10} - 10(.01)(.99)^9\approx.004.
  • Mendel: two hybrid parents have a child showing the dominant trait with probability 34\tfrac34. So P(3 of 4)=(43)(34)314=2764P(3\text{ of }4) = \binom43(\tfrac34)^3\tfrac14 = \tfrac{27}{64}.

ExampleChuck-a-luck is unfair (Ross)

Bet on a number, roll three dice, win ii units if it appears ii times and lose 1 otherwise. The count is binomial(3,16)(3,\tfrac16):

E[winnings]=−125+1⋅75+2⋅15+3⋅1216=−17216≈−0.079.E[\text{winnings}] = \frac{-125 + 1\cdot75 + 2\cdot15 + 3\cdot1}{216} = -\frac{17}{216}\approx-0.079.

ExampleA jury needs a model of guilt (Ross)

8 of 12 votes convict, and each juror is independently right with probability θ\theta. An innocent defendant is correctly acquitted iff at least 5 jurors vote correctly. A guilty one is correctly convicted iff at least 8 do. With prior guilt probability α\alpha:

P(correct)=α∑i=812(12i)θi(1−θ)12−i+(1−α)∑i=512(12i)θi(1−θ)12−i.P(\text{correct}) = \alpha\sum_{i=8}^{12}\binom{12}i\theta^i(1-\theta)^{ 12-i} + (1-\alpha)\sum_{i=5}^{12}\binom{12}i\theta^i(1-\theta)^{12-i}.

This is the law of total probability over the hidden truth.

ExampleMore components help only if each is better than a coin (Ross)

A system works if at least half its components work (independently, each with probability pp). A (2k+1)(2k+1)-component system beats a (2k−1)(2k-1)-component one iff p>12p > \tfrac12. For k=2k = 2 the condition is 3(p−1)2(2p−1)>03(p-1)^2(2p-1) > 0.

ProofCondition on the first 2k−12k-1 components

Let XX count working components among the first 2k−12k-1. The larger system works if X≥k+1X\ge k+1; if X=kX = k and at least one of the 2 extras works; or if X=k−1X = k-1 and both extras work. The smaller system works iff X≥kX\ge k. So

P2k+1−P2k−1=P{X=k−1}p2−P{X=k}(1−p)2=(2k−1k)pk(1−p)k(2p−1),P_{2k+1} - P_{2k-1} = P\{X = k-1\}p^2 - P\{X = k\}(1-p)^2 = \binom{2k-1}kp^k(1-p)^k(2p - 1),

using (2k−1k−1)=(2k−1k)\binom{2k-1}{k-1} = \binom{2k-1}k.

∎

ExampleVoters in big states have more power (Ross)

A voter in a state of n=2k+1n = 2k+1 voters is decisive iff the other 2k2k split evenly. In a close election each votes independently 50/50, and by Stirling (2kk)2−2k∼1πk.\binom{2k}k2^{-2k}\sim\frac1{\sqrt{\pi k}}. The state carries about ncnc electoral votes, so

average power≈nc2πn=c2nπ  ∝  n.\text{average power}\approx nc\sqrt{\frac2{\pi n}} = c\sqrt{\frac{2n}\pi} \;\propto\;\sqrt n.

IntuitionWhy n\sqrt n

The chance of being pivotal shrinks like 1/n1/\sqrt n (a binomial’s spread is n\sqrt n), but the prize grows like nn. The prize wins.

ExampleLength of a best-of-seven series (Hajek)

Games are independent and AA wins each with probability pp. The series ends at game nn with AA winning iff AA wins 3 of the first n−1n-1 and then game nn:

pY(n)=(n−13)[p4(1−p)n−4+(1−p)4pn−4],4≤n≤7.p_Y(n) = \binom{n-1}3\big[p^4(1-p)^{n-4} + (1-p)^4p^{n-4}\big],\qquad 4\le n\le7.

With p=12p = \tfrac12: (pY(4),…,pY(7))=(18,14,516,516)(p_Y(4),\dots,p_Y(7)) = (\tfrac18,\tfrac14, \tfrac5{16},\tfrac5{16}).


Geometric distribution

DefinitionGeometric(p)(p)

LL is the number of trials up to and including the first success, with 0<p≤10 < p\le1: pL(k)=(1−p)k−1p,k≥1.(8.1)p_L(k) = (1-p)^{k-1}p,\qquad k\ge1. \tag{8.1}

ComponentDetail
Support{1,2,3,… }\{1,2,3,\dots\}: the count includes the success itself
TailP{L>k}=(1−p)kP\{L > k\} = (1-p)^k (2.8): the first kk trials all fail
Normalizationgeometric series; a success occurs with probability 1

WarningTwo conventions

Some texts count failures before the first success (support {0,1,… }\{0,1,\dots\}, mean (1−p)/p(1-p)/p). Both sources here count trials.

ExampleDrawing with replacement until black (Ross)

MM black and NN white balls, so p=MM+Np = \frac M{M+N}:

P{X=n}=MNn−1(M+N)n,P{X≥k}=(NM+N)k−1.P\{X = n\} = \frac{MN^{n-1}}{(M+N)^n},\qquad P\{X\ge k\} = \Big(\frac N {M+N}\Big)^{k-1}.

TheoremMean and variance

E[L]=1p,E[L2]=2−pp2,Var(L)=1−pp2,σL=1−pp.E[L] = \frac1p,\qquad E[L^2] = \frac{2-p}{p^2},\qquad \mathrm{Var}(L) = \frac{1-p}{p^2},\qquad \sigma_L = \frac{\sqrt{1-p}}p.
ProofFirst-step analysis (Hajek)

Condition on trial 1. With probability pp, L=1L = 1. Otherwise L=1+L~L = 1 + \tilde L, where L~\tilde L (the remaining wait) has the same distribution as LL, because the trials start afresh. Conditional expectations obey total probability, E[X]=∑jE[X∣Ej]P(Ej)E[X] = \sum_jE[X\mid E_j]P(E_j), so E[L]=p⋅1+(1−p)(1+E[L])  ⇒  E[L]=1p.E[L] = p\cdot1 + (1-p)(1 + E[L])\;\Rightarrow\;E[L] = \frac1p.

Second moment. E[L2]=p+(1−p)E[(1+L)2]=p+(1−p)(1+2E[L]+E[L2])E[L^2] = p + (1-p)E[(1+L)^2] = p + (1-p)(1 + 2E[L] + E[L^2]). Solving gives E[L2]=(2−p)/p2E[L^2] = (2-p)/p^2, and subtracting 1/p21/p^2 gives the variance.

Ross gets the same result by splitting i=(i−1)+1i = (i-1) + 1 inside the sums. That’s the same argument written algebraically. His form E[X2]=(q+1)/p2E[X^2] = (q+1)/p^2 agrees because q+1=2−pq + 1 = 2 - p.

∎

ImportantRare successes: mean and spread are both large

If pp is small, E[L]=1/pE[L] = 1/p is huge and σL\sigma_L is nearly as big, smaller only by the factor 1−p\sqrt{1-p}. For p=.01p = .01, the mean is 100 and σ≈99.5\sigma\approx99.5. Waits for rare events are both long and very unpredictable.

ExampleCoupon collector’s mean (Hajek)

Roll a die until all six faces appear. Split the total RR into R1+⋯+R6R_1 + \cdots + R_6, where RiR_i is the wait for the ii-th new face. Each RiR_i is geometric with p=6−i+16p = \frac{6-i+1}6. By linearity, E[R]=6(1+12+⋯+16)=14.7.E[R] = 6\Big(1 + \tfrac12 + \cdots + \tfrac16\Big) = 14.7. With nn types, E=nHn≈nln⁡nE = nH_n\approx n\ln n. (Compare the tail bound P{T>n}≤re−n/rP\{T > n\}\le re^{-n/r} in Random variables and probability mass functions above.)

Memorylessness

TheoremMemoryless property (discrete time)

For integers n,k≥0n, k\ge0: P(L>k+n∣L>n)=P{L>k}.P(L > k + n\mid L > n) = P\{L > k\}.

ProofRatio of tails

{L>k+n}⊆{L>n}\{L > k+n\}\subseteq\{L > n\}, so the conditional probability is (1−p)k+n(1−p)n=(1−p)k.\frac{(1-p)^{k+n}}{(1-p)^n} = (1-p)^k.

∎

IntuitionWaiting doesn’t make it more likely soon

An observer who has already waited nn steps faces exactly the same future wait as one just starting. Past failures carry no information because the trials are independent. This is the discrete version of “constant failure rate” (Failure rate functions).


Bernoulli process and the negative binomial distribution

DefinitionBernoulli process

An infinite sequence X1,X2,…X_1, X_2, \dots of independent Bernoulli(p)(p) random variables. For each outcome ω\omega, the function k↦Xk(ω)k\mapsto X_k(\omega) is the sample path. For example, P{X5=1,X6=1,X7=0,X12=1}=p3(1−p)P\{X_5 = 1, X_6 = 1, X_7 = 0, X_{12} = 1\} = p^3(1-p).

TheoremFour equivalent descriptions

Each of these determines the others:

DescriptionDefinitionDistribution
trials (Xk)(X_k)outcome of trial kki.i.d. Bernoulli(p)(p)
gaps (Lj)(L_j)extra trials from the (j−1)(j-1)-th to the jj-th successi.i.d. geometric(p)(p)
counting sequence (Ck)(C_k)Ck=X1+⋯+XkC_k = X_1 + \cdots + X_k, C0=0C_0 = 0Cl−Ck∼C_l - C_k\sim binomial(l−k,p)(l-k,p), with independent increments over disjoint intervals
arrival times (Sr)(S_r)Sr=L1+⋯+LrS_r = L_1 + \cdots + L_r, S0=0S_0 = 0negative binomial(r,p)(r,p)

The conversions are Xk=Ck−Ck−1X_k = C_k - C_{k-1} and Lj=Sj−Sj−1L_j = S_j - S_{j-1}.

graph LR
  X["Trials X1 X2 X3 ... i.i.d. Bernoulli"] -->|"partial sums"| C["Counts C_k binomial"]
  X -->|"gaps between ones"| L["Gaps L_j i.i.d. geometric"]
  L -->|"partial sums"| S["Arrival times S_r negative binomial"]
  C -->|"first time count reaches r"| S

IntuitionCounting vs waiting

“At least rr successes in nn trials” and “the rr-th success arrives by trial nn” are the same event: {Cn≥r}={Sr≤n}.\{C_n\ge r\} = \{S_r\le n\}. So every binomial statement has a negative binomial twin.

Negative binomial distribution

DefinitionNegative binomial(r,p)(r,p)

SrS_r, the trial on which the rr-th success occurs, has pmf P{Sr=n}=(n−1r−1)pr(1−p)n−r,n≥r.(8.2)P\{S_r = n\} = \binom{n-1}{r-1}p^r(1-p)^{n-r},\qquad n\ge r. \tag{8.2} r=1r = 1 gives the geometric distribution.

DerivationThe pmf and the name

pmf: Sr=nS_r = n iff the first n−1n-1 trials contain exactly r−1r-1 successes (probability (n−1r−1)pr−1(1−p)n−r\binom{n-1}{r-1}p^{r-1}(1-p)^{n-r}) and trial nn succeeds (pp). The two conditions concern disjoint trials, so they are independent.

Normalization: use the negative binomial series (1−x)−r=∑k≥0(k+r−1r−1)xk(1-x)^{-r} = \sum_{k\ge0}\binom{k+r-1}{r-1}x^k with x=1−px = 1-p, k=n−rk = n-r: ∑n≥r(n−1r−1)pr(1−p)n−r=pr⋅p−r=1.\sum_{n\ge r}\binom{n-1}{r-1}p^r(1-p)^{n-r} = p^r\cdot p^{-r} = 1. This parallels the binomial pmf’s use of (1+x)n(1+x)^n, hence the name.

Probabilistic check (Ross): Sr=L1+⋯+LrS_r = L_1 + \cdots + L_r is a sum of finite geometric waits, so it is finite with probability 1.

TheoremMean and variance

E[Sr]=rp,Var(Sr)=r(1−p)p2.E[S_r] = \frac rp,\qquad \mathrm{Var}(S_r) = \frac{r(1-p)}{p^2}.

ProofSum of geometrics, or moment recursion

Mean: linearity over L1..LrL_1..L_r, each with mean 1/p1/p.

Variance (Hajek): Var(Sr)=r Var(L1)\mathrm{Var}(S_r) = r\,\mathrm{Var}(L_1), because variances of independent summands add. That result is proved later (Hajek Ex. 4.8.1).

Moment recursion (Ross): using n(n−1r−1)=r(nr)n\binom{n-1}{r-1} = r\binom nr, E[Srk]=rpE[(Y−1)k−1],Y∼NB(r+1,p).E[S_r^k] = \frac rpE\big[(Y - 1)^{k-1}\big],\qquad Y\sim\text{NB}(r+1,p). k=1k = 1 gives r/pr/p. k=2k = 2 gives rp(r+1p−1)\frac rp\big(\frac{r+1}p - 1\big), and subtracting (r/p)2(r/p)^2 gives r(1−p)/p2r(1-p)/p^2.

∎

ExampleFour ones on a die (Ross)

r=4r = 4, p=16p = \tfrac16: E=24E = 24 rolls, Var=4⋅5/61/36=120\mathrm{Var} = \frac{4\cdot5/6} {1/36} = 120.

ExampleProblem of the points, a third way (Ross)

rr successes come before ss failures iff the rr-th success arrives by trial r+s−1r + s - 1: P=∑n=rr+s−1(n−1r−1)pr(1−p)n−r.P = \sum_{n=r}^{r+s-1}\binom{n-1}{r-1}p^r(1-p)^{n-r}. Compare the Pascal (recursion) and Fermat (binomial) solutions in conditional-probability-and-independence.

ExampleBanach’s matchboxes (Ross)

Two boxes of NN matches, each use equally likely from either box. When the smoker first finds a box empty, the other holds kk matches with probability

2(2N−kN)(12)2N−k+1=(2N−kN)(12)2N−k,k=0..N.2\binom{2N-k}N\Big(\frac12\Big)^{2N-k+1} = \binom{2N-k}N\Big(\frac12\Big)^{ 2N-k},\qquad k = 0..N.

Why: “the right box is found empty with kk left in the left box” means the (N+1)(N+1)-th choice of the right box happens on trial 2N−k+12N - k + 1. That is a negative binomial with r=N+1r = N+1, p=12p = \tfrac12. Double it for the symmetric case.

ExampleWaiting for successes or failures (Ross)

Let XX be the wait for rr successes and YY the wait for ss failures. YY is NB(s,1−p)(s, 1-p). For the first of the two, V=min⁡(X,Y)V = \min(X,Y) satisfies V<r+sV < r+s, and at time nn only one of the two can have just completed:

P(V=n)=(n−1r−1)pr(1−p)n−r+(n−1s−1)(1−p)spn−s,n<r+s.P(V = n) = \binom{n-1}{r-1}p^r(1-p)^{n-r} + \binom{n-1}{s-1}(1-p)^sp^{n-s}, \qquad n < r+s.

For the last of the two, Z=max⁡(X,Y)≥r+sZ = \max(X,Y)\ge r+s, and the same two-term formula holds for n≥r+sn\ge r+s, because the other event must already have happened.


Sampling without replacement: the hypergeometric distribution

DefinitionHypergeometric(n,N,m)(n, N, m)

Draw nn balls without replacement from an urn of NN, of which mm are white. The number XX of white balls drawn has

P{X=i}=(mi)(N−mn−i)(Nn),i=0,1,…,n.(8.4)P\{X = i\} = \frac{\binom mi\binom{N-m}{n-i}}{\binom Nn},\qquad i = 0,1,\dots,n. \tag{8.4}

The pmf is 0 unless n−(N−m)≤i≤min⁡(n,m)n - (N - m)\le i\le\min(n,m), which the convention (rk)=0\binom rk = 0 for k<0k < 0 or k>rk > r handles automatically.

TheoremMean and variance

With p=m/Np = m/N:

E[X]=np,Var(X)=np(1−p)(1−n−1N−1)=N−nN−1 np(1−p).E[X] = np,\qquad \mathrm{Var}(X) = np(1-p)\Big(1 - \frac{n-1}{N-1}\Big) = \frac{N-n}{N-1}\,np(1-p).
ProofIndicators with dependent trials (Ross Ex. 9d–9e)

Let XiX_i indicate that the ii-th ball drawn is white. Each ball drawn is equally likely to be any of the NN, so pi=m/N=pp_i = m/N = p, and E[X]=npE[X] = np by linearity, although the draws are dependent. For i≠ji\ne j, pi,j=P(Xi=1)P(Xj=1∣Xi=1)=mN⋅m−1N−1.p_{i,j} = P(X_i = 1)P(X_j = 1\mid X_i = 1) = \frac mN\cdot\frac{m-1}{N-1}. Formula (9.1) (Binomial distribution) gives Var(X)=np+n(n−1)mNm−1N−1−(np)2\mathrm{Var}(X) = np + n(n-1)\frac mN\frac{m-1}{N-1} - (np)^2. Substitute m−1N−1=p−1−pN−1\frac{m-1}{N-1} = p - \frac{1-p}{N-1} and simplify.

Ross also derives both moments from E[Xk]=nmNE[(Y+1)k−1]E[X^k] = \frac{nm}NE[(Y+1)^{k-1}], where YY is hypergeometric (n−1,N−1,m−1)(n-1, N-1, m-1).

∎

IntuitionThe finite-population correction

The mean is exactly the with-replacement (binomial) mean. The variance is smaller by the factor N−nN−1\frac{N-n}{N-1}: drawing without replacement exhausts the urn and removes some randomness. Sampling the whole urn (n=Nn = N) leaves no randomness at all.

TheoremBinomial approximation

If mm and NN are large compared with nn and ii, then P{X=i}≈(ni)pi(1−p)n−i,p=mN.P\{X = i\}\approx\binom nip^i(1-p)^{n-i},\qquad p = \frac mN.

ProofEach draw barely changes the urn

Writing out the factorials,

P{X=i}=(ni)mNm−1N−1⋯m−i+1N−i+1⋅N−mN−i⋯N−m−(n−i−1)N−i−(n−i−1).P\{X = i\} = \binom ni\frac mN\frac{m-1}{N-1}\cdots\frac{m-i+1}{N-i+1}\cdot \frac{N-m}{N-i}\cdots\frac{N-m-(n-i-1)}{N-i-(n-i-1)}.

When m,N≫nm, N\gg n, each of the ii “white” factors is about pp and each of the n−in - i “black” factors is about 1−p1-p.

∎

ExampleCapture–recapture: estimating a population (Ross)

Catch, mark and release mm animals. Later catch nn, of which ii are marked. With NN animals in total, the likelihood of seeing ii marked is Pi(N)=(mi)(N−mn−i)/(Nn)P_i(N) = \binom mi\binom{N-m}{n-i}/\binom Nn. Then

Pi(N)Pi(N−1)=(N−m)(N−n)N(N−m−n+i)≥1  ⟺  N≤mni,\frac{P_i(N)}{P_i(N-1)} = \frac{(N-m)(N-n)}{N(N-m-n+i)}\ge1\iff N\le \frac{mn}i,

so the maximum likelihood estimate is N^=⌊mn/i⌋\hat N = \lfloor mn/i\rfloor. For m=50m = 50, n=40n = 40, i=4i = 4: N^=500\hat N = 500. This matches the proportion argument m/N≈i/nm/N\approx i/n. (See estimation-and-hypothesis-testing.)

ExampleAcceptance sampling (Ross)

Lots of 10 are accepted only if 3 randomly inspected items are all good. 30% of lots have 4 defectives and 70% have 1. By total probability,

P(accept)=(63)(103)(.3)+(93)(103)(.7)=20120(.3)+84120(.7)=.54,P(\text{accept}) = \frac{\binom63}{\binom{10}3}(.3) + \frac{\binom93} {\binom{10}3}(.7) = \frac{20}{120}(.3) + \frac{84}{120}(.7) = .54,

so 46% of lots are rejected.


The zeta (Zipf) distribution

DefinitionZeta distribution with parameter α>0\alpha > 0

P{X=k}=Ckα+1,k=1,2,…,C=[∑k≥1(1k)α+1]−1.P\{X = k\} = \frac C{k^{\alpha+1}},\qquad k = 1,2,\dots,\qquad C = \Big[\sum_{k\ge1}\Big(\frac1k\Big)^{\alpha+1}\Big]^{-1}.

The name comes from the Riemann zeta function ζ(s)=1+2−s+3−s+⋯\zeta(s) = 1 + 2^{-s} + 3^{-s} + \cdots, so C=1/ζ(α+1)C = 1/\zeta(\alpha+1).

RemarkA discrete power law

Pareto used it for the distribution of family incomes, and Zipf applied it to many other areas. The probabilities decay like a power of kk, not geometrically, so very large values are far likelier than under a geometric or Poisson model. The continuous counterpart is the Pareto distribution (continuous-random-variables-and-distributions).


Union bound

TheoremUnion bound

P(A∪B)≤P(A)+P(B),P(A1∪⋯∪Am)≤∑i=1mP(Ai).(2.18)P(A\cup B)\le P(A) + P(B),\qquad P(A_1\cup\cdots\cup A_m)\le\sum_{i=1}^m P(A_i). \tag{2.18}

This is Boole’s inequality, the first Bonferroni bound in probability-foundations. The mm-event version follows by induction.

ProofThe gap is the overlap

P(A)+P(B)−P(A∪B)=P(AB)≥0P(A) + P(B) - P(A\cup B) = P(AB)\ge0.

∎

ImportantWhen the bound is tight

  • Equality holds for mutually exclusive events.
  • Never off by more than a factor of 2 for two events, since P(AB)≤min⁡{P(A),P(B)}P(AB)\le\min\{P(A),P(B)\}.
  • Nearly exact for rare independent events: P(A)=P(B)=.001P(A) = P(B) = .001 gives P(A∪B)=.002−.000001P(A\cup B) = .002 - .000001, versus the bound .002.
  • Useless for likely events: the sum can exceed 1.

Reliability deals almost entirely with rare, independent failures, which is exactly the regime where the bound is sharp.


Network outage probability

Definitionss–tt network and outage

Nodes include a source ss and a terminal tt, joined by links. Link ii fails (event FiF_i) with probability pip_i, independently, and qi=1−piq_i = 1 - p_i. An ss–tt path is a set of links connecting ss to tt. Outage FF occurs if every ss–tt path has at least one failed link.

ComponentDetail
Inputthe network topology and failure probabilities p1,…,pmp_1,\dots,p_m
OutputP(F)P(F), a number in [0,1][0,1]
Assumedindependent link failures
Not modeledcapacities (see Distribution of the capacity of a flow network) and time
graph LR
  subgraph NetA["A: parallel"]
    sA["s"] ---|"1"| tA["t"]
    sA ---|"2"| tA
  end
  subgraph NetB["B: series"]
    sB["s"] ---|"1"| mB["m"]
    mB ---|"2"| tB["t"]
  end
graph LR
  subgraph NetE["E: bridge; drop link 5 to get C, merge a and b to get D"]
    s["s"] ---|"1"| a["a"]
    a ---|"2"| t["t"]
    s ---|"3"| b["b"]
    b ---|"4"| t
    a ---|"5"| b
  end

Network C is the two series paths 1–2 and 3–4 in parallel (E without link 5). Network D is two stages in series: stage 1 is links 1 and 3 in parallel, stage 2 is links 2 and 4 in parallel (E with link 5 never failing).

TheoremExact outage probabilities

NetworkOutage eventP(F)P(F)pi=.001p_i = .001
A (parallel)F1F2F_1F_2p1p2p_1p_210−610^{-6}
B (series)F1∪F2F_1\cup F_2p1+p2−p1p2p_1 + p_2 - p_1p_2.001999.001999
C (parallel of series)(F1∪F2)(F3∪F4)(F_1\cup F_2)(F_3\cup F_4)(p1+p2−p1p2)(p3+p4−p3p4)(p_1+p_2-p_1p_2)(p_3+p_4-p_3p_4)≈4×10−6\approx4\times10^{-6}
D (series of parallel)F1F3∪F2F4F_1F_3\cup F_2F_4p1p3+p2p4−p1p2p3p4p_1p_3 + p_2p_4 - p_1p_2p_3p_4≈2×10−6\approx2\times10^{-6}
E (bridge)see belowPD+p1q2q3p4p5+q1p2p3q4p5P_D + p_1q_2q_3p_4p_5 + q_1p_2p_3q_4p_5≈2.002×10−6\approx2.002\times10^{-6}
ProofSeries, parallel, and the bridge

Parallel: outage needs every branch to fail. The branches use disjoint links, so the branch failures are independent and multiply.

Series: outage needs some link to fail, which is a union (inclusion–exclusion).

C: each branch is a series (union), and the two branches combine in parallel (product).

D: each stage is a parallel pair (product), and the stages combine in series (union of two independent events).

E by conditioning on link 5 (total probability): P(FE)=p5P(FC)+(1−p5)P(FD).P(F_E) = p_5P(F_C) + (1-p_5)P(F_D). If link 5 fails, delete it and get C. If link 5 works, it merges aa and bb and gives D.

E by comparison with D: any D-outage is an E-outage. E fails but D doesn’t only when exactly links {1,4,5}\{1,4,5\} or exactly {2,3,5}\{2,3,5\} fail. These are the two diagonal cuts.

∎

ExampleExhaustive state listing, network C (Hajek Table 2.3)

Write the state as 4 bits, with bit ii = 1 if link ii fails. C fails iff (bit 1 or bit 2) and (bit 3 or bit 4). Of the 16 states, 9 fail: 0101, 0110, 0111, 1001, 1010, 1011, 1101, 1110, 1111. Each state’s probability is a product of pp‘s and qq‘s, e.g. state 0110 has probability q1p2p3q4q_1p_2p_3q_4, and P(F)P(F) is their sum. This is reliable for small networks and useless for large ones. Hajek notes that exact network reliability is computationally intractable in general.

TheoremUnion bounds via cut sets

Write FF as a union of “all links in a cut fail” events and bound:

NetworkCutsUnion boundpi=.001p_i = .001
B{1},{2}\{1\},\{2\}p1+p2p_1 + p_2.002.002
C{1,3},{1,4},{2,3},{2,4}\{1,3\},\{1,4\},\{2,3\},\{2,4\}(p1+p2)(p3+p4)(p_1+p_2)(p_3+p_4)4×10−64\times10^{-6}
D{1,3},{2,4}\{1,3\},\{2,4\}p1p3+p2p4p_1p_3 + p_2p_42×10−62\times10^{-6}
E{1,3},{2,4},{1,4,5},{2,3,5}\{1,3\},\{2,4\},\{1,4,5\},\{2,3,5\}p1p3+p2p4+p1p4p5+p2p3p5p_1p_3 + p_2p_4 + p_1p_4p_5 + p_2p_3p_52.002×10−62.002\times10^{-6}

In every case the bound nearly equals the exact value.

IntuitionRare failures are dominated by the smallest cuts

With all pi=pp_i = p small, a cut of size cc contributes about pcp^c. So P(F)≈(number of minimum-size cuts)×pcmin⁡P(F)\approx(\text{number of minimum-size cuts})\times p^{c_{\min}}.

  • Series adds: B’s single-link cuts give about 2p2p.
  • Parallel multiplies: A’s two-link cut gives p2p^2.
  • C has 4 two-link cuts (4p24p^2), D only 2 (2p22p^2), so D is twice as reliable as C with the same four links.
  • E’s extra link 5 adds only three-link cuts (∼p3\sim p^3), so it barely helps over D.

Distribution of the capacity of a flow network

DefinitionRandom flow network capacity

Each link carries flow (in either direction, splittable across paths) up to its capacity. It carries nothing if it fails. The network capacity is the maximum ss–tt flow rate. Because links fail at random, the capacity is a discrete random variable.

ComponentDetail
Signaturecapacity: (state of the links) → max-flow value
Domainthe 2m2^m up/down states, with probabilities ∏piqj\prod p_iq_j
Codomaina finite set of flow values
pmfadd up the probabilities of all states with each capacity

ExampleNetwork F: two parallel links, capacities 10 and 20

pX(0)=p1p2,pX(10)=q1p2,pX(20)=p1q2,pX(30)=q1q2.p_X(0) = p_1p_2,\quad p_X(10) = q_1p_2,\quad p_X(20) = p_1q_2,\quad p_X(30) = q_1q_2.
graph LR
  s["s"] ---|"link 1, cap 10"| a["a"]
  a ---|"link 2, cap 20"| t["t"]
  s ---|"link 3, cap 20"| b["b"]
  b ---|"link 4, cap 10"| t
  b ---|"link 5, cap 10"| a

ExampleNetwork G: a capacitated bridge

Capacity 30 needs every link: send 10 along 1, 20 along 3, then 10 on along 4 and 10 up link 5, so that 20 leaves through link 2. Any failure cuts either the 30 leaving ss, the 30 entering tt, or (link 5) the crossover. So pY(30)=q1q2q3q4q5p_Y(30) = q_1q_2q_3q_4q_5.

Capacity 0 is exactly outage of the bridge, so pY(0)=P(FE)p_Y(0) = P(F_E).

Capacity 20 needs links 2 and 3 (the only 20-capacity exits from ss and entries to tt). Then either link 5 is down and links 1 and 4 both work, or link 5 is up and exactly one of links 1, 4 is down: pY(20)=q2q3[p5q1q4+q5(p1q4+q1p4)].p_Y(20) = q_2q_3\big[p_5q_1q_4 + q_5(p_1q_4 + q_1p_4)\big].

Capacity 10: pY(10)=1−pY(0)−pY(20)−pY(30)p_Y(10) = 1 - p_Y(0) - p_Y(20) - p_Y(30).

WarningIf links 1 and 4 both fail with 5 up, the capacity is 10, not 20

The only remaining route is s→3→5→2→ts\to3\to5\to2\to t, limited to 10 by link 5. Hajek writes the link-5-up term as q5(p1+p4−p1p4)q_5(p_1 + p_4 - p_1p_4) (“at least one fails”), which wrongly counts this state as capacity 20. The expression above uses “exactly one.”

ExampleState enumeration for G (Hajek Table 2.4, first rows)
State (bit ii = link ii failed)CapacityProbability
0000030q1q2q3q4q5q_1q_2q_3q_4q_5
0000120q1q2q3q4p5q_1q_2q_3q_4p_5
0001020q1q2q3p4q5q_1q_2q_3p_4q_5
0001110q1q2q3p4p5q_1q_2q_3p_4p_5
0010010q1q2p3q4q5q_1q_2p_3q_4q_5
00101–0011110…
111110p1p2p3p4p5p_1p_2p_3p_4p_5

Analysis of an array code

DefinitionTwo-dimensional parity code

A 7×77\times7 block of 49 data bits gets an extra parity column, parity row and overall parity bit, making an 8×88\times8 array in which every row and column has even parity. An error pattern marks flipped bits. The reader checks all 16 parities, and any odd parity means the error is detected.

TheoremWhich error patterns go undetected

  • Every pattern of 1, 2 or 3 errors is detected.
  • An undetected pattern needs every row and column to have even parity. So its total weight is even, and odd weights are always detected.
  • A 4-error pattern is undetected iff it sits on the four corners of a rectangle (two rows × two columns). There are (82)2=282=784\binom82^2 = 28^2 = 784 such patterns.
ProofTwo errors are always caught

Two flipped bits lie in different rows or different columns (or both). Different rows means those two rows have odd parity. Different columns means those two columns do.

∎

TheoremUndetected-error probability (p=10−3p = 10^{-3} per bit, independent)

Crude: the number of errors YY is binomial(64,p)(64,p). Undetected errors need Y≥4Y\ge4, and by the union bound over 4-subsets, P{Y≥4}≤(644)p4=635,376 p4≈0.64×10−6.P\{Y\ge4\}\le\binom{64}4p^4 = 635{,}376\,p^4\approx0.64\times10^{-6}. (Compare the exact P{Y=4}=(644)p4(1−p)60P\{Y = 4\} = \binom{64}4p^4(1-p)^{60}.)

Sharp: only the 784 rectangle patterns can fail at weight 4, weight 5 is impossible, and weight ≥6\ge6 is union-bounded:

P(undetected)≤784p4+(646)p6=(784+74.97)×10−12≈0.859×10−9.P(\text{undetected})\le784p^4 + \binom{64}6p^6 = (784 + 74.97)\times 10^{-12}\approx0.859\times10^{-9}.

IntuitionStructure beats counting

The crude bound treats all (644)\binom{64}4 four-bit patterns as dangerous. Only 784 of them are. Knowing which failure patterns actually matter improves the bound by a factor of about 740, the same “minimal cuts” lesson as the networks.


Reliability of a single backup

ExampleTwo machines backing each other up (Hajek)

Each machine, when up (or just repaired, or on day 1), goes down on a given day with probability .001, independently. It then stays down for 5 days of repair. How long until both are down on the same day? Answer: roughly 274 years.

DerivationTwo nested geometric waits

Step 1: Wait for the first failure. With both machines up, some machine fails on a given day with probability about .002.002. So the wait is roughly geometric(.002)(.002), with mean about 500 days.

Step 2: Does the backup fail during the repair? The other machine fails within the 5-day repair with probability about 5×.001=12005\times.001 = \frac1{200} (union bound over the 5 days).

Step 3: Count repair cycles. Each cycle independently ends in a double outage with probability about 1200\frac1{200}, so the number of cycles is roughly geometric with mean 200.

Step 4: Multiply. 500×200=100,000500\times200 = 100{,}000 days, or about 274 years. Hajek poses bracketing this between 200 and 400 years as a challenge. The approximations in steps 1–2 are each accurate to well under a factor of 2.

ImportantRedundancy turns pp into roughly p×(repair time)×pp\times(\text{repair time})\times p

A single machine fails every 1000 days on average. The pair fails about 100 times less often, because a double outage needs a second rare event inside a short window. Shortening repairs improves reliability proportionally.


Failure rate functions

NoteSource coverage

Neither Chapter 2 source covers failure rates. This section gives the discrete version, which follows directly from the geometric results above. The continuous version, with proofs, is in continuous-random-variables-and-distributions.

DefinitionDiscrete failure rate (hazard)

For a lifetime LL on {1,2,… }\{1,2,\dots\}, h(k)=P(L=k∣L≥k)=pL(k)P{L≥k}.h(k) = P(L = k\mid L\ge k) = \frac{p_L(k)}{P\{L\ge k\}}. It is the chance of failing now, given survival so far.

ComponentDetail
Signatureh:{1,2,… }→[0,1]h : \{1,2,\dots\}\to[0,1]
Domainan age kk
Codomainthe conditional failure probability at that age
Not the same aspL(k)p_L(k), which is unconditional and so small for large kk even when the item is fragile at that age

TheoremHazard determines the lifetime

P{L>k}=∏j=1k(1−h(j)).P\{L > k\} = \prod_{j=1}^k\big(1 - h(j)\big).

ProofChain rule

{L>k}\{L > k\} means surviving each of ages 1,…,k1,\dots,k in turn. By the multiplication rule, its probability is ∏jP(L>j∣L>j−1)=∏j(1−h(j))\prod_jP(L > j\mid L > j-1) = \prod_j(1 - h(j)).

∎

TheoremConstant hazard ⟺ geometric ⟺ memoryless

h(k)≡ph(k)\equiv p iff LL is geometric(p)(p): the product gives P{L>k}=(1−p)kP\{L > k\} = (1-p)^k, which is (2.8). Constant hazard is exactly the memoryless property: age carries no information about the remaining life.

RemarkContinuous analogue

For a continuous lifetime the hazard is λ(t)=f(t)/(1−F(t))\lambda(t) = f(t)/(1 - F(t)), survival is exp⁡{−∫0tλ}\exp\{-\int_0^t\lambda\}, and a constant hazard gives exactly the exponential distribution. Proofs are in continuous-random-variables-and-distributions.

IntuitionReading a hazard curve

  • Decreasing hh: infant mortality (defective units fail early).
  • Constant hh: random shocks, as in the backup model’s .001 per day.
  • Increasing hh: wear-out.

The classic “bathtub” curve combines all three. The geometric model, and everything built on it above, assumes the flat middle.


The Poisson distribution and Poisson processes

DefinitionPoisson(λ)(\lambda)

XX is Poisson with parameter λ>0\lambda > 0 if

p(i)=P{X=i}=e−λλii!,i=0,1,2,…(7.1)p(i) = P\{X = i\} = e^{-\lambda}\frac{\lambda^i}{i!},\qquad i = 0,1,2,\dots \tag{7.1}

It sums to 1 because ∑iλi/i!=eλ\sum_i\lambda^i/i! = e^\lambda. Introduced by Poisson (1837) in a book on the probability of verdicts in criminal and civil trials.

ComponentDetail
Parameterλ\lambda, the mean number of occurrences
Support{0,1,2,… }\{0,1,2,\dots\}
Typical usethe count of many rare, (nearly) independent events

The Poisson distribution as a limit of binomial distributions

TheoremBinomial(n,λ/n)→(n,\lambda/n)\to Poisson(λ)(\lambda)

Fix λ>0\lambda > 0 and k≥0k\ge0. With p=λ/np = \lambda/n,

(nk)pk(1−p)n−k  ⟶  e−λλkk!(n→∞).(2.9–2.10)\binom nkp^k(1-p)^{n-k}\;\longrightarrow\;e^{-\lambda}\frac{\lambda^k}{k!} \qquad(n\to\infty). \tag{2.9–2.10}

So when nn is large and pp is small, with npnp moderate, the number of successes is approximately Poisson with λ=np\lambda = np.

ProofMass at 0, then the remaining factors (Hajek)

Step 1: k=0k = 0. ln⁡pb(0)=nln⁡(1−λ/n)=n(−λ/n+o(1/n))→−λ\ln p_b(0) = n\ln(1 - \lambda/n) = n\big(-\lambda/n + o(1/n)\big)\to-\lambda, using ln⁡(1+u)=u+o(u)\ln(1+u) = u + o(u). So pb(0)=(1−λ/n)n→e−λp_b(0) = (1 - \lambda/n)^n\to e^{-\lambda}.

Step 2: general kk. Rearranging,

pb(k)=λkpb(0)k!⋅n(n−1)⋯(n−k+1)nk⏟→1⋅(1−λn)−k⏟→1  →  λke−λk!.p_b(k) = \frac{\lambda^kp_b(0)}{k!}\cdot\underbrace{\frac{n(n-1)\cdots (n-k+1)}{n^k}}_{\to1}\cdot\underbrace{\Big(1 - \frac\lambda n\Big)^{-k}}_{ \to1}\;\to\;\frac{\lambda^ke^{-\lambda}}{k!}.

∎

IntuitionWhy so many counts are Poisson

Each of a huge number of opportunities has a tiny chance of producing an event: each letter on a page might be a misprint, each person might reach age 100, each atom might emit an α-particle this second, each phone owner near a base station might call this minute. The count is binomial with large nn and small pp, hence nearly Poisson. Only one parameter, λ=np\lambda = np, survives the limit, and it is usually estimated from data.

TheoremMean and variance

E[X]=λ,E[X2]=λ(λ+1),Var(X)=λ.E[X] = \lambda,\qquad E[X^2] = \lambda(\lambda + 1),\qquad \mathrm{Var}(X) = \lambda.
ProofShift the index (Ross) E[X]=∑i≥1ie−λλii!=λ∑j≥0e−λλjj!=λ,E[X] = \sum_{i\ge1}i\frac{e^{-\lambda}\lambda^i}{i!} = \lambda\sum_{j\ge0} \frac{e^{-\lambda}\lambda^j}{j!} = \lambda,

with j=i−1j = i - 1. The same shift gives E[X2]=λ∑j(j+1)e−λλj/j!=λ(E[X]+1)=λ2+λE[X^2] = \lambda\sum_j(j + 1) e^{-\lambda}\lambda^j/j! = \lambda(E[X] + 1) = \lambda^2 + \lambda.

Consistency check: the approximating binomial has mean np=λnp = \lambda and variance np(1−p)=λ(1−p)→λnp(1-p) = \lambda(1 - p)\to\lambda.

∎

FormulaRecursion

P{X=i+1}=λi+1P{X=i},P{X=0}=e−λ.(7.6)P\{X = i+1\} = \frac\lambda{i+1}P\{X = i\},\qquad P\{X = 0\} = e^{-\lambda}. \tag{7.6}

This is how calculators compute Poisson tails (e.g. P{X≤90}≈.171P\{X\le90\}\approx .171 for λ=100\lambda = 100, and P{X≤1075}≈.991P\{X\le1075\}\approx.991 for λ=1000\lambda = 1000).

ExamplePoisson computations (Ross)

  • Typos: λ=12\lambda = \frac12 per page gives P(at least one)=1−e−1/2≈.393P(\text{at least one}) = 1 - e^{-1/2}\approx.393.
  • Defectives: each of 10 items is defective with probability .1. P(≤1 defective)P(\le1\text{ defective}) is exactly .910+10(.1)(.9)9=.7361.9^{10} + 10(.1)(.9)^9 = .7361, and the Poisson(1) approximation gives 2e−1≈.73582e^{-1}\approx.7358.
  • α-particles: 3.2 per second on average, so P{X≤2}=e−3.2(1+3.2+3.22/2)≈.3799P\{X\le2\} = e^{-3.2}(1 + 3.2 + 3.2^2/2)\approx.3799.

The Poisson paradigm

TheoremPoisson paradigm (Ross)

Let nn events have probabilities p1,…,pnp_1,\dots,p_n. If every pip_i is small and the events are independent or only weakly dependent, the number that occur is approximately Poisson with mean ∑ipi\sum_ip_i.

NoteA heuristic, not a theorem

“Small” and “weakly dependent” are not made precise in the source. The examples below show both a success of the heuristic and a failure that needs a fix.

ExampleMatches in the hat problem

Let EiE_i = person ii gets their own hat. P(Ei)=1nP(E_i) = \frac1n and P(Ei∣Ej)=1n−1P(E_i\mid E_j) = \frac1{n-1}: dependent, but only barely. The paradigm predicts Poisson(1) matches, and indeed P(exactly k)≈e−1/k!P(\text{exactly }k)\approx e^{-1}/k! (conditional-probability-and-independence).

ExampleBirthdays, pairs and triples (Ross)

Pairs. Make a trial for each of the (n2)\binom n2 pairs, a success if the pair shares a birthday, with probability 1365\frac1{365}. These events are even pairwise independent. So P(no shared birthday)≈exp⁡{−n(n−1)730},P(\text{no shared birthday})\approx\exp\Big\{-\frac{n(n-1)}{730}\Big\}, which is below 12\frac12 iff n(n−1)≥730ln⁡2≈506n(n-1)\ge730\ln2\approx506, i.e. n≥23n\ge23. That matches the exact answer in probability-foundations.

Triples. The exact combinatorics are hard, but the paradigm is easy. Each of the (n3)\binom n3 triples shares a birthday with probability 1/36521/365^2, so

P(no three share a birthday)≈exp⁡{−n(n−1)(n−2)799,350},P(\text{no three share a birthday})\approx\exp\Big\{-\frac{n(n-1)(n-2)} {799{,}350}\Big\},

which drops below 12\frac12 once n(n−1)(n−2)≥554,067n(n-1)(n-2)\ge554{,}067, i.e. n≥84n\ge84.

ExampleThe longest run of heads (Ross)

Flip a coin with heads probability pp nn times. What is the chance of a run of kk consecutive heads?

The naive events fail. Let HiH_i = flips i,…,i+k−1i,\dots,i+k-1 are all heads. Each has small probability pkp^k, but P(H2∣H1)=pP(H_2\mid H_1) = p, which is far larger. The dependence is too strong.

The fix: count runs by their ends. Let EiE_i = flips i..i+k−1i..i+k-1 are heads and flip i+ki+k is a tail (i≤n−ki\le n-k), plus En−k+1E_{n-k+1} = the last kk flips are heads. Overlapping EiE_i are now mutually exclusive, and non-overlapping ones are independent. So the count NN is approximately Poisson with mean (n−k)pk(1−p)+pk(n-k)p^k(1-p) + p^k, and with LnL_n the longest run, P{Ln<k}=P{N=0}≈exp⁡{−(n−k)pk(1−p)−pk}.P\{L_n < k\} = P\{N = 0\}\approx\exp\big\{-(n-k)p^k(1-p) - p^k\big\}.

Fair coin. P{Ln<k}≈exp⁡{−n/2k+1}P\{L_n < k\}\approx\exp\{-n/2^{k+1}\}. With j=log⁡2nj = \log_2n (an integer), P{Ln<j+i}≈exp⁡{−(1/2)i+1}P\{L_n < j + i\}\approx\exp\{-(1/2)^{i+1}\}:

LnL_n<j−3<j-3j−3j-3j−2j-2j−1j-1jjj+1j+1j+2j+2j+3j+3≥j+4\ge j+4
prob..0183.1170.2325.2387.1723.1037.0569.0298.0308

However large nn is, the longest run is within 2 of log⁡2n−1\log_2n - 1 with probability about .86.

DerivationThe longest run exactly: inclusion–exclusion and a recursion (Ross)

Inclusion–exclusion. An intersection of EE‘s is 0 if their flip sets overlap. Otherwise it is prk(1−p)rp^{rk}(1-p)^r (without the last event) or prk(1−p)r−1p^{rk}(1-p)^{r-1} (with it). Counting non-overlapping placements as arrangements of blocks and free flips gives

P{Ln≥k}=∑r=1n−k+1(−1)r+1[(n−rkr)+1p(n−rkr−1)]pkr(1−p)r.P\{L_n\ge k\} = \sum_{r=1}^{n-k+1}(-1)^{r+1}\Big[\binom{n-rk}r + \frac1p\binom{n-rk}{r-1}\Big]p^{kr}(1-p)^r.

A faster recursion. Let Pn=P(a run of k in n flips)P_n = P(\text{a run of }k\text{ in }n \text{ flips}). Condition on when the first tail appears (flip j≤kj\le k), or on the first kk flips all being heads:

Pn=∑j=1kPn−j pj−1(1−p)+pk,Pj=0 (j<k),  Pk=pk.P_n = \sum_{j=1}^kP_{n-j}\,p^{j-1}(1-p) + p^k,\qquad P_j = 0\ (j < k),\ \ P_k = p^k.

For k=2k = 2 and a fair coin: P3=38P_3 = \frac38 and P4=12P_4 = \frac12. Check: 8 of the 16 sequences of 4 flips contain HH.

The Poisson process

DefinitionPoisson process with rate λ\lambda (Ross §4.7)

Events occur at random times, with:

  1. P(exactly one event in an interval of length h)=λh+o(h)P(\text{exactly one event in an interval of length }h) = \lambda h + o(h);
  2. P(two or more events in an interval of length h)=o(h)P(\text{two or more events in an interval of length }h) = o(h);
  3. counts in non-overlapping intervals are independent.

Here o(h)o(h) means any ff with f(h)/h→0f(h)/h\to0.

TheoremCounts are Poisson

Under 1–3, the number N(t)N(t) of events in any interval of length tt satisfies

P{N(t)=k}=e−λt(λt)kk!,k≥0.(7.5)P\{N(t) = k\} = e^{-\lambda t}\frac{(\lambda t)^k}{k!},\qquad k\ge0. \tag{7.5}

λ\lambda is the long-run rate of events per unit time.

ProofChop [0,t][0,t] into nn tiny intervals

Step 1: Split. {N(t)=k}=A∪B\{N(t) = k\} = A\cup B (disjoint), where AA = ”kk subintervals contain exactly one event, the rest none” and BB = ”N(t)=kN(t) = k and some subinterval contains two or more.”

Step 2: BB is negligible. By Boole’s inequality and assumption 2, P(B)≤n o(t/n)=t⋅o(t/n)t/n→0.P(B)\le n\,o(t/n) = t\cdot\frac{o(t/n)}{t/n}\to0.

Step 3: AA is binomial. By assumptions 1 and 3,

P(A)=(nk)[λtn+o(tn)]k[1−λtn−o(tn)]n−k.P(A) = \binom nk\Big[\frac{\lambda t}n + o\Big(\frac tn\Big)\Big]^k\Big[1 - \frac{\lambda t}n - o\Big(\frac tn\Big)\Big]^{n-k}.

Since n[λt/n+o(t/n)]→λtn[\lambda t/n + o(t/n)]\to\lambda t, the binomial-to-Poisson limit gives P(A)→e−λt(λt)k/k!P(A)\to e^{-\lambda t}(\lambda t)^k/k!.

∎

IntuitionA Bernoulli process in continuous time

Each subinterval is one Bernoulli trial with success probability about λt/n\lambda t/n. Letting n→∞n\to\infty turns binomial counts into Poisson counts, just as scaled geometric waits become exponential (continuous-random-variables-and-distributions).

NoteTODO — Hajek’s time-scaled Bernoulli process

Hajek’s own rescaling construction (bridging §2.6’s Bernoulli process to a Poisson process) is not yet in sources/. The Ross derivation above covers the same idea.

ExampleEarthquakes (Ross)

Earthquakes follow a Poisson process with rate 2 per week.

  • At least 3 in the next 2 weeks: N(2)∼N(2)\sim Poisson(4), so P=1−e−4(1+4+8)=1−13e−4≈.762P = 1 - e^{-4}(1 + 4 + 8) = 1 - 13e^{-4}\approx.762.
  • Time XX to the next one: X>tX > t iff there are no events in [0,t][0,t], so P{X>t}=e−2tP\{X > t\} = e^{-2t}. The waiting time is exponential (continuous-random-variables-and-distributions).

ExampleWhere Poisson processes show up (Ross)

The number of earthquakes in a time span, wars per year, electrons emitted from a heated cathode, and deaths among a life insurer’s policyholders are all well modeled this way, for the same reason as the binomial limit.

The Erlang distribution

TheoremArrival times are Erlang (Ross §5.6.1)

Let TnT_n be the time of the nn-th event of a Poisson process with rate λ\lambda. Then

fTn(t)=λe−λt(λt)n−1(n−1)!,t≥0.f_{T_n}(t) = \frac{\lambda e^{-\lambda t}(\lambda t)^{n-1}}{(n-1)!},\qquad t\ge0.

This is the gamma(n,λ)(n,\lambda) or nn-Erlang distribution. For n=1n = 1 it is the exponential.

ProofArrival by tt iff at least nn counts by tt

Step 1: Swap waiting for counting. {Tn≤t}={N(t)≥n}\{T_n\le t\} = \{N(t)\ge n\}, so P{Tn≤t}=∑j≥ne−λt(λt)jj!.P\{T_n\le t\} = \sum_{j\ge n}e^{-\lambda t}\frac{(\lambda t)^j}{j!}.

Step 2: Differentiate term by term.

f(t)=∑j≥nλe−λt(λt)j−1(j−1)!−∑j≥nλe−λt(λt)jj!.f(t) = \sum_{j\ge n}\frac{\lambda e^{-\lambda t}(\lambda t)^{j-1}}{(j-1)!} - \sum_{j\ge n}\frac{\lambda e^{-\lambda t}(\lambda t)^j}{j!}.

The sums telescope, leaving only the j=nj = n term of the first.

∎

ImportantDiscrete and continuous twins

Bernoulli process (discrete time)Poisson process (continuous time)
binomial count in nn trialsPoisson count in time tt
geometric gap between successesexponential gap between events
negative binomial time of the rr-th successErlang time of the nn-th event
{Cn≥r}={Sr≤n}\{C_n\ge r\} = \{S_r\le n\}{N(t)≥n}={Tn≤t}\{N(t)\ge n\} = \{T_n\le t\}

The general gamma family, with non-integer shape, is in continuous-random-variables-and-distributions.


Quick reference

ObjectStatementNote
Random variableX:Ω→RX : \Omega\to\mathbb R; {X∈A}\{X\in A\} is an eventindicator IAI_A for events
pmfpX(u)=P{X=u}p_X(u) = P\{X = u\}, ∑pX=1\sum p_X = 1determines all P{X∈A}P\{X\in A\}
cdfF(x)=P{X≤x}F(x) = P\{X\le x\}nondecreasing step function
Dicesum 6−∣k−7∣36\frac{6-\lvert k-7\rvert}{36}; max 2k−136\frac{2k-1}{36}
CouponsP{T>n}=∑i=1r−1(−1)i+1(ri)(1−i/r)n≤re−n/rP\{T > n\} = \sum_{i=1}^{r-1}(-1)^{i+1}\binom ri(1 - i/r)^n\le re^{-n/r}inclusion–exclusion
MeanE[X]=∑u pX(u)E[X] = \sum u\,p_X(u)balance point
IndicatorE[IA]=P(A)E[I_A] = P(A)
LOTUSE[g(X)]=∑g(u)pX(u)E[g(X)] = \sum g(u)p_X(u)group by value of gg
LinearityE[aX+bY+c]=aE[X]+bE[Y]+cE[aX + bY + c] = aE[X] + bE[Y] + cno independence needed
Newsvendorstock until the cdf reaches b/(b+ℓ)b/(b+\ell)
VarianceE[(X−μ)2]=E[X2]−μ2E[(X-\mu)^2] = E[X^2] - \mu^2die: 35/1235/12
ScalingVar(aX+b)=a2Var(X)\mathrm{Var}(aX + b) = a^2\mathrm{Var}(X)standardize: (X−μ)/σ(X-\mu)/\sigma
Jensen-typeE[X2]≥(E[X])2E[X^2]\ge(E[X])^2friendship paradox
Size biasrandom student / friend ⇒ larger averageE[f(Y)]=E[f2]/E[f]E[f(Y)] = E[f^2]/E[f]
Bernoulli(p)(p)P{1}=pP\{1\} = p; mean pp; variance p(1−p)≤14p(1-p)\le\frac14X2=XX^2 = X
Binomial(n,p)(n,p)(nk)pk(1−p)n−k\binom nkp^k(1-p)^{n-k}; mean npnp; variance np(1−p)np(1-p)sum of nn Bernoullis
Sum of indicators (9.1)Var=∑pi+∑i≠jpi,j−(∑pi)2\mathrm{Var} = \sum p_i + \sum_{i\ne j}p_{i,j} - (\sum p_i)^2no independence needed
Binomial mode⌊(n+1)p⌋\lfloor(n+1)p\rfloorratio (n−k+1)pk(1−p)\frac{(n-k+1)p}{k(1-p)}
Recursion (6.3)p(k+1)=p1−pn−kk+1p(k)p(k+1) = \frac p{1-p}\frac{n-k}{k+1}p(k)compute the cdf
Majority systems2k+12k+1 beats 2k−12k-1 iff p>12p > \frac12factor (2p−1)(2p-1)
Voter power≈c2n/π\approx c\sqrt{2n/\pi}pivotal chance ∼1/πk\sim1/\sqrt{\pi k}
Chuck-a-luckE=−17/216E = -17/216
Best of seven(n−13)[p4qn−4+q4pn−4]\binom{n-1}3[p^4q^{n-4} + q^4p^{n-4}]18,14,516,516\frac18,\frac14,\frac5{16},\frac5{16} at p=12p = \frac12
Geometric(p)(p)(1−p)k−1p(1-p)^{k-1}p; tail (1−p)k(1-p)^kcounts trials, k≥1k\ge1
Geometric momentsmean 1/p1/p; variance (1−p)/p2(1-p)/p^2first-step analysis
MemorylessP(L>k+n∣L>n)=P(L>k)P(L > k+n\mid L > n) = P(L > k)constant hazard
Coupon collectorE=nHn≈nln⁡nE = nH_n\approx n\ln nsum of geometrics
Bernoulli processXX, LL, CC, SS determine each other{Cn≥r}={Sr≤n}\{C_n\ge r\} = \{S_r\le n\}
Negative binomial(r,p)(r,p)(n−1r−1)pr(1−p)n−r\binom{n-1}{r-1}p^r(1-p)^{n-r}, n≥rn\ge rsum of rr geometrics
NB momentsmean r/pr/p; variance r(1−p)/p2r(1-p)/p^24 ones on a die: 24, 120
Banach matches(2N−kN)2−(2N−k)\binom{2N-k}N2^{-(2N-k)}NB with r=N+1r = N+1
Union boundP(∪Ai)≤∑P(Ai)P(\cup A_i)\le\sum P(A_i)gap =P(AB)= P(AB); tight for rare events
Parallel / series∏pi\prod p_i / 1−∏qi≈∑pi1 - \prod q_i\approx\sum p_i
Networks C vs D≈4p2\approx4p^2 vs ≈2p2\approx2p^2count minimum cuts
Bridge Ep5PC+q5PDp_5P_C + q_5P_Dcondition on the bridge link
Flow capacitypmf by enumerating statespY(0)p_Y(0) = outage
Array code≤784p4+(646)p6≈0.86×10−9\le784p^4 + \binom{64}6p^6\approx0.86\times10^{-9}rectangles of 4 errors
Single backup≈500×200\approx500\times200 days ≈274\approx274 yearsnested geometrics
Hazardh(k)=P(L=k∣L≥k)h(k) = P(L = k\mid L\ge k); P(L>k)=∏(1−h)P(L > k) = \prod(1 - h)constant ⇒ geometric/exponential
Poisson(λ)(\lambda)e−λλi/i!e^{-\lambda}\lambda^i/i!; mean = variance = λ\lambdalimit of binomial(n,λ/n)(n,\lambda/n)
Poisson recursionp(i+1)=λi+1p(i)p(i+1) = \frac\lambda{i+1}p(i)
Poisson paradigmmany rare, weakly dependent events ⇒ Poisson(∑pi)(\sum p_i)birthdays: 23 for pairs, 84 for triples
Longest runP{Ln<k}≈e−n/2k+1P\{L_n < k\}\approx e^{-n/2^{k+1}} (fair coin)≈log⁡2n\approx\log_2n
Poisson processN(t)∼N(t)\sim Poisson(λt)(\lambda t), independent incrementsexponential gaps
Erlangf(t)=λe−λt(λt)n−1/(n−1)!f(t) = \lambda e^{-\lambda t}(\lambda t)^{n-1}/(n-1)!{N(t)≥n}={Tn≤t}\{N(t)\ge n\} = \{T_n\le t\}
Sum over outcomesE[X]=∑ωX(ω)p(ω)E[X] = \sum_\omega X(\omega)p(\omega)gives E[∑Xi]=∑E[Xi]E[\sum X_i] = \sum E[X_i]
Hypergeometric(mi)(N−mn−i)/(Nn)\binom mi\binom{N-m}{n-i}/\binom Nn; mean npnp; variance N−nN−1np(1−p)\frac{N-n}{N-1}np(1-p)≈ binomial when N≫nN\gg n
Capture–recaptureN^=⌊mn/i⌋\hat N = \lfloor mn/i\rfloorML estimate
ZetaC/kα+1C/k^{\alpha+1}discrete power law

Facts to keep to hand

  • A random variable forgets the outcome, keeps the number. The pmf is all you need for events about XX alone, but joint questions need joint information. Independence is precisely the condition that the joint pmf is the product of the marginals.
  • Expectation is linear, always. E[X+Y]=E[X]+E[Y]E[X + Y] = E[X] + E[Y] with no independence. Combined with E[IA]=P(A)E[I_A] = P(A), this turns counting questions into sums of probabilities. Products are different: E[XY]=E[X]E[Y]E[XY] = E[X]E[Y] needs independence, and E[g(X)]≠g(E[X])E[g(X)]\ne g(E[X]) in general.
  • Variance is the price of squaring. It is invariant under shifts and scales by a2a^2. It is computed as E[X2]−μ2E[X^2] - \mu^2, and it is nonnegative, which is exactly E[X2]≥(E[X])2E[X^2]\ge(E[X])^2. That one inequality powers the friendship paradox and the “shared birthday” example.
  • Size-biased sampling inflates averages. A random student’s bus, or a random friend’s friend count, is weighted by the very quantity being measured, so it exceeds the plain average. Whenever sampling is proportional to something, expect this bias.
  • One experiment, four views. Trials, gaps, counts and arrival times of a Bernoulli process are interchangeable descriptions. Binomial and negative binomial questions are the same question asked from different sides: {Cn≥r}={Sr≤n}\{C_n\ge r\} = \{S_r\le n\}.
  • Linearity plus indicators does most of the work. The means of the binomial (npnp), negative binomial (r/pr/p) and coupon collector (nHnnH_n) come from splitting into simple pieces. Variances add only when the pieces are independent, or (9.1) handles the covariance terms.
  • First-step analysis is how geometric facts are derived. “Condition on trial 1; the rest looks like the start” gives the mean, variance and memorylessness in a few lines. It works because independent trials restart the process.
  • Rare waits are long and noisy. A geometric with small pp has σ≈μ=1/p\sigma\approx\mu = 1/p. Averages alone badly understate the risk of very long waits.
  • In reliability, series adds and parallel multiplies. For small failure probabilities, outage ≈\approx (number of minimum-size cuts) × pcut sizep^{\text{cut size}}. Structure (which cuts exist) matters more than the number of components: D beats C with the same four links, and the bridge link in E adds almost nothing.
  • The union bound is the reliability engineer’s approximation. It is loose for likely events but nearly exact for rare, weakly overlapping ones, which is exactly the regime of well-designed systems. Sharpening it means identifying which failure patterns actually cause system failure (784 rectangles, not 635,376 quadruples).
  • Redundancy squares the failure rate, up to a window factor. A backup converts a single rare failure into two rare failures within a repair window, roughly p⋅(window)⋅pp\cdot(\text{window})\cdot p. Fast repair is worth as much as reliable parts.
  • Memorylessness means constant hazard. The geometric (and later the exponential) is the unique lifetime model in which age tells you nothing. Any model with wear-out or infant mortality must abandon it.
  • Poisson is the law of rare events. Many opportunities, each unlikely and nearly independent, give a Poisson count with one parameter, its mean, which also equals its variance. When dependence is strong (overlapping runs), redefine the events so that it becomes weak.
  • The Poisson process is the Bernoulli process in continuous time. Poisson counts, exponential gaps and Erlang arrival times replace binomial counts, geometric gaps and negative binomial arrival times, and the counting–waiting duality carries over.
  • Sampling without replacement keeps the mean and shrinks the variance. The hypergeometric has the binomial mean and the binomial variance times N−nN−1\frac{N-n}{N-1}. For small samples from large populations the difference disappears.

References

← All notes