Chapter 05
Medium

Discrete Random Variables

00 · Symbol Glossary

$X:\Omega\to\mathbb{R}$X — random variable

A function that assigns a real number to each outcome ω∈Ω\omega\in\Omega. Nothing about XX itself is random; the randomness lives in which ω\omega occurs. XX is discrete when its set of possible values is countable.

$\{X\in B\}$Event generated by X

Shorthand for {ω∈Ω:X(ω)∈B}\{\omega\in\Omega : X(\omega)\in B\}, the set of outcomes on which XX lands in BB. This is an event, so it has a probability; XX alone does not.

$p_X(x)$p sub X — probability mass function (PMF)

pX(x)=P(X=x)p_X(x)=\mathbb{P}(X=x). Non-negative, positive at only countably many points, and summing to 11. For a discrete XX it determines every probability statement about XX.

$\mathrm{supp}(X)$Support of X

The set of values carrying positive mass, supp(X)={x:pX(x)>0}\mathrm{supp}(X)=\{x : p_X(x)>0\}. Sums over "all xx" are really sums over the support.

$F_X(x)$F sub X — cumulative distribution function (CDF)

FX(x)=P(X≤x)F_X(x)=\mathbb{P}(X\le x). For discrete XX it is a right-continuous step function whose jump at xx equals pX(x)p_X(x). The value at a jump includes the mass at that point.

$\mathbf{1}_A$Indicator of event A

The random variable equal to 11 on AA and 00 off AA. Default flags, digital payoffs, and "did the price go up" switches are all indicators.

$X\stackrel{d}{=}Y$X equal to Y in distribution

XX and YY have the same PMF (equivalently, the same CDF). They need not be the same function of ω\omega, and they need not move together.

$p_{X,Y}(x,y)$Joint PMF of X and Y

pX,Y(x,y)=P(X=x, Y=y)p_{X,Y}(x,y)=\mathbb{P}(X=x,\,Y=y), the probability that both values occur together. The marginal PMFs do not determine it. Used here to define independence and the law of a sum; the full theory is Chapter 10.

$p_{X+Y}(z)$PMF of the sum

Probability that X+YX+Y equals zz. Always a sum of joint masses along the pairs with x+y=zx+y=z. If XX and YY are independent, those joint masses factor and the formula becomes a convolution.


01 · From Outcomes to Numbers

Chapters 01–04 worked with events: yes/no statements such as "day 1 is up" or "the borrower defaults." Markets ask quantitative questions instead. How many of the next five days close up? How many names in a credit basket default? What does an option pay? Each answer is a number that depends on the outcome, and that is all a random variable is.

Definition — Discrete Random Variable

A random variable on a probability space (Ω,P)(\Omega,\mathbb{P}) is a function X:Ω→RX:\Omega\to\mathbb{R}. It is discrete if its range X(Ω)={X(ω):ω∈Ω}X(\Omega)=\{X(\omega):\omega\in\Omega\} is countable — finite, or listable as x1,x2,x3,…x_1,x_2,x_3,\ldots

Plain language: you have already built the experiment. A random variable is a numerical readout of how it came out.

Example — The two-day up-count

Take the uniform two-day model Ω={UU,UD,DU,DD}\Omega=\{UU,UD,DU,DD\} from Chapter 01, each outcome probability 1/41/4, and let NN be the number of up days. As a function on outcomes,

N(UU)=2,N(UD)=1,N(DU)=1,N(DD)=0N(UU)=2, \qquad N(UD)=1, \qquad N(DU)=1, \qquad N(DD)=0

NN is discrete with range {0,1,2}\{0,1,2\}. Two different outcomes, UDUD and DUDU, map to the same value: a random variable usually forgets information about ω\omega. That loss is deliberate — a position whose payoff depends only on the up-count does not care about the order. Chapter 02 already used this: merging UDUD and DUDU into one bucket is how the count gets probability 1/21/2 rather than 1/41/4.

Discreteness is a property of the range of XX, not of Ω\Omega. Let Ω\Omega be all infinite up/down sequences (an uncountable set) and let TT be the first day with a down move. TT takes values in {1,2,3,…}\{1,2,3,\ldots\}, which is countable, so TT is discrete even though the outcome space is enormous.

Which functions are allowed

On a countable Ω\Omega every subset is an event, so every function X:Ω→RX:\Omega\to\mathbb{R} is a legitimate random variable. On uncountable spaces one must also require that sets like {X≤x}\{X\le x\} be events — the measurability condition. Chapter 06 meets it with continuous random variables; for the discrete examples here it never bites.


02 · Events Generated by a Random Variable

A random variable converts questions about numbers into questions about outcomes. For any set of reals BB, collect the outcomes that land in it:

{X∈B}={ω∈Ω:X(ω)∈B}=X−1(B)\{X\in B\} = \{\omega\in\Omega : X(\omega)\in B\} = X^{-1}(B)

This is the preimage of BB, and it is an ordinary event. Every probability statement about XX is a probability of such a preimage: P(X=3)\mathbb{P}(X=3) means P({ω:X(ω)=3})\mathbb{P}(\{\omega : X(\omega)=3\}), and P(X>0)\mathbb{P}(X>0) means P({ω:X(ω)>0})\mathbb{P}(\{\omega : X(\omega)>0\}).

Preimages respect set operations, which is why the axioms of Chapter 02 transfer to statements about XX:

{X∈B}c={X∈Bc},{X∈B1}∩{X∈B2}={X∈B1∩B2}\{X\in B\}^c = \{X\in B^c\}, \qquad \{X\in B_1\}\cap\{X\in B_2\} = \{X\in B_1\cap B_2\}

and similarly for unions. In particular, the events {X=x}\{X=x\} for distinct values xx are disjoint and together cover Ω\Omega — they partition the outcome space by the value of XX.

Example — At least one up day

