Discrete Random Variables and Distributions

⚡ Key Takeaways

One-line: A discrete random variable maps outcomes of a random experiment to isolated numerical values, and its distribution assigns a probability to each value via a probability mass function (PMF).

Key result in words: The behaviour of any discrete random variable is completely determined by its PMF, which must be non-negative and sum to one; from it we compute every probability, expectation, variance, and moment.

Where it applies: Counting problems, success/failure trials, arrival counts, queueing, genetics, reliability, machine learning classification, and any setting with countably many distinguishable outcomes.

Who/when: Foundations laid by Pascal & Fermat (1654), Jacob Bernoulli (1713), Siméon Poisson (1837), with the modern measure-theoretic framework by Kolmogorov (1933).

💡 The Core Insight

A discrete random variable is fully captured by a list of (value, probability) pairs. Every question you can ask — "what is the chance XX exceeds 3?", "what is its average?", "how spread out is it?" — is just a weighted sum over that list. The PMF is the master object; everything else (CDF, mean, variance, moment generating function) is derived from it by summation.

Formal Statement

DefinitionRandom Variable and Discreteness

Let (Ω,F,P)(\Omega, \mathcal{F}, P) be a probability space. A random variable is a measurable function X:Ω→RX : \Omega \to \mathbb{R}, meaning that for every real xx, the set {ω∈Ω:X(ω)≤x}\{\omega \in \Omega : X(\omega) \le x\} belongs to F\mathcal{F}. XX is discrete if its image (range) is a finite or countably infinite set X={x1,x2,x3,… }⊂R\mathcal{X} = \{x_1, x_2, x_3, \dots\} \subset \mathbb{R}.

  • Ω\Omega — sample space (set of all outcomes)
  • F\mathcal{F} — σ\sigma-algebra of events
  • PP — probability measure, P:F→[0,1]P:\mathcal{F}\to[0,1]
  • X(ω)X(\omega) — the numerical value assigned to outcome ω\omega
  • X\mathcal{X} — the (countable) support of XX
DefinitionProbability Mass Function

The probability mass function (PMF) of a discrete random variable XX is

1
pX(x)=P(X=x)=P({ω:X(ω)=x}).\quad p_X(x) = P(X = x) = P\big(\{\omega : X(\omega) = x\}\big).

Derivation hint: this is just the probability measure PP evaluated on the event {X=x}\{X = x\}, the preimage X−1({x})X^{-1}(\{x\}). A valid PMF satisfies two axioms:

2
pX(x)≥0  ∀x,∑x∈XpX(x)=1.\quad p_X(x) \ge 0 \ \ \forall x, \qquad \sum_{x \in \mathcal{X}} p_X(x) = 1.

Derivation hint: non-negativity comes from P≥0P \ge 0; the sum is P(Ω)=1P(\Omega)=1 because the events {X=xi}\{X=x_i\} partition Ω\Omega (countable additivity). For any subset A⊆RA \subseteq \mathbb{R},

3
P(X∈A)=∑x∈A∩XpX(x).\quad P(X \in A) = \sum_{x \in A \cap \mathcal{X}} p_X(x).

Derivation hint: {X∈A}\{X\in A\} is the disjoint union over x∈A∩Xx\in A\cap\mathcal X of {X=x}\{X=x\}; apply countable additivity.

DefinitionCumulative Distribution Function

The cumulative distribution function (CDF) is

4
FX(x)=P(X≤x)=∑xi≤xpX(xi).\quad F_X(x) = P(X \le x) = \sum_{x_i \le x} p_X(x_i).

Derivation hint: {X≤x}=⋃xi≤x{X=xi}\{X\le x\}=\bigcup_{x_i\le x}\{X=x_i\}, a disjoint union; sum the masses. For a discrete variable, FXF_X is a right-continuous, non-decreasing step function with jumps of size pX(xi)p_X(x_i) at each xix_i. The PMF is recovered by

5
pX(xi)=FX(xi)−FX(xi−)=FX(xi)−lim⁡t↑xiFX(t).\quad p_X(x_i) = F_X(x_i) - F_X(x_i^-) = F_X(x_i) - \lim_{t\uparrow x_i} F_X(t).

