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.
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 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?
| Tool | Packages | Summary statistics / rules |
|---|---|---|
| random variable + pmf | outcome → number; probability → pmf | mean, variance |
| Bernoulli trial family | counts and waits in independent trials | Bernoulli, binomial, geometric, negative binomial |
| reliability | independent component/link failures | union 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 . When the experiment selects , the realized value is . For , is an event, and we write .
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 is if and otherwise.
DefinitionDiscrete type, pmf, support
is discrete-type if there is a finite or countably infinite set with . Its probability mass function is The support is . The pmf determines every event about : .
| Component | Detail |
|---|---|
| Signature | |
| Domain | a candidate value of |
| Codomain | the probability that takes exactly that value |
| Not an input | the outcome ; the pmf forgets which outcomes produced |
DefinitionCumulative distribution function (Ross)
is nondecreasing: if , then . For discrete , is a step function that jumps by at each and is constant in between.
ExampleA pmf and its cdf
, , gives
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 | , |
| sum | , (peak at 7) |
| maximum | : |
| product | read off the multiplication table |
DerivationWhere the closed forms come from
Sum. The outcomes with lie on an anti-diagonal of the grid. Its length is for and for , i.e. .
Maximum. is a square, so .
(The chapter shows these as figures. The closed forms are mine.)
ExampleMore pmfs from counting (Ross)
- Heads in 3 fair coins: for .
- Two insured clients dying independently with probabilities .05 and .10 (payout units of $100k): , , .
- Largest of 4 balls drawn from 1..20: for . More directly, .
- Flip until a head or flips: for , and . The masses sum to 1 via the geometric series.
- Normalizing a pmf: forces (the Poisson form). Then .
ExampleCoupon collecting (Ross)
There are equally likely coupon types. Let be the number of draws until every type has appeared. With = “type missing from the first draws”, , so by inclusion–exclusion
Boole bound: , using .
Distinct types among draws, : choose which types appear (), require all draws to land in them (), and require all to be represented (use (1.1) with types):
The mean and variance of a random variable
Expectation
DefinitionMean (expectation, first moment)
This is a weighted average of the possible values, weighted by their probabilities.
IntuitionTwo readings
- Frequency: over many independent plays, a value occurs a fraction of the time, so the average winnings per game converge to .
- Mechanics: put mass at position on a weightless rod. is the balance point, because means the torques cancel.
ExampleFirst computations
- Fair die: .
- Indicator of : . The expectation of an indicator is a probability. This is a workhorse identity.
- Distinct numbers on three dice (Hajek): , , . These sum to 216, as a check. So
WarningThe mean is not the average of the possible values
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 be the size of their bus:
Bigger buses contain more students, so a random student is more likely to be on one.
ExampleWhich question first? (Ross)
Answering question correctly pays and happens with probability (independently). You may attempt the second question only if the first is right. Starting with question 1 is better iff With and : , so start with the cheaper, surer question.
DerivationThe comparison
Question 1 first earns . Question 2 first earns . The shared term cancels, leaving vs . Divide by .
The law of the unconscious statistician
The problem. To find by definition, you’d first compute the pmf of by merging values of that map to the same . That is tedious.
TheoremLOTUS (Hajek eq. 2.2; Ross Prop. 4.1)
Similarly .
ProofGroup terms with equal -values
Let be the distinct values of . Then
The key step: summing over and then grouping by is exactly how one would have built the pmf of . LOTUS just skips writing that pmf down.
∎
ExampleLOTUS in action
- uniform on , (Hajek): via the pmf of , or directly, .
- Product of two dice: .
- vs (Ross): with , , , but .
Warning in general
Squaring after averaging is not averaging after squaring. The product example works only because the dice are independent (conditional-probability-and-independence).
TheoremLinearity of expectation
and for random variables on a common space, . In particular:
- ;
- , with no independence needed.
ProofLinearity is linearity of a weighted sum
By LOTUS, splits into three sums, and handles the constant. For example, .
∎
TheoremExpectation as a sum over outcomes (Ross Prop. 9.1)
If is finite or countable, with ,
ProofGroup outcomes by the value of
Let . Then
since the partition .
∎
CorollaryExpectation of a sum (Ross Cor. 9.2)
, because splits into sums. Ross notes that the result holds without the countability assumption too.
ExampleLinearity without independence (Ross)
- Two flips with heads probability : by the pmf, . By outcomes, .
- Sum of dice: .
- Successes in dependent trials: if trial succeeds with probability , the expected number of successes is , 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 , and each unsold unit loses . Demand has pmf . Stocking gives
The increment is positive iff . The left side increases in , so if is the largest such , the expected profit rises up to and falls afterwards. Stock . In words: stock until the demand cdf first reaches the critical ratio .
ExampleExpected utility (Ross)
To compare actions over consequences : give the worst consequence value 0 and the best value 1. Give each other the probability at which you’d be indifferent between for sure and a lottery “best with probability , worst otherwise.” An action yielding with probability is then equivalent to getting the best consequence with probability . So choose the action with the largest expected utility.
Variance
ExampleSame mean, very different risk (Hajek)
surely, versus with probability 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 ,
is the deviation, the error in predicting by its mean. It has mean zero. has the same units as , and the variance has squared units.
NoteWhy the square?
and 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
ProofFrom linearity
, so shifting leaves the deviation unchanged. , so the squared deviation scales by .
∎
DefinitionStandardized random variable
has mean 0 and variance 1, and is dimensionless.
FormulaComputational formula
Variance is the second moment minus the square of the first. (The -th moment is .)
DerivationExpand and use linearity
. Use (2.4) for meaning and scaling, and (2.5) for computation.
ExampleVariances
- Fair die: , so .
- The payments above: . For , , so and . (This computation is mine.)
- , and , each sign with probability , all have mean 0. Their variances are 0, 1 and .
Corollary
Variance is a sum of nonnegative terms, so . Equality holds iff is constant.
ExampleThe friendship paradox (Ross)
In a friendship graph on people, person has friends, and .
- A random person (uniform) has on average friends.
- A random friend : everyone writes each friend’s name on a separate sheet, and we draw a sheet. Then and
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
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 with probability . Let = ” and share a birthday.” Then and . So iff . This is for with probability . 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 . 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 trials | Distribution | Mean | Variance |
|---|---|---|---|
| did trial 1 succeed? | Bernoulli | ||
| how many successes in trials? | binomial | ||
| how many trials until the first success? | geometric | ||
| how many trials until the -th success? | negative binomial |
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
is Bernoulli with parameter if It is the indicator of a single “success.” Named after Jacques (James, Jakob) Bernoulli.
FormulaMean and variance
Derivation
A 0/1 variable equals its square, so . Then .
RemarkMaximum uncertainty at a fair coin
is symmetric about , where it reaches its maximum . The bound is what makes polling error bars computable without knowing .
Binomial distribution
DefinitionBinomial
is the number of successes in independent Bernoulli trials: Bernoulli is binomial.
DerivationWhy the pmf has this form, and why it sums to one
Each arrangement: a particular sequence with successes, such as 11010101 with , , has probability by independence.
How many arrangements: choose which of the trials succeed, which gives disjoint sequences. For example, , has 6: ssff, sfsf, sffs, fssf, fsfs, ffss.
Normalization: by the binomial theorem, . Hajek substitutes into the Maclaurin series of to get the same result.
Mean and variance
TheoremMoments of the binomial
ProofThree derivations
1. Indicators and linearity (Ross §4.9). Write with the indicator that trial succeeds. Then . This needs no independence. For the variance, expand with and :
Independent trials with have , which gives .
2. Moment recursion (Ross). Using and shifting the index,
gives . gives , so .
3. Directly (Hajek, eq. 2.7): the same index shift inside .
∎
ImportantFormula (9.1) is more general than the binomial
(9.1) holds for any sum of indicators, dependent or not. Only the pairwise probabilities are needed. For example, sampling without replacement has and .
Shape: mode, median, recursion
PropositionUnimodality (Ross Prop. 6.1)
For , increases up to and decreases afterwards. If is an integer, tie.
ProofRatio of consecutive terms
∎
ExampleWhere the peak is
, : , so the mode is , close to . , : the mode is 5.
NoteThe median is also near the mean
Every median satisfies (Kaas–Buhrman, cited without proof).
FormulaRecursion for computing the pmf and cdf
Start from and accumulate to get . For example, , :
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | |
|---|---|---|---|---|---|---|---|
| .0467 | .1866 | .3110 | .2765 | .1382 | .0369 | .0041 |
ExampleStandardizing a binomial (Hajek)
Binomial has mean 2 and variance 1. So the standardized version is simply , a shift with no rescaling. A fair die needs both a shift (3.5) and a rescale ().
Applications
ExampleCounting successes (Ross)
- Five fair coins: , i.e. .
- Money-back screws: each screw is defective with probability .01, and a pack of 10 is replaced if more than one is defective: .
- Mendel: two hybrid parents have a child showing the dominant trait with probability . So .
ExampleChuck-a-luck is unfair (Ross)
Bet on a number, roll three dice, win units if it appears times and lose 1 otherwise. The count is binomial:
ExampleA jury needs a model of guilt (Ross)
8 of 12 votes convict, and each juror is independently right with probability . 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 :
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 ). A -component system beats a -component one iff . For the condition is .
ProofCondition on the first components
Let count working components among the first . The larger system works if ; if and at least one of the 2 extras works; or if and both extras work. The smaller system works iff . So
using .
∎
ExampleVoters in big states have more power (Ross)
A voter in a state of voters is decisive iff the other split evenly. In a close election each votes independently 50/50, and by Stirling The state carries about electoral votes, so
IntuitionWhy
The chance of being pivotal shrinks like (a binomial’s spread is ), but the prize grows like . The prize wins.
ExampleLength of a best-of-seven series (Hajek)
Games are independent and wins each with probability . The series ends at game with winning iff wins 3 of the first and then game :
With : .
Geometric distribution
DefinitionGeometric
is the number of trials up to and including the first success, with :
| Component | Detail |
|---|---|
| Support | : the count includes the success itself |
| Tail | (2.8): the first trials all fail |
| Normalization | geometric series; a success occurs with probability 1 |
WarningTwo conventions
Some texts count failures before the first success (support , mean ). Both sources here count trials.
ExampleDrawing with replacement until black (Ross)
black and white balls, so :
TheoremMean and variance
ProofFirst-step analysis (Hajek)
Condition on trial 1. With probability , . Otherwise , where (the remaining wait) has the same distribution as , because the trials start afresh. Conditional expectations obey total probability, , so
Second moment. . Solving gives , and subtracting gives the variance.
Ross gets the same result by splitting inside the sums. That’s the same argument written algebraically. His form agrees because .
∎
ImportantRare successes: mean and spread are both large
If is small, is huge and is nearly as big, smaller only by the factor . For , the mean is 100 and . 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 into , where is the wait for the -th new face. Each is geometric with . By linearity, With types, . (Compare the tail bound in Random variables and probability mass functions above.)
Memorylessness
TheoremMemoryless property (discrete time)
For integers :
ProofRatio of tails
, so the conditional probability is
∎
IntuitionWaiting doesn’t make it more likely soon
An observer who has already waited 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 of independent Bernoulli random variables. For each outcome , the function is the sample path. For example, .
TheoremFour equivalent descriptions
Each of these determines the others:
| Description | Definition | Distribution |
|---|---|---|
| trials | outcome of trial | i.i.d. Bernoulli |
| gaps | extra trials from the -th to the -th success | i.i.d. geometric |
| counting sequence | , | binomial, with independent increments over disjoint intervals |
| arrival times | , | negative binomial |
The conversions are and .
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 successes in trials” and “the -th success arrives by trial ” are the same event: So every binomial statement has a negative binomial twin.
Negative binomial distribution
DefinitionNegative binomial
, the trial on which the -th success occurs, has pmf gives the geometric distribution.
DerivationThe pmf and the name
pmf: iff the first trials contain exactly successes (probability ) and trial succeeds (). The two conditions concern disjoint trials, so they are independent.
Normalization: use the negative binomial series with , : This parallels the binomial pmf’s use of , hence the name.
Probabilistic check (Ross): is a sum of finite geometric waits, so it is finite with probability 1.
TheoremMean and variance
ProofSum of geometrics, or moment recursion
Mean: linearity over , each with mean .
Variance (Hajek): , because variances of independent summands add. That result is proved later (Hajek Ex. 4.8.1).
Moment recursion (Ross): using , gives . gives , and subtracting gives .
∎
ExampleFour ones on a die (Ross)
, : rolls, .
ExampleProblem of the points, a third way (Ross)
successes come before failures iff the -th success arrives by trial : Compare the Pascal (recursion) and Fermat (binomial) solutions in conditional-probability-and-independence.
ExampleBanach’s matchboxes (Ross)
Two boxes of matches, each use equally likely from either box. When the smoker first finds a box empty, the other holds matches with probability
Why: “the right box is found empty with left in the left box” means the -th choice of the right box happens on trial . That is a negative binomial with , . Double it for the symmetric case.
ExampleWaiting for successes or failures (Ross)
Let be the wait for successes and the wait for failures. is NB. For the first of the two, satisfies , and at time only one of the two can have just completed:
For the last of the two, , and the same two-term formula holds for , because the other event must already have happened.
Sampling without replacement: the hypergeometric distribution
DefinitionHypergeometric
Draw balls without replacement from an urn of , of which are white. The number of white balls drawn has
The pmf is 0 unless , which the convention for or handles automatically.
TheoremMean and variance
With :
ProofIndicators with dependent trials (Ross Ex. 9d–9e)
Let indicate that the -th ball drawn is white. Each ball drawn is equally likely to be any of the , so , and by linearity, although the draws are dependent. For , Formula (9.1) (Binomial distribution) gives . Substitute and simplify.
Ross also derives both moments from , where is hypergeometric .
∎
IntuitionThe finite-population correction
The mean is exactly the with-replacement (binomial) mean. The variance is smaller by the factor : drawing without replacement exhausts the urn and removes some randomness. Sampling the whole urn () leaves no randomness at all.
TheoremBinomial approximation
If and are large compared with and , then
ProofEach draw barely changes the urn
Writing out the factorials,
When , each of the “white” factors is about and each of the “black” factors is about .
∎
ExampleCapture–recapture: estimating a population (Ross)
Catch, mark and release animals. Later catch , of which are marked. With animals in total, the likelihood of seeing marked is . Then
so the maximum likelihood estimate is . For , , : . This matches the proportion argument . (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,
so 46% of lots are rejected.
The zeta (Zipf) distribution
DefinitionZeta distribution with parameter
The name comes from the Riemann zeta function , so .
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 , 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
This is Boole’s inequality, the first Bonferroni bound in probability-foundations. The -event version follows by induction.
ProofThe gap is the overlap
.
∎
ImportantWhen the bound is tight
- Equality holds for mutually exclusive events.
- Never off by more than a factor of 2 for two events, since .
- Nearly exact for rare independent events: gives , 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
Definition– network and outage
Nodes include a source and a terminal , joined by links. Link fails (event ) with probability , independently, and . An – path is a set of links connecting to . Outage occurs if every – path has at least one failed link.
| Component | Detail |
|---|---|
| Input | the network topology and failure probabilities |
| Output | , a number in |
| Assumed | independent link failures |
| Not modeled | capacities (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
| Network | Outage event | ||
|---|---|---|---|
| A (parallel) | |||
| B (series) | |||
| C (parallel of series) | |||
| D (series of parallel) | |||
| E (bridge) | see below |
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): If link 5 fails, delete it and get C. If link 5 works, it merges and 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 or exactly fail. These are the two diagonal cuts.
∎
ExampleExhaustive state listing, network C (Hajek Table 2.3)
Write the state as 4 bits, with bit = 1 if link 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 ‘s and ‘s, e.g. state 0110 has probability , and 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 as a union of “all links in a cut fail” events and bound:
| Network | Cuts | Union bound | |
|---|---|---|---|
| B | |||
| C | |||
| D | |||
| E |
In every case the bound nearly equals the exact value.
IntuitionRare failures are dominated by the smallest cuts
With all small, a cut of size contributes about . So .
- Series adds: B’s single-link cuts give about .
- Parallel multiplies: A’s two-link cut gives .
- C has 4 two-link cuts (), D only 2 (), so D is twice as reliable as C with the same four links.
- E’s extra link 5 adds only three-link cuts (), 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 – flow rate. Because links fail at random, the capacity is a discrete random variable.
| Component | Detail |
|---|---|
| Signature | capacity: (state of the links) → max-flow value |
| Domain | the up/down states, with probabilities |
| Codomain | a finite set of flow values |
| pmf | add up the probabilities of all states with each capacity |
ExampleNetwork F: two parallel links, capacities 10 and 20
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 , the 30 entering , or (link 5) the crossover. So .
Capacity 0 is exactly outage of the bridge, so .
Capacity 20 needs links 2 and 3 (the only 20-capacity exits from and entries to ). 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:
Capacity 10: .
WarningIf links 1 and 4 both fail with 5 up, the capacity is 10, not 20
The only remaining route is , limited to 10 by link 5. Hajek writes the link-5-up term as (“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 = link failed) | Capacity | Probability |
|---|---|---|
| 00000 | 30 | |
| 00001 | 20 | |
| 00010 | 20 | |
| 00011 | 10 | |
| 00100 | 10 | |
| 00101–00111 | 10 | … |
| 11111 | 0 |
Analysis of an array code
DefinitionTwo-dimensional parity code
A block of 49 data bits gets an extra parity column, parity row and overall parity bit, making an 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 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 ( per bit, independent)
Crude: the number of errors is binomial. Undetected errors need , and by the union bound over 4-subsets, (Compare the exact .)
Sharp: only the 784 rectangle patterns can fail at weight 4, weight 5 is impossible, and weight is union-bounded:
IntuitionStructure beats counting
The crude bound treats all 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 . So the wait is roughly geometric, 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 (union bound over the 5 days).
Step 3: Count repair cycles. Each cycle independently ends in a double outage with probability about , so the number of cycles is roughly geometric with mean 200.
Step 4: Multiply. 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 into roughly
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 on , It is the chance of failing now, given survival so far.
| Component | Detail |
|---|---|
| Signature | |
| Domain | an age |
| Codomain | the conditional failure probability at that age |
| Not the same as | , which is unconditional and so small for large even when the item is fragile at that age |
TheoremHazard determines the lifetime
ProofChain rule
means surviving each of ages in turn. By the multiplication rule, its probability is .
∎
TheoremConstant hazard ⟺ geometric ⟺ memoryless
iff is geometric: the product gives , 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 , survival is , and a constant hazard gives exactly the exponential distribution. Proofs are in continuous-random-variables-and-distributions.
IntuitionReading a hazard curve
- Decreasing : infant mortality (defective units fail early).
- Constant : random shocks, as in the backup model’s .001 per day.
- Increasing : 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
is Poisson with parameter if
It sums to 1 because . Introduced by Poisson (1837) in a book on the probability of verdicts in criminal and civil trials.
| Component | Detail |
|---|---|
| Parameter | , the mean number of occurrences |
| Support | |
| Typical use | the count of many rare, (nearly) independent events |
The Poisson distribution as a limit of binomial distributions
TheoremBinomial Poisson
Fix and . With ,
So when is large and is small, with moderate, the number of successes is approximately Poisson with .
ProofMass at 0, then the remaining factors (Hajek)
Step 1: . , using . So .
Step 2: general . Rearranging,
∎
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 and small , hence nearly Poisson. Only one parameter, , survives the limit, and it is usually estimated from data.
TheoremMean and variance
ProofShift the index (Ross)
with . The same shift gives .
Consistency check: the approximating binomial has mean and variance .
∎
FormulaRecursion
This is how calculators compute Poisson tails (e.g. for , and for ).
ExamplePoisson computations (Ross)
- Typos: per page gives .
- Defectives: each of 10 items is defective with probability .1. is exactly , and the Poisson(1) approximation gives .
- α-particles: 3.2 per second on average, so .
The Poisson paradigm
TheoremPoisson paradigm (Ross)
Let events have probabilities . If every is small and the events are independent or only weakly dependent, the number that occur is approximately Poisson with mean .
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 = person gets their own hat. and : dependent, but only barely. The paradigm predicts Poisson(1) matches, and indeed (conditional-probability-and-independence).
ExampleBirthdays, pairs and triples (Ross)
Pairs. Make a trial for each of the pairs, a success if the pair shares a birthday, with probability . These events are even pairwise independent. So which is below iff , i.e. . That matches the exact answer in probability-foundations.
Triples. The exact combinatorics are hard, but the paradigm is easy. Each of the triples shares a birthday with probability , so
which drops below once , i.e. .
ExampleThe longest run of heads (Ross)
Flip a coin with heads probability times. What is the chance of a run of consecutive heads?
The naive events fail. Let = flips are all heads. Each has small probability , but , which is far larger. The dependence is too strong.
The fix: count runs by their ends. Let = flips are heads and flip is a tail (), plus = the last flips are heads. Overlapping are now mutually exclusive, and non-overlapping ones are independent. So the count is approximately Poisson with mean , and with the longest run,
Fair coin. . With (an integer), :
| prob. | .0183 | .1170 | .2325 | .2387 | .1723 | .1037 | .0569 | .0298 | .0308 |
However large is, the longest run is within 2 of with probability about .86.
DerivationThe longest run exactly: inclusion–exclusion and a recursion (Ross)
Inclusion–exclusion. An intersection of ‘s is 0 if their flip sets overlap. Otherwise it is (without the last event) or (with it). Counting non-overlapping placements as arrangements of blocks and free flips gives
A faster recursion. Let . Condition on when the first tail appears (flip ), or on the first flips all being heads:
For and a fair coin: and . Check: 8 of the 16 sequences of 4 flips contain HH.
The Poisson process
DefinitionPoisson process with rate (Ross §4.7)
Events occur at random times, with:
- ;
- ;
- counts in non-overlapping intervals are independent.
Here means any with .
TheoremCounts are Poisson
Under 1–3, the number of events in any interval of length satisfies
is the long-run rate of events per unit time.
ProofChop into tiny intervals
Step 1: Split. (disjoint), where = ” subintervals contain exactly one event, the rest none” and = ” and some subinterval contains two or more.”
Step 2: is negligible. By Boole’s inequality and assumption 2,
Step 3: is binomial. By assumptions 1 and 3,
Since , the binomial-to-Poisson limit gives .
∎
IntuitionA Bernoulli process in continuous time
Each subinterval is one Bernoulli trial with success probability about . Letting 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: Poisson(4), so .
- Time to the next one: iff there are no events in , so . 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 be the time of the -th event of a Poisson process with rate . Then
This is the gamma or -Erlang distribution. For it is the exponential.
ProofArrival by iff at least counts by
Step 1: Swap waiting for counting. , so
Step 2: Differentiate term by term.
The sums telescope, leaving only the term of the first.
∎
ImportantDiscrete and continuous twins
| Bernoulli process (discrete time) | Poisson process (continuous time) |
|---|---|
| binomial count in trials | Poisson count in time |
| geometric gap between successes | exponential gap between events |
| negative binomial time of the -th success | Erlang time of the -th event |
The general gamma family, with non-integer shape, is in continuous-random-variables-and-distributions.
Quick reference
| Object | Statement | Note |
|---|---|---|
| Random variable | ; is an event | indicator for events |
| pmf | , | determines all |
| cdf | nondecreasing step function | |
| Dice | sum ; max | |
| Coupons | inclusion–exclusion | |
| Mean | balance point | |
| Indicator | ||
| LOTUS | group by value of | |
| Linearity | no independence needed | |
| Newsvendor | stock until the cdf reaches | |
| Variance | die: | |
| Scaling | standardize: | |
| Jensen-type | friendship paradox | |
| Size bias | random student / friend ⇒ larger average | |
| Bernoulli | ; mean ; variance | |
| Binomial | ; mean ; variance | sum of Bernoullis |
| Sum of indicators (9.1) | no independence needed | |
| Binomial mode | ratio | |
| Recursion (6.3) | compute the cdf | |
| Majority systems | beats iff | factor |
| Voter power | pivotal chance | |
| Chuck-a-luck | ||
| Best of seven | at | |
| Geometric | ; tail | counts trials, |
| Geometric moments | mean ; variance | first-step analysis |
| Memoryless | constant hazard | |
| Coupon collector | sum of geometrics | |
| Bernoulli process | , , , determine each other | |
| Negative binomial | , | sum of geometrics |
| NB moments | mean ; variance | 4 ones on a die: 24, 120 |
| Banach matches | NB with | |
| Union bound | gap ; tight for rare events | |
| Parallel / series | / | |
| Networks C vs D | vs | count minimum cuts |
| Bridge E | condition on the bridge link | |
| Flow capacity | pmf by enumerating states | = outage |
| Array code | rectangles of 4 errors | |
| Single backup | days years | nested geometrics |
| Hazard | ; | constant ⇒ geometric/exponential |
| Poisson | ; mean = variance = | limit of binomial |
| Poisson recursion | ||
| Poisson paradigm | many rare, weakly dependent events ⇒ Poisson | birthdays: 23 for pairs, 84 for triples |
| Longest run | (fair coin) | |
| Poisson process | Poisson, independent increments | exponential gaps |
| Erlang | ||
| Sum over outcomes | gives | |
| Hypergeometric | ; mean ; variance | ≈ binomial when |
| Capture–recapture | ML estimate | |
| Zeta | 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 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. with no independence. Combined with , this turns counting questions into sums of probabilities. Products are different: needs independence, and in general.
- Variance is the price of squaring. It is invariant under shifts and scales by . It is computed as , and it is nonnegative, which is exactly . 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: .
- Linearity plus indicators does most of the work. The means of the binomial (), negative binomial () and coupon collector () 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 has . Averages alone badly understate the risk of very long waits.
- In reliability, series adds and parallel multiplies. For small failure probabilities, outage (number of minimum-size cuts) × . 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 . 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 . For small samples from large populations the difference disappears.
References
- Hajek, Probability with Engineering Applications (ECE 313 notes) — chapter 2, §§2.1–2.2, 2.4.3–2.7, 2.10 (total expectation), 2.12
- Ross, A First Course in Probability — chapter 4, §§4.1–4.9; §5.6.1 (Erlang)
Mentioned in
- Concentration Inequalities, the Law of Large Numbers, and the Central Limit Theorem
- Concentration of Measure for Bandits
- Conditional Probability, Independence, and Bayes' Formula
- Continuous-Type Random Variables and Their Distributions
- Jointly Distributed Random Variables
- Network Information Theory
- Parameter Estimation and Binary Hypothesis Testing
- Stochastic Processes, Markov Chains, and Stochastic Bandits