For the two-day up-count, {N≥1}={UU,UD,DU}\{N\ge 1\}=\{UU,UD,DU\}, so P(N≥1)=3/4\mathbb{P}(N\ge 1)=3/4. Equivalently, {N≥1}={N=0}c={DD}c\{N\ge 1\}=\{N=0\}^c=\{DD\}^c, giving 1−1/41-1/4. The complement rule for events is the complement rule for values of NN.

❌ Writing the probability of a random variable

A student writes "P(N)=1\mathbb{P}(N)=1" for the up-count, meaning "the probability of NN is 11."

Why it breaks: P\mathbb{P} eats events, not functions. NN is a rule mapping outcomes to numbers; it has no probability. What has a probability is a statement about its value — {N=1}\{N=1\}, {N≤1}\{N\le 1\}, {N∈{0,2}}\{N\in\{0,2\}\}.

Consequence: the ambiguity hides real errors. "P(N)\mathbb{P}(N)" could mean P(N=1)=1/2\mathbb{P}(N=1)=1/2, P(N≥1)=3/4\mathbb{P}(N\ge 1)=3/4, or nothing at all. Always write the event inside the brackets. The same slip shows up in contracts: "the probability of the call" is not a number until you say which event about the payoff you mean.


03 · The Probability Mass Function

Because the events {X=x}\{X=x\} partition Ω\Omega, the probabilities of individual values tell you everything about the distribution of a discrete XX.

Definition — PMF and Support

The probability mass function of a discrete random variable XX is

pX(x)=P(X=x),x∈Rp_X(x)=\mathbb{P}(X=x), \qquad x\in\mathbb{R}

Its support is supp(X)={x:pX(x)>0}\mathrm{supp}(X)=\{x : p_X(x)>0\}, a countable set. Every PMF satisfies

pX(x)≥0 for all x,∑x∈supp(X)pX(x)=1p_X(x)\ge 0 \ \text{for all } x, \qquad \sum_{x\in\mathrm{supp}(X)} p_X(x)=1

and for any set of reals BB,

P(X∈B)=∑x∈BpX(x)\mathbb{P}(X\in B)=\sum_{x\in B} p_X(x)

Plain language: list the values that can actually occur, put a probability on each, and check that the list adds to one. Any question about XX is answered by adding the entries that qualify.

The last formula is countable additivity (Chapter 02) applied to the disjoint pieces {X=x}\{X=x\}, x∈Bx\in B. It is the working tool of this chapter.

Conversely, any function pp that is non-negative, positive at countably many points, and sums to 11 is the PMF of some random variable: take Ω=supp(p)\Omega=\mathrm{supp}(p), assign P({x})=p(x)\mathbb{P}(\{x\})=p(x), and let X(ω)=ωX(\omega)=\omega. That is why later chapters can introduce a distribution by writing down its PMF without ever mentioning Ω\Omega. If a proposed list sums to 0.950.95 or to 1.051.05, it is not a PMF. Dividing through by the total is a new model, not a repair: you have silently decided that every cell was overstated by the same factor.

Step-by-step — Building a PMF from a model
1
List the outcomes and their probabilities. Uniform two-day model: each of UU,UD,DU,DDUU,UD,DU,DD has probability 1/41/4.
2
Evaluate XX on each outcome. Up-count: 2,1,1,02,1,1,0.
3
Group outcomes by value and add. pN(0)=P({DD})=1/4p_N(0)=\mathbb{P}(\{DD\})=1/4, pN(1)=P({UD,DU})=1/2p_N(1)=\mathbb{P}(\{UD,DU\})=1/2, pN(2)=P({UU})=1/4p_N(2)=\mathbb{P}(\{UU\})=1/4.
4
Check the total. 1/4+1/2+1/4=11/4+1/2+1/4=1. If the masses do not sum to 11, an outcome was missed or double-counted. Do not quote probabilities from the list until this check passes.
Example — Waiting for the first down day

Suppose each trading day is up or down with probability 1/21/2, independently across days (Chapter 04), and let TT be the first day that closes down. The event {T=k}\{T=k\} is "up on days 1,…,k−11,\ldots,k-1, then down on day kk," so mutual independence gives

pT(k)=(12)k−1⋅12=(12)k,k=1,2,3,…p_T(k)=\left(\tfrac12\right)^{k-1}\cdot\tfrac12=\left(\tfrac12\right)^{k}, \qquad k=1,2,3,\ldots

The support is infinite but countable, and the geometric series confirms ∑k≥12−k=1\sum_{k\ge 1} 2^{-k}=1. The single path that never goes down has probability 00, so it does not disturb the total. Waiting-time laws of this shape are named and parameterized in Chapter 08.

One consequence is worth seeing before the name arrives. P(T>n)=P(first n days are up)=2−n\mathbb{P}(T>n)=\mathbb{P}(\text{first } n \text{ days are up})=2^{-n}. After kk up days you are conditioning on {T>k}\{T>k\}, and independence of the later days gives

P(T>k+m∣T>k)=2−(k+m)2−k=2−m=P(T>m)\mathbb{P}(T>k+m\mid T>k)=\frac{2^{-(k+m)}}{2^{-k}}=2^{-m}=\mathbb{P}(T>m)

The time already spent waiting does not change the distribution of the remaining wait. Chapter 08 records this as the memoryless property of the geometric distribution; the only ingredients here are the product rule and the definition of conditional probability.

Same distribution, different random variable

In the two-day model let D=2−ND=2-N count the down days. Then pD(0)=1/4p_D(0)=1/4, pD(1)=1/2p_D(1)=1/2, pD(2)=1/4p_D(2)=1/4 — exactly the PMF of NN, written N=dDN\stackrel{d}{=}D. Yet NN and DD are different functions: on UUUU, N=2N=2 and D=0D=0. A long position paying on up days and a short position paying on down days can have identical payoff distributions while never paying out together. The PMF describes how often each value occurs, not on which outcomes. Hedging needs the joint behavior, which a pair of matching marginals does not provide (Section 07).