Derivation hint: the jump at xix_i equals P(X≤xi)−P(X<xi)=P(X=xi)P(X\le x_i)-P(X<x_i)=P(X=x_i).

DefinitionExpectation, Variance, Moments

The expected value (mean) of XX, when the sum converges absolutely, is

6
E[X]=μ=∑x∈Xx pX(x).\quad \mathbb{E}[X] = \mu = \sum_{x \in \mathcal{X}} x\, p_X(x).

Derivation hint: a probability-weighted average; it is the Lebesgue integral ∫X dP\int X\,dP reduced to a sum for the discrete case. For a function gg, the Law of the Unconscious Statistician gives

7
E[g(X)]=∑x∈Xg(x) pX(x).\quad \mathbb{E}[g(X)] = \sum_{x \in \mathcal{X}} g(x)\, p_X(x).

Derivation hint: group outcomes by the value of XX; one need not first find the PMF of g(X)g(X). The variance measures spread:

8
Var(X)=σ2=E[(X−μ)2]=E[X2]−μ2.\quad \mathrm{Var}(X) = \sigma^2 = \mathbb{E}[(X-\mu)^2] = \mathbb{E}[X^2] - \mu^2.

Derivation hint: expand (X−μ)2=X2−2μX+μ2(X-\mu)^2 = X^2 - 2\mu X + \mu^2 and use linearity of E\mathbb{E}, with E[μ]=μ\mathbb{E}[\mu]=\mu. The probability generating function (PGF), for N\mathbb{N}-valued XX, is

9
GX(s)=E[sX]=∑k=0∞sk pX(k),∣s∣≤1.\quad G_X(s) = \mathbb{E}[s^X] = \sum_{k=0}^{\infty} s^k\, p_X(k), \qquad |s|\le 1.

Derivation hint: apply [7] with g(x)=sxg(x)=s^x; derivatives at s=1s=1 recover factorial moments.

TheoremCatalogue of Standard Discrete Distributions

The principal named families, with PMF, mean, and variance:

Bernoulli(pp): pX(1)=p, pX(0)=1−pp_X(1)=p,\ p_X(0)=1-p;  μ=p, σ2=p(1−p)\ \mu=p,\ \sigma^2=p(1-p).

Binomial(n,pn,p):

10
pX(k)=(nk)pk(1−p)n−k,k=0,…,n;  μ=np, σ2=np(1−p).\quad p_X(k)=\binom{n}{k}p^k(1-p)^{n-k},\quad k=0,\dots,n;\ \ \mu=np,\ \sigma^2=np(1-p).

Derivation hint: X=∑i=1nBiX=\sum_{i=1}^n B_i of i.i.d. Bernoullis; the binomial coefficient counts arrangements of kk successes.

Geometric(pp) (trials until first success, k≥1k\ge 1):

11
pX(k)=(1−p)k−1p;  μ=1p, σ2=1−pp2.\quad p_X(k)=(1-p)^{k-1}p;\ \ \mu=\tfrac1p,\ \sigma^2=\tfrac{1-p}{p^2}.

Derivation hint: k−1k-1 failures then a success; geometric series gives normalisation and mean.

Poisson(λ\lambda):

12
pX(k)=λke−λk!,k=0,1,2,… ;  μ=λ, σ2=λ.\quad p_X(k)=\frac{\lambda^k e^{-\lambda}}{k!},\quad k=0,1,2,\dots;\ \ \mu=\lambda,\ \sigma^2=\lambda.

Derivation hint: limit of Binomial(n,λ/nn,\lambda/n) as n→∞n\to\infty; normalisation uses the series ∑λk/k!=eλ\sum \lambda^k/k! = e^{\lambda}.

Why It Holds / Derivation

ProofLinearity of Expectation and the Binomial Mean

We prove E[aX+bY]=aE[X]+bE[Y]\mathbb{E}[aX+bY]=a\mathbb{E}[X]+b\mathbb{E}[Y] and use it for the binomial.

Step 1. Let X,YX,Y be discrete with joint PMF pX,Y(x,y)p_{X,Y}(x,y). By the LOTUS [7] applied to g(x,y)=ax+byg(x,y)=ax+by:

E[aX+bY]=∑x∑y(ax+by) pX,Y(x,y).\mathbb{E}[aX+bY]=\sum_x\sum_y (ax+by)\,p_{X,Y}(x,y).

Step 2. Split the sum and factor constants:

=a∑xx∑ypX,Y(x,y)+b∑yy∑xpX,Y(x,y).= a\sum_x x\sum_y p_{X,Y}(x,y) + b\sum_y y\sum_x p_{X,Y}(x,y).

Step 3. The inner sums are the marginals: ∑ypX,Y(x,y)=pX(x)\sum_y p_{X,Y}(x,y)=p_X(x) and ∑xpX,Y(x,y)=pY(y)\sum_x p_{X,Y}(x,y)=p_Y(y). Hence

=a∑xx pX(x)+b∑yy pY(y)=aE[X]+bE[Y].= a\sum_x x\,p_X(x) + b\sum_y y\,p_Y(y) = a\mathbb{E}[X]+b\mathbb{E}[Y].

No independence was assumed.

Step 4 (Binomial mean). Write X=∑i=1nBiX=\sum_{i=1}^n B_i where Bi∼Bernoulli(p)B_i\sim\text{Bernoulli}(p). Since E[Bi]=p\mathbb{E}[B_i]=p, linearity gives E[X]=∑i=1np=np\mathbb{E}[X]=\sum_{i=1}^n p = np. ■\blacksquare

∎
ProofPoisson as a Limit of the Binomial

Step 1. Take Binomial(n,pn,p) with p=λ/np=\lambda/n held so that np=λnp=\lambda is fixed, and let n→∞n\to\infty:

pX(k)=(nk)(λn)k(1−λn)n−k.p_X(k)=\binom{n}{k}\Big(\frac{\lambda}{n}\Big)^k\Big(1-\frac{\lambda}{n}\Big)^{n-k}.

Step 2. Expand (nk)=n(n−1)⋯(n−k+1)k!\binom{n}{k}=\dfrac{n(n-1)\cdots(n-k+1)}{k!} and group:

=λkk!⋅n(n−1)⋯(n−k+1)nk⏟→ 1⋅(1−λn)n(1−λn)−k.=\frac{\lambda^k}{k!}\cdot\underbrace{\frac{n(n-1)\cdots(n-k+1)}{n^k}}_{\to\,1}\cdot\Big(1-\frac{\lambda}{n}\Big)^{n}\Big(1-\frac{\lambda}{n}\Big)^{-k}.

Step 3. As n→∞n\to\infty: the falling-factorial ratio →1\to 1, the last factor →1\to 1, and (1−λ/n)n→e−λ\big(1-\lambda/n\big)^n\to e^{-\lambda}.

Step 4. Therefore pX(k)→λke−λk!p_X(k)\to \dfrac{\lambda^k e^{-\lambda}}{k!}, the Poisson PMF [12]. ■\blacksquare

∎
SD
Siméon Denis Poisson
1781–1840

A French mathematician and physicist, Poisson introduced the distribution now bearing his name in his 1837 treatise Recherches sur la probabilité des jugements en matière criminelle et en matière civile, where he studied the number of wrongful convictions. He framed it as the limit of rare events in many independent trials — exactly the "law of small numbers." Poisson also made deep contributions to electromagnetism, elasticity, and celestial mechanics; the distribution was something of an aside in his work, yet it became one of the most-used models in all of science, governing radioactive decay counts, telephone-call arrivals, and biological mutation rates.

Building Intuition

🧠 Intuition

Picture the total probability as one kilogram of sand. A discrete distribution places the sand in distinct piles at separated points on the number line; a continuous distribution would spread it smoothly. The PMF tells you the weight of each pile. The CDF is what you get by walking left-to-right and accumulating sand — it stays flat between piles and jumps up by the pile's weight whenever you step on one, hence the staircase shape. The mean is the balance point of all the piles (a centre of mass). The variance is the average squared distance of sand from that balance point — small if the piles huddle near the mean, large if they sprawl. The Bernoulli is the atom: a single pile-pair at 0 and 1. The Binomial stacks nn such atoms; the Poisson is what the binomial becomes when each pile is tiny but there are very many — the "rare-events" regime.