04 · The CDF as a Step Function

A second way to package the same information is to accumulate mass from the left.

Definition — Cumulative Distribution Function

The CDF of XX is FX(x)=P(X≤x)F_X(x)=\mathbb{P}(X\le x) for every real xx. For discrete XX,

FX(x)=∑k∈supp(X), k≤xpX(k)F_X(x)=\sum_{k\in\mathrm{supp}(X),\ k\le x} p_X(k)

FXF_X is non-decreasing, right-continuous, tends to 00 as x→−∞x\to-\infty and to 11 as x→+∞x\to+\infty. It is flat between support points and jumps by pX(x)p_X(x) at each support point xx. Right-continuous means the value at the jump includes the mass: FX(x)F_X(x) equals the height of the step after the jump, not before it.

Example — CDF of the up-count

For the two-day NN,

FN(x)={0x<0140≤x<1341≤x<21x≥2F_N(x)=\begin{cases} 0 & x < 0 \\ \tfrac14 & 0\le x < 1 \\ \tfrac34 & 1\le x < 2 \\ 1 & x\ge 2 \end{cases}

The jumps at 0,1,20,1,2 have heights 1/4,1/2,1/41/4,1/2,1/4 — the PMF, read off the staircase. Between support points nothing happens: FN(1.5)=FN(1)=3/4F_N(1.5)=F_N(1)=3/4.

Intervals come from differences, but the endpoints matter because a discrete XX puts positive mass on single points:

P(a<X≤b)=FX(b)−FX(a),P(X=b)=FX(b)−FX(b−)\mathbb{P}(a < X \le b)=F_X(b)-F_X(a), \qquad \mathbb{P}(X=b)=F_X(b)-F_X(b^-)

where FX(b−)F_X(b^-) is the limit from the left. For the up-count, P(N<1)=FN(1−)=1/4\mathbb{P}(N < 1)=F_N(1^-)=1/4 but P(N≤1)=FN(1)=3/4\mathbb{P}(N\le 1)=F_N(1)=3/4; swapping a strict and a weak inequality moves half the probability. Chapter 06 shows that for continuous random variables this distinction disappears, and the CDF becomes the object that treats both cases in one language.

❌ Reading a digital off the wrong side of a jump

A contract pays 11 if the up-count satisfies N≤1N\le 1. Someone reads a CDF chart "just to the left of 11" and prices the contract at 1/41/4.

Why it breaks: FNF_N is right-continuous. The left-hand height at 11 is P(N<1)=1/4\mathbb{P}(N<1)=1/4. The contract N≤1N\le 1 includes the atom at 11, so its probability is FN(1)=3/4F_N(1)=3/4. The two contracts N<1N<1 and N≤1N\le 1 differ by pN(1)=1/2p_N(1)=1/2.

Consequence: on a discrete underlier — a quoted price in ticks, a default count, a number of breaches — "strictly above the strike" and "at or above the strike" are different events whenever the strike is a possible value. Continuous models hide the gap because every single point has probability 00. A term sheet that says "greater than KK" rather than "at least KK" is choosing a side of the atom, and the PMF says what that choice is worth.


05 · Indicator Random Variables

The simplest non-constant random variable takes only the values 00 and 11. It is also the most useful one in credit and derivatives work.

Definition — Indicator

For an event AA, the indicator of AA is

1A(ω)={1ω∈A0ω∉A\mathbf{1}_A(\omega)=\begin{cases} 1 & \omega\in A \\ 0 & \omega\notin A \end{cases}

Its PMF is p(1)=P(A)p(1)=\mathbb{P}(A) and p(0)=1−P(A)p(0)=1-\mathbb{P}(A). A random variable with this two-point PMF is called Bernoulli with parameter P(A)\mathbb{P}(A). Chapter 08 puts that name in a family of standard distributions; the object itself is just an event rewritten as a number.

Indicators turn set algebra into ordinary arithmetic, which is what makes them easy to compute with:

1Ac=1−1A,1A∩B=1A 1B,1A∪B=1A+1B−1A1B,1A2=1A\mathbf{1}_{A^c}=1-\mathbf{1}_A, \qquad \mathbf{1}_{A\cap B}=\mathbf{1}_A\,\mathbf{1}_B, \qquad \mathbf{1}_{A\cup B}=\mathbf{1}_A+\mathbf{1}_B-\mathbf{1}_A\mathbf{1}_B, \qquad \mathbf{1}_A^2=\mathbf{1}_A

The union identity is inclusion–exclusion from Chapter 02, now holding outcome by outcome rather than only after taking probabilities. The product identity is why Chapter 04's independence of events will become independence of random variables in Section 07: the event A∩BA\cap B is exactly the event that the product of the indicators equals 11.

Example — Default indicators and digital payoffs

Default flag. For a loan, D=1{default before maturity}D=\mathbf{1}_{\{\text{default before maturity}\}} is Bernoulli with parameter equal to the default probability. A lender's loss given a fixed exposure EE and recovery rate RR is (1−R)E⋅D(1-R)E\cdot D: a constant times an indicator.

Digital payoff. A cash-or-nothing call with strike KK pays a fixed amount QQ at maturity if the underlying finishes strictly above the strike: payoff Q 1{ST>K}Q\,\mathbf{1}_{\{S_T>K\}}. Its payoff has a two-point PMF with masses P(ST>K)\mathbb{P}(S_T>K) at QQ and P(ST≤K)\mathbb{P}(S_T\le K) at 00. Replacing the strict inequality with ≥\ge moves the atom at KK from the zero payoff into the paying payoff, which Section 04 showed can be a large change.

Up-day switch. In the two-day model, U1=1{day 1 up}U_1=\mathbf{1}_{\{\text{day 1 up}\}} and U2=1{day 2 up}U_2=\mathbf{1}_{\{\text{day 2 up}\}} are each Bernoulli with parameter 1/21/2. The days are independent events, so the indicators will be independent random variables.

Counting is adding indicators. The up-count is N=U1+U2N=U_1+U_2 — check it on each outcome: on UDUD, U1=1U_1=1 and U2=0U_2=0, so N=1N=1. In general, the number of up days in nn days, the number of defaults in a basket of nn loans, or the number of exceedances of a risk limit are all sums

N=1A1+1A2+⋯+1AnN=\mathbf{1}_{A_1}+\mathbf{1}_{A_2}+\cdots+\mathbf{1}_{A_n}

This decomposition is what makes counts tractable. Chapter 07 uses it to compute an expected count without ever finding its PMF; Chapter 08 uses it with independent indicators to build the binomial distribution. The PMF of the sum, with and without independence, is Section 08 of this chapter.

Practice — Write it with indicators

Express each as a constant, an indicator, or a sum of indicators: (a) the number of the 55 trading days in a week on which an index closes up; (b) a cash-or-nothing put paying 1010 if ST≤95S_T\le 95; (c) the number of defaults among three bonds; (d) a payoff of 11 only if both of two named borrowers default; (e) a payoff of 11 if at least one of those two borrowers defaults.


06 · Payoffs Are Functions of a Random Variable

A derivative's payoff is a function of the underlying. If XX is discrete and g:R→Rg:\mathbb{R}\to\mathbb{R} is any function, then Y=g(X)Y=g(X) is a discrete random variable — it can take at most as many values as XX does.

Definition — PMF of a Function

For Y=g(X)Y=g(X) with XX discrete,

pY(y)=P(g(X)=y)=∑x : g(x)=ypX(x)p_Y(y)=\mathbb{P}(g(X)=y)=\sum_{x\,:\,g(x)=y} p_X(x)

Each value yy collects the mass of every xx that gg sends to it. If gg is one-to-one on the support, the masses just move to new locations. If gg is flat, or folds several xx onto one yy, mass piles up.

Example — A call on a two-step tree

Start at S0=100S_0=100; each day the price multiplies by 1.11.1 (up) or 0.90.9 (down), with the uniform two-day model. Then S2=100⋅1.1N⋅0.92−NS_2=100\cdot 1.1^{N}\cdot 0.9^{2-N} takes the values 8181, 9999, 121121 with probabilities 1/41/4, 1/21/2, 1/41/4. One up and one down gives 9999, not 100100: the factors 1.11.1 and 0.90.9 do not cancel.

A call with strike 100100 pays Y=max⁡(S2−100, 0)Y=\max(S_2-100,\,0), so Y=0Y=0 when S2∈{81,99}S_2\in\{81,99\} and Y=21Y=21 when S2=121S_2=121. Collecting mass,

pY(0)=14+12=34,pY(21)=14p_Y(0)=\tfrac14+\tfrac12=\tfrac34, \qquad p_Y(21)=\tfrac14

Two values of S2S_2 merged into one value of YY. Payoff functions that are flat over a region — out-of-the-money calls, digitals, capped structures — pile mass onto a single point.

Example — A payoff that ignores the sign

Let a one-day move XX take values −1,0,1-1,0,1 with probabilities 0.3,0.4,0.30.3,0.4,0.3, and set Y=X2Y=X^2 (a toy straddle: it pays the square of the move). Then g(−1)=g(1)=1g(-1)=g(1)=1 and g(0)=0g(0)=0, so

pY(0)=0.4,pY(1)=0.3+0.3=0.6p_Y(0)=0.4, \qquad p_Y(1)=0.3+0.3=0.6

The two tails are no longer separate events. Any risk report that only stores pYp_Y can no longer tell an up move from a down move. That information was in XX, and gg deleted it.


07 · Independence of Discrete Random Variables

Chapter 04 defined independence for events. A random variable generates a whole family of events {X∈B}\{X\in B\}, so independence of random variables means independence of every event one of them generates from every event the other generates. For discrete variables, that reduces to a check on individual values.

Definition — Joint PMF and Independence

The joint PMF of discrete XX and YY is pX,Y(x,y)=P(X=x, Y=y)p_{X,Y}(x,y)=\mathbb{P}(X=x,\,Y=y), the probability of the event {X=x}∩{Y=y}\{X=x\}\cap\{Y=y\}. The variables are independent if the joint PMF factors for every pair of values:

pX,Y(x,y)=pX(x) pY(y)for all x,yp_{X,Y}(x,y)=p_X(x)\,p_Y(y) \qquad \text{for all } x,y

More generally, X1,…,XnX_1,\ldots,X_n are mutually independent if P(X1=x1,…,Xn=xn)=pX1(x1)⋯pXn(xn)\mathbb{P}(X_1=x_1,\ldots,X_n=x_n)=p_{X_1}(x_1)\cdots p_{X_n}(x_n) for every tuple of values. If in addition every XiX_i has the same PMF, the sequence is i.i.d. — independent and identically distributed. "Independent" for a family of random variables always means mutually independent unless "pairwise" is said explicitly, matching Chapter 04.

Plain language: knowing the value of XX does not change the probability of any value of YY. The joint table is the multiplication table of the two marginals.

Step-by-step — From values to all events
1
Start from the factorization. Assume pX,Y(x,y)=pX(x)pY(y)p_{X,Y}(x,y)=p_X(x)p_Y(y) for all x,yx,y, and fix sets of reals AA and BB.
2
Split the joint event into atoms. {X∈A, Y∈B}\{X\in A,\,Y\in B\} is the disjoint union of {X=x, Y=y}\{X=x,\,Y=y\} over x∈Ax\in A, y∈By\in B, so P(X∈A, Y∈B)=∑x∈A∑y∈BpX,Y(x,y)\mathbb{P}(X\in A,\,Y\in B)=\sum_{x\in A}\sum_{y\in B}p_{X,Y}(x,y).
3
Factor the double sum. Substituting the product gives (∑x∈ApX(x))(∑y∈BpY(y))=P(X∈A) P(Y∈B)\left(\sum_{x\in A}p_X(x)\right)\left(\sum_{y\in B}p_Y(y)\right)=\mathbb{P}(X\in A)\,\mathbb{P}(Y\in B).
4
Conclude. Every event generated by XX is independent of every event generated by YY, in exactly the Chapter 04 sense. The converse is immediate by taking A={x}A=\{x\} and B={y}B=\{y\}.

Two consequences connect this back to events. First, indicators: 1A\mathbf{1}_A and 1B\mathbf{1}_B are independent random variables if and only if AA and BB are independent events. The four cells of their joint PMF involve A∩BA\cap B, A∩BcA\cap B^c, Ac∩BA^c\cap B, and Ac∩BcA^c\cap B^c, and Chapter 04 showed that independence of AA and BB forces the other three pairs to factor too. Second, the mutual-independence definition for random variables needs no extra "every subcollection" clause: setting some coordinates' sets equal to R\mathbb{R} sums those variables out, so subcollections factor automatically. Applied to indicators, it recovers Chapter 04's mutual independence — and Chapter 04's pairwise-but-not-mutual coin example is three indicators that are pairwise independent random variables but not mutually independent.

The marginals are recovered by summing the joint, whether or not the variables are independent:

pX(x)=∑ypX,Y(x,y),pY(y)=∑xpX,Y(x,y)p_X(x)=\sum_y p_{X,Y}(x,y), \qquad p_Y(y)=\sum_x p_{X,Y}(x,y)

The converse operation — building a joint out of the marginals — has no unique answer. Independence is the choice that multiplies. Chapter 04's Fréchet bounds are the binary case of the same fact.

Example — Two loans with a common factor

Two loans each default with probability 5%5\%. If defaults were independent, the joint PMF of the default indicators (D1,D2)(D_1,D_2) would be the product table. A model with a shared economic factor might instead give:

D2=0D_2=0D2=1D_2=1pD1p_{D_1}
D1=0D_1=00.930.930.020.020.950.95
D1=1D_1=10.020.020.030.030.050.05
pD2p_{D_2}0.950.950.050.0511

The margins are the same 5%5\% defaults, but pD1,D2(1,1)=0.03≠0.05×0.05=0.0025p_{D_1,D_2}(1,1)=0.03\neq 0.05\times 0.05=0.0025, so D1D_1 and D2D_2 are dependent. For the default count L=D1+D2L=D_1+D_2, add the cells with the same sum:

P(L=0)\mathbb{P}(L=0)P(L=1)\mathbb{P}(L=1)P(L=2)\mathbb{P}(L=2)
Independent0.90250.90250.09500.09500.00250.0025
Common factor0.930.930.040.040.030.03

The probability that both loans default is twelve times larger under the common-factor model. That joint tail is what a basket default swap or a senior tranche is exposed to. Section 08 writes the same addition as a formula that does not depend on the table being 2×22\times 2.

❌ Building the joint distribution from the marginals

A risk desk knows each loan's default probability and computes P(both default)\mathbb{P}(\text{both default}) as the product 0.05×0.050.05\times 0.05.

Why it breaks: a joint PMF is not determined by its marginals. Both tables in the example have identical rows and columns summing to 0.950.95 and 0.050.05, yet assign 0.00250.0025 versus 0.030.03 to the joint default. Multiplying marginals is not a neutral default — it is the independence assumption, made silently. Chapter 04's bounds say the same joint can be anywhere from 00 up to 0.050.05 and still match these marginals.

Consequence: the model looks calibrated, since every individual default rate matches the data, while the joint tail is understated by an order of magnitude. Chapter 10 builds the tools for specifying and measuring dependence directly instead of assuming it away.


08 · The PMF of a Sum

Portfolio P&L, a default count, and a two-day price move are all sums. The PMF of the sum is read off the joint PMF by collecting pairs.

Definition — Law of a Sum

For discrete XX and YY and any real zz,

pX+Y(z)=∑x+y=zpX,Y(x,y)=∑xpX,Y(x, z−x)p_{X+Y}(z)=\sum_{x+y=z} p_{X,Y}(x,y)=\sum_{x} p_{X,Y}(x,\,z-x)

If XX and YY are independent, the joint factors and the sum is the convolution of the marginal PMFs:

pX+Y(z)=∑xpX(x) pY(z−x)p_{X+Y}(z)=\sum_{x} p_X(x)\,p_Y(z-x)

Plain language: to get the probability of a total of zz, add the probabilities of every way of splitting zz between the two variables. Independence lets you multiply inside each split. Without independence you still add along the same splits, but you must use the joint cells, not the product.

The first formula is just partitioning. The event {X+Y=z}\{X+Y=z\} is the disjoint union of {X=x, Y=z−x}\{X=x,\,Y=z-x\} over xx, so additivity turns it into a sum of joint masses. Nothing in that step requires independence. Using the convolution when the variables move together is the mistake the loan table was built to catch: convolution reproduces the "Independent" row, and the common-factor row is the same formula with the joint cells 0.930.93, 0.020.02, 0.020.02, 0.030.03 instead of the products.

Example — Convolution of two fair indicators

Let U1,U2U_1,U_2 be the independent Bernoulli(1/21/2) up-day indicators, and let N=U1+U2N=U_1+U_2. The convolution at the three possible totals is

pN(0)=p(0)p(0)=14,pN(1)=p(0)p(1)+p(1)p(0)=12,pN(2)=p(1)p(1)=14p_N(0)=p(0)p(0)=\tfrac14, \qquad p_N(1)=p(0)p(1)+p(1)p(0)=\tfrac12, \qquad p_N(2)=p(1)p(1)=\tfrac14

which matches the PMF built outcome-by-outcome in Section 03. The check matters: when the outcome list is too long to enumerate — ten trading days, a hundred names — the convolution (or its binomial closed form in Chapter 08) is the enumeration, compressed. It is available only because the summands are independent. A common-factor book of the same marginal default rates does not get to use it.

The support of a sum can have holes

If Y=XY=X and XX takes values −1,0,1-1,0,1, then X+Y=2XX+Y=2X takes values −2,0,2-2,0,2 only. The value 11 is a possible sum of two draws from the marginal support, and it still has probability 00. "Everything in the sum of the supports can occur" is an independence-shaped assumption. Exercise 5.4 computes both laws side by side.


09 · Preview: Expectation

A PMF is a full description; often one number is wanted. The natural summary weights each value by its probability.

Definition — Expected Value (Preview)

For discrete XX with ∑x∣x∣ pX(x)<∞\sum_x |x|\,p_X(x)<\infty, the expected value is

E[X]=∑x∈supp(X)x pX(x)\mathbb{E}[X]=\sum_{x\in\mathrm{supp}(X)} x\,p_X(x)

For a payoff Y=g(X)Y=g(X) the same definition reads E[g(X)]=∑xg(x) pX(x)\mathbb{E}[g(X)]=\sum_x g(x)\,p_X(x): weight the payoff values, not the underlying, by the underlying's probabilities. Chapter 07 proves the properties; the formula is already usable.

Three quick evaluations show why this formula earns its own chapter.

Example — Indicators, counts, and payoffs

Indicators. E[1A]=1⋅P(A)+0⋅(1−P(A))=P(A)\mathbb{E}[\mathbf{1}_A]=1\cdot\mathbb{P}(A)+0\cdot(1-\mathbb{P}(A))=\mathbb{P}(A). Probability is the expectation of an indicator; the expected payoff of a digital paying QQ if ST>KS_T>K is Q P(ST>K)Q\,\mathbb{P}(S_T>K).

Up-count. E[N]=0⋅14+1⋅12+2⋅14=1\mathbb{E}[N]=0\cdot\tfrac14+1\cdot\tfrac12+2\cdot\tfrac14=1 day up out of two.

Default count. In the common-factor table, E[L]=0⋅0.93+1⋅0.04+2⋅0.03=0.10\mathbb{E}[L]=0\cdot 0.93+1\cdot 0.04+2\cdot 0.03=0.10. Under independence, 0⋅0.9025+1⋅0.095+2⋅0.0025=0.100\cdot 0.9025+1\cdot 0.095+2\cdot 0.0025=0.10 as well. Both equal 0.05+0.050.05+0.05, the sum of the indicator means.

The last line previews two facts proved in Chapter 07. The expectation of a sum is the sum of expectations, whether or not the terms are independent — so the two loan models share E[L]=0.10\mathbb{E}[L]=0.10 while their joint-default probabilities differ by a factor of twelve. The mean is blind to dependence. Spread around the mean, variance and higher moments, is what starts to separate them.

The call on the two-step tree shows a second blindness: nonlinearity.

❌ Pricing a call by putting the mean into the payoff

On the two-step tree, S2S_2 equals 8181, 9999, 121121 with probabilities 1/41/4, 1/21/2, 1/41/4, so

E[S2]=14⋅81+12⋅99+14⋅121=100\mathbb{E}[S_2]=\tfrac14\cdot 81+\tfrac12\cdot 99+\tfrac14\cdot 121=100

A desk prices the strike-100100 call as max⁡(E[S2]−100, 0)=0\max(\mathbb{E}[S_2]-100,\,0)=0.

Why it breaks: the payoff is Y=max⁡(S2−100, 0)Y=\max(S_2-100,\,0), and the definition requires E[Y]=∑y pY(y)=21⋅(1/4)=5.25\mathbb{E}[Y]=\sum y\,p_Y(y)=21\cdot(1/4)=5.25, not gg of the average. The average spot sits on the strike, where the call pays nothing; the average payoff is carried entirely by the atom at 121121, which the outer max⁡\max never sees if you collapse S2S_2 first.

Consequence: any payoff that is flat on part of the support and steep on another — calls, puts, caps, senior tranches — is mispriced by "plug in the forward." You weight the payoff by the PMF, or you weight the underlying and then apply a function, and those are different operations. Chapter 07 returns to this gap as Jensen's inequality for convex payoffs. The numerical fact is already here: 5.25≠05.25\neq 0.

When the sum does not converge

The absolute-convergence condition is not decoration. If pX(2k)=2−kp_X(2^k)=2^{-k} for k=1,2,…k=1,2,\ldots — a stylized payoff that doubles with each consecutive up day before the first down — then each term x pX(x)x\,p_X(x) equals 11, so ∑xx pX(x)=∞\sum_x x\,p_X(x)=\infty. A perfectly valid PMF can have no finite mean. Chapter 07 treats the condition properly. Heavy-tailed losses, and the risk measures built from them, are Chapter 15. Several limit theorems in Chapter 12 will simply refuse to start until the mean, and often the variance, is finite.


10 · Toward Continuous Random Variables

Everything above rests on one fact: a discrete XX puts positive probability on individual values, so probabilities are sums of point masses. A daily log return, a time to default measured in continuous time, or an interest rate modeled on the real line can take uncountably many values, and each single value has probability 00. Adding up zeros cannot produce 11.

Discrete (this chapter)Continuous (Chapter 06)
Mass on a pointpX(x)≥0p_X(x)\ge 0, sums to 11P(X=x)=0\mathbb{P}(X=x)=0 for every xx
Probability of a setsum of pXp_X over the setintegral of a density over the set
CDFstep function with jumpscontinuous, and usually no jumps
Strict vs weak inequalitycan differ by an atomsame probability
Sum of two variablessum of joint masses along x+y=zx+y=zan integral analogue of that sum

The CDF survives the transition unchanged in meaning, which is why it is the common language for both cases. Quoted prices move in ticks, so every observed return is technically discrete; continuous models are an approximation that trades a huge, awkward support for calculus. The approximation is good for "the probability of an interval" and bad for "the probability of this exact print," which a continuous model sets to zero and a tick model does not.


11 · Exercises

EXERCISE 5.1

List the 88 equally likely outcomes, group them by up-count, then read the CDF and tail probability off the PMF. For the indicator form, define one indicator per day.

Grouping the 88 outcomes by number of ups: one outcome has 00 ups (DDDDDD), three have 11, three have 22, one has 33. So pN(0)=1/8p_N(0)=1/8, pN(1)=3/8p_N(1)=3/8, pN(2)=3/8p_N(2)=3/8, pN(3)=1/8p_N(3)=1/8, which sums to 11.

FN(1.5)=P(N≤1.5)=P(N≤1)=1/8+3/8=1/2F_N(1.5)=\mathbb{P}(N\le 1.5)=\mathbb{P}(N\le 1)=1/8+3/8=1/2, since the CDF is flat between 11 and 22. The left limit at 22 would not be the right object for P(N≤1.5)\mathbb{P}(N\le 1.5): nothing is jumping at 1.51.5. P(N≥2)=3/8+1/8=1/2\mathbb{P}(N\ge 2)=3/8+1/8=1/2, which is 1−FN(1)1-F_N(1), not 1−FN(2)1-F_N(2).

With Ui=1{day i up}U_i=\mathbf{1}_{\{\text{day } i\text{ up}\}}, N=U1+U2+U3N=U_1+U_2+U_3. Finally E[N]=0⋅18+1⋅38+2⋅38+3⋅18=128=1.5\mathbb{E}[N]=0\cdot\tfrac18+1\cdot\tfrac38+2\cdot\tfrac38+3\cdot\tfrac18=\tfrac{12}{8}=1.5, matching E[U1]+E[U2]+E[U3]=3⋅12\mathbb{E}[U_1]+\mathbb{E}[U_2]+\mathbb{E}[U_3]=3\cdot\tfrac12.

In the uniform three-day model (88 equally likely up/down sequences), let NN be the number of up days. Find the PMF of NN, compute FN(1.5)F_N(1.5) and P(N≥2)\mathbb{P}(N\ge 2), write NN as a sum of indicators, and compute E[N]\mathbb{E}[N] from the PMF.

EXERCISE 5.2

Compute the three possible values of S2S_2 first. Check carefully whether one up and one down returns the price to 100100. Independence of the days lets you multiply daily probabilities along each path. The digital uses a strict inequality, so a finish exactly at 100100 would not pay — confirm whether any path lands there.

The paths give S2(UU)=121S_2(UU)=121, S2(UD)=S2(DU)=99S_2(UD)=S_2(DU)=99, S2(DD)=81S_2(DD)=81. With independent days, P(UU)=0.62=0.36\mathbb{P}(UU)=0.6^2=0.36, P(UD)=P(DU)=0.6⋅0.4=0.24\mathbb{P}(UD)=\mathbb{P}(DU)=0.6\cdot 0.4=0.24, P(DD)=0.16\mathbb{P}(DD)=0.16. So

pS2(121)=0.36p_{S_2}(121)=0.36, pS2(99)=0.48p_{S_2}(99)=0.48, pS2(81)=0.16p_{S_2}(81)=0.16.

The digital pays Y=1{S2>100}Y=\mathbf{1}_{\{S_2>100\}}, and only S2=121S_2=121 qualifies, so pY(1)=0.36p_Y(1)=0.36, pY(0)=0.64p_Y(0)=0.64, and E[Y]=0.36\mathbb{E}[Y]=0.36. A common slip is to count UDUD and DUDU as finishing at the strike or above; they finish at 9999, below it. No path finishes at 100100, so the strict and weak digitals agree on this tree — they would not agree on a tree that can print the strike. The put-style digital 1{S2≤100}=1−Y\mathbf{1}_{\{S_2\le 100\}}=1-Y has expectation 0.640.64, and the two expectations sum to 11.

A stock starts at S0=100S_0=100 and each day multiplies by 1.11.1 with probability 0.60.6 or by 0.90.9 with probability 0.40.4, independently across two days. Find the PMF of S2S_2. A digital option pays 11 if S2>100S_2>100 and 00 otherwise; find the PMF and expected value of its payoff, and the expected payoff of the complementary digital paying 11 if S2≤100S_2\le 100.

EXERCISE 5.3

Let q=P(D1=1, D2=1)q=\mathbb{P}(D_1=1,\,D_2=1). The row and column sums are fixed at 0.90.9 and 0.10.1, so the other three cells are determined by qq. For binary variables, one cell factoring is enough — recall from Chapter 04 that independence passes to complements.

With q=pD1,D2(1,1)q=p_{D_1,D_2}(1,1), the margins force p(1,0)=0.1−qp(1,0)=0.1-q, p(0,1)=0.1−qp(0,1)=0.1-q, and p(0,0)=1−q−2(0.1−q)=0.8+qp(0,0)=1-q-2(0.1-q)=0.8+q. All cells are non-negative exactly when 0≤q≤0.10\le q\le 0.1. That interval is Chapter 04's Fréchet bound for two events of probability 0.10.1: the joint cannot exceed the smaller marginal, and the lower bound max⁡(0,0.1+0.1−1)\max(0,0.1+0.1-1) is 00.

Independence requires q=0.1×0.1=0.01q=0.1\times 0.1=0.01. That single condition suffices: it says the events {D1=1}\{D_1=1\} and {D2=1}\{D_2=1\} are independent, and Chapter 04's complement result then makes the complementary pairs independent as well, so all four cells factor.

For L=D1+D2L=D_1+D_2: P(L=2)=q\mathbb{P}(L=2)=q, P(L=1)=0.2−2q\mathbb{P}(L=1)=0.2-2q, P(L=0)=0.8+q\mathbb{P}(L=0)=0.8+q. Then E[L]=(0.2−2q)+2q=0.2\mathbb{E}[L]=(0.2-2q)+2q=0.2 for every admissible qq. The probability of a double default ranges from 00 (defaults never coincide) to 0.10.1 (they always coincide), a factor of ten either side of the independent value 0.010.01, while the expected count never moves.

Two bonds each default with probability 0.10.1; let D1,D2D_1,D_2 be their default indicators. (a) Write the full joint PMF in terms of q=P(D1=1, D2=1)q=\mathbb{P}(D_1=1,\,D_2=1) and find the admissible range of qq. (b) For which qq are D1D_1 and D2D_2 independent, and why does checking one cell suffice? (c) Find the PMF and expected value of the default count L=D1+D2L=D_1+D_2 as functions of qq, and explain what the result says about using the mean alone to judge joint default risk.

EXERCISE 5.4

Under independence, list every pair (x,y)(x,y) with x+y=zx+y=z and multiply the marginals. The marginal is 0.20.2 at −1-1, 0.50.5 at 00, 0.30.3 at 11. If instead Y=XY=X, the only pairs with positive probability lie on y=xy=x, so odd totals get probability 00. The mean can be computed from the finished PMF, and also as E[X]+E[Y]\mathbb{E}[X]+\mathbb{E}[Y], which does not need independence.

Write p(−1)=0.2p(-1)=0.2, p(0)=0.5p(0)=0.5, p(1)=0.3p(1)=0.3. Independence gives

pZ(2)=0.3⋅0.3=0.09p_Z(2)=0.3\cdot 0.3=0.09,

pZ(1)=0.5⋅0.3+0.3⋅0.5=0.30p_Z(1)=0.5\cdot 0.3+0.3\cdot 0.5=0.30,

pZ(0)=0.2⋅0.3+0.5⋅0.5+0.3⋅0.2=0.37p_Z(0)=0.2\cdot 0.3+0.5\cdot 0.5+0.3\cdot 0.2=0.37,

pZ(−1)=0.2⋅0.5+0.5⋅0.2=0.20p_Z(-1)=0.2\cdot 0.5+0.5\cdot 0.2=0.20,

pZ(−2)=0.2⋅0.2=0.04p_Z(-2)=0.2\cdot 0.2=0.04.

These add to 11. Then E[Z]=2⋅0.09+1⋅0.30+(−1)⋅0.20+(−2)⋅0.04=0.20\mathbb{E}[Z]=2\cdot 0.09+1\cdot 0.30+(-1)\cdot 0.20+(-2)\cdot 0.04=0.20.

If Y=XY=X, then Z=2XZ=2X and pZ(2)=P(X=1)=0.3p_Z(2)=\mathbb{P}(X=1)=0.3, pZ(0)=0.5p_Z(0)=0.5, pZ(−2)=0.2p_Z(-2)=0.2, with pZ(1)=pZ(−1)=0p_Z(1)=p_Z(-1)=0. The mean is 2⋅0.3+(−2)⋅0.2=0.202\cdot 0.3+(-2)\cdot 0.2=0.20 again. So P(Z=2)\mathbb{P}(Z=2) jumps from 0.090.09 to 0.30.3, the odd values disappear, and the expectation does not move. Convolution was legal only in the first calculation. The second used the joint masses on the diagonal y=xy=x, which is the general sum formula of Section 08, not the convolution.

Let XX and YY each take values −1,0,1-1,0,1 with probabilities 0.2,0.5,0.30.2,0.5,0.3. (a) If XX and YY are independent, find the full PMF of Z=X+YZ=X+Y and compute E[Z]\mathbb{E}[Z]. (b) If instead Y=XY=X on every outcome, find the PMF of ZZ and E[Z]\mathbb{E}[Z] again. (c) Which of the two calculations is a convolution, and what does the comparison say about using E[Z]\mathbb{E}[Z] as a summary of two-day move risk?


12 · Chapter Summary

ConceptMeaning
Discrete random variablefunction X:Ω→RX:\Omega\to\mathbb{R} with countable range
Event {X∈B}\{X\in B\}preimage of BB; the only thing P\mathbb{P} applies to
PMF pXp_XP(X=x)\mathbb{P}(X=x); non-negative and sums to 11 over the support
CDF FXF_XP(X≤x)\mathbb{P}(X\le x); right-continuous step, jump at xx equals pX(x)p_X(x)
Strict vs weakat an atom, X<bX<b and X≤bX\le b differ by pX(b)p_X(b)
Indicator 1A\mathbf{1}_ABernoulli with parameter P(A)\mathbb{P}(A); counts are sums of indicators
Function g(X)g(X)masses that gg sends to the same value are added
Independencejoint PMF factors at every pair of values; i.i.d. means that plus a common PMF
Marginals vs jointthe same marginals can hide very different joint tails
Law of a sumadd joint mass along x+y=zx+y=z; convolution only if independent
E[X]\mathbb{E}[X] (preview)∑x pX(x)\sum x\,p_X(x) when absolutely convergent; E[g(X)]\mathbb{E}[g(X)] weights g(x)g(x), not gg of the mean
Equal in distributionsame PMF, not necessarily the same outcomes

Next: Chapter 06 — Continuous Random Variables (coming soon), which replaces point masses with densities and sums with integrals, keeping the CDF as the shared language. Chapter 07 then develops expectation, variance, and moments for both cases.