Worked Examples

ExampleQuality Control — Binomial

Given: A factory produces widgets, each defective independently with probability p=0.05p=0.05. A box holds n=20n=20 widgets. Let XX = number of defectives.

Question: Find P(X=2)P(X=2), E[X]\mathbb{E}[X], Var(X)\mathrm{Var}(X), and P(X≥1)P(X\ge 1).

Steps: 1. X∼Binomial(20,0.05)X\sim\text{Binomial}(20,0.05). Using [10]:

P(X=2)=(202)(0.05)2(0.95)18=190×0.0025×0.3972=0.1887.P(X=2)=\binom{20}{2}(0.05)^2(0.95)^{18}=190\times 0.0025\times 0.3972 = 0.1887.

2. Mean: E[X]=np=20(0.05)=1.0\mathbb{E}[X]=np=20(0.05)=1.0 defectives. 3. Variance: Var(X)=np(1−p)=20(0.05)(0.95)=0.95\mathrm{Var}(X)=np(1-p)=20(0.05)(0.95)=0.95, so σ≈0.975\sigma\approx 0.975. 4. At least one defective: P(X≥1)=1−P(X=0)=1−(0.95)20=1−0.3585=0.6415.P(X\ge 1)=1-P(X=0)=1-(0.95)^{20}=1-0.3585=0.6415.

Answer:

P(X=2)≈0.189,μ=1.0,σ2=0.95,P(X≥1)≈0.642\boxed{P(X=2)\approx 0.189,\quad \mu=1.0,\quad \sigma^2=0.95,\quad P(X\ge1)\approx 0.642}
ExampleServer Requests — Poisson

Given: A web server receives requests at an average rate of λ=3\lambda=3 per second. Let XX = number of requests in a one-second window, modelled as X∼Poisson(3)X\sim\text{Poisson}(3).

Question: Find P(X=0)P(X=0), P(X≤2)P(X\le 2), and verify the variance.

Steps: 1. From [12]: P(X=0)=30e−30!=e−3=0.0498.P(X=0)=\dfrac{3^0 e^{-3}}{0!}=e^{-3}=0.0498. 2. P(X=1)=3e−3=0.1494P(X=1)=3e^{-3}=0.1494;  P(X=2)=92e−3=0.2240.\ P(X=2)=\dfrac{9}{2}e^{-3}=0.2240. 3. P(X≤2)=e−3(1+3+4.5)=e−3(8.5)=0.4232.P(X\le 2)=e^{-3}(1+3+4.5)=e^{-3}(8.5)=0.4232. 4. Variance equals the mean: Var(X)=λ=3\mathrm{Var}(X)=\lambda=3, so σ=3≈1.732\sigma=\sqrt{3}\approx 1.732 requests.

Answer:

P(X=0)≈0.0498,P(X≤2)≈0.423,σ2=3 requests2\boxed{P(X=0)\approx 0.0498,\quad P(X\le2)\approx 0.423,\quad \sigma^2=3\ \text{requests}^2}
Figure
PMF (bars) and CDF (staircase) of a Binomial(10, 0.3)
k (number of successes) probability 0 1 2 3 4 5 6 7 CDF F(k) PMF p(k) Binomial(n=10, p=0.3)

Common Misconceptions

⚠️ PMF values vs. probabilities; CDF endpoints
  • A PMF value is itself a probability, pX(x)=P(X=x)p_X(x)=P(X=x), so it must lie in [0,1][0,1]. This differs from a continuous density, where the value f(x)f(x) can exceed 1 and P(X=x)=0P(X=x)=0.
  • For discrete variables, strict vs. non-strict inequalities matter: P(X<3)≠P(X≤3)P(X<3)\ne P(X\le 3) in general — they differ by pX(3)p_X(3). Be especially careful when using FXF_X.
  • The CDF is right-continuous with the value including the jump: FX(x)=P(X≤x)F_X(x)=P(X\le x) takes the top of the step, not the bottom.
  • E[g(X)]≠g(E[X])\mathbb{E}[g(X)]\ne g(\mathbb{E}[X]) in general (Jensen's inequality); e.g. E[X2]≠(E[X])2\mathbb{E}[X^2]\ne(\mathbb{E}[X])^2 unless Var(X)=0\mathrm{Var}(X)=0.
CounterexampleA mean that does not exist

Consider XX with PMF pX(k)=6π2k2p_X(k)=\dfrac{6}{\pi^2 k^2} for k=1,2,3,…k=1,2,3,\dots (valid since ∑1/k2=π2/6\sum 1/k^2=\pi^2/6). The expectation

E[X]=∑k=1∞k⋅6π2k2=6π2∑k=1∞1k=∞\mathbb{E}[X]=\sum_{k=1}^{\infty} k\cdot\frac{6}{\pi^2 k^2}=\frac{6}{\pi^2}\sum_{k=1}^{\infty}\frac{1}{k}=\infty

diverges (harmonic series). So a perfectly legitimate discrete distribution can have no finite mean. The St. Petersburg game is the classic gambling instance: a finite, well-defined game with infinite expected payoff. Moral: "every distribution has a mean" is false; existence requires absolute convergence of [6].

Connections

connection

Discrete random variables sit inside the broader theory of Probability Measures and Sigma-Algebras, which make the word "measurable" in the definition precise. They contrast with Continuous Random Variables and Densities, where sums become integrals and PMFs become PDFs; the two are unified by the Lebesgue–Stieltjes Integral. Sums of independent discrete variables are handled by Convolution of Distributions and elegantly by the probability generating function [9]. The large-nn behaviour of binomial sums leads into the Central Limit Theorem (normal approximation) and the Law of Large Numbers. Conditional structure connects to Joint and Conditional Distributions and Bayes' Theorem.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- 1654 — Pascal and Fermat correspond on the problem of points, implicitly using binomial-coefficient counting; birth of probability.
- 1657 — Christiaan Huygens publishes De Ratiociniis in Ludo Aleae, the first printed probability text, introducing expectation.
- 1713 — Jacob Bernoulli's posthumous Ars Conjectandi states the (weak) law of large numbers and systematises the binomial distribution.
- 1738 — Abraham de Moivre derives the normal approximation to the binomial, a precursor to the CLT.
- 1837 — Siméon Poisson introduces the Poisson distribution as a limit of rare binomial events.
- 1860s–1870s — Maxwell and Boltzmann use discrete counting in statistical mechanics; later the Bose–Einstein and Fermi–Dirac statistics.
- 1898 — Ladislaus Bortkiewicz publishes Das Gesetz der kleinen Zahlen, fitting the Poisson to deaths by horse-kick in the Prussian army — a famous empirical validation.
- 1933 — Andrey Kolmogorov's Grundbegriffe der Wahrscheinlichkeitsrechnung gives the axiomatic, measure-theoretic foundation, making "random variable" rigorous.
- 1940s–1950s — Feller's influential textbook An Introduction to Probability Theory and Its Applications canonises the modern treatment of discrete distributions.

Subtleties & Limits

open-problem · Boundaries, infinities, and modelling fidelity

Several genuine subtleties persist beyond the clean undergraduate picture. (1) Existence of moments: as the counterexample shows, means and variances may diverge for heavy-tailed discrete laws (e.g. Zipf/zeta distributions ubiquitous in linguistics and network science); choosing summary statistics then requires care. (2) Mixed and singular distributions: real data may combine a discrete atom (e.g. exactly-zero insurance claims) with a continuous part, requiring the Lebesgue–Stieltjes Integral for a unified treatment. (3) Overdispersion: empirical count data often have variance exceeding the mean, violating the Poisson's σ2=μ\sigma^2=\mu identity and motivating the negative binomial — diagnosing the right model from finite data is an open practical challenge. (4) Infinite-support inference: estimating λ\lambda or unseen species counts (the Good–Turing problem) from a finite sample remains an active area in statistics and information theory. (5) High-dimensional categorical data: modelling joint distributions over many discrete variables suffers the curse of dimensionality, driving research in graphical models and contrastive estimation.

See Also

Continuous Random Variables and Densities · Joint and Conditional Distributions · Expectation and Moments · Probability Generating Functions · Poisson Processes · Bayes' Theorem · Law of Large Numbers · Central Limit Theorem