Definition and Probability Mass Function

From Events to Numbers

Up to this point, we have worked with events β€” subsets of a sample space Ξ©\Omega. But in engineering and science, we almost always care about numerical outcomes: the number of bit errors in a block, the signal power at a receiver, the delay until the next packet arrives. A random variable is the formal device that assigns a number to each outcome, allowing us to bring the full machinery of calculus and algebra to bear on probability problems. The key insight, as Caire emphasizes, is that once we have the distribution of a random variable, "we can forget about the underlying probability space and work entirely with numbers."

Definition:

Random Variable

Given a probability space (Ξ©,F,P)(\Omega, \mathcal{F}, \mathbb{P}), a random variable is a function X:Ξ©β†’RX : \Omega \to \mathbb{R} that is F\mathcal{F}-measurable, meaning that for every x∈Rx \in \mathbb{R},

{Ο‰βˆˆΞ©:X(Ο‰)≀x}∈F.\{\omega \in \Omega : X(\omega) \leq x\} \in \mathcal{F}.

This condition ensures that P(X≀x)\mathbb{P}(X \leq x) is well-defined for every xx.

The measurability condition is not merely a technicality. It guarantees that we can compute the probability of every event of the form {X≀x}\{X \leq x\}, which is sufficient to determine the entire probability law of XX.

,

Definition:

Discrete Random Variable

A random variable XX is discrete if it takes values in a countable subset X={x1,x2,…}βŠ‚R\mathcal{X} = \{x_1, x_2, \ldots\} \subset \mathbb{R}. The function

P(xi)β‰œP(X=xi),i=1,2,…P(x_i) \triangleq \mathbb{P}(X = x_i), \quad i = 1, 2, \ldots

is called the probability mass function (PMF) of XX. A valid PMF satisfies:

  1. P(xi)β‰₯0P(x_i) \geq 0 for all ii, and
  2. βˆ‘iP(xi)=1\sum_{i} P(x_i) = 1.

Definition:

Cumulative Distribution Function (Discrete Case)

The cumulative distribution function (CDF) of a random variable XX is

F(x)β‰œP(X≀x),x∈R.F(x) \triangleq \mathbb{P}(X \leq x), \quad x \in \mathbb{R}.

For a discrete RV with PMF PP, the CDF is a right-continuous staircase:

F(x)=βˆ‘xi≀xP(xi).F(x) = \sum_{x_i \leq x} P(x_i).

The CDF is always non-decreasing, right-continuous, with lim⁑xβ†’βˆ’βˆžF(x)=0\lim_{x \to -\infty} F(x) = 0 and lim⁑xβ†’+∞F(x)=1\lim_{x \to +\infty} F(x) = 1. For a discrete RV, the jump at each point xix_i equals P(xi)=P(X=xi)P(x_i) = \mathbb{P}(X = x_i).

,

Theorem: Properties of the CDF

Let F(x)F(x) be the CDF of a random variable XX. Then:

  1. FF is non-decreasing.
  2. FF is right-continuous: lim⁑h↓0F(x+h)=F(x)\lim_{h \downarrow 0} F(x+h) = F(x).
  3. lim⁑xβ†’βˆ’βˆžF(x)=0\lim_{x \to -\infty} F(x) = 0 and lim⁑xβ†’+∞F(x)=1\lim_{x \to +\infty} F(x) = 1.
  4. P(a<X≀b)=F(b)βˆ’F(a)\mathbb{P}(a < X \leq b) = F(b) - F(a).
  5. P(X=x)=F(x)βˆ’lim⁑h↓0F(xβˆ’h)\mathbb{P}(X = x) = F(x) - \lim_{h \downarrow 0} F(x - h).

Conversely, any function satisfying (1)--(3) is the CDF of some random variable.

Example: The Bernoulli Random Variable

A coin lands heads with probability p∈(0,1)p \in (0,1). Define X=1X = 1 if heads, X=0X = 0 if tails. Find the PMF and CDF of XX.

Definition:

Indicator Random Variable

For an event A∈FA \in \mathcal{F}, the indicator random variable 1A\mathbf{1}_A is defined by

1A(Ο‰)={1ifΒ Ο‰βˆˆA0ifΒ Ο‰βˆ‰A\mathbf{1}_A(\omega) = \begin{cases} 1 & \text{if } \omega \in A \\ 0 & \text{if } \omega \notin A \end{cases}

Notice that E[1A]=P(A)\mathbb{E}[\mathbf{1}_A] = \mathbb{P}(A). The Bernoulli RV is the indicator of the event "heads."

Indicator random variables are a powerful bookkeeping device. Many counting problems become tractable when we express the count as a sum of indicators and exploit linearity of expectation.

Example: Counting Matches via Indicators

In a random permutation of {1,2,…,n}\{1, 2, \ldots, n\}, let XX be the number of fixed points (elements that remain in their original position). Find the PMF of XX for n=3n = 3.

PMF and CDF of a Discrete Distribution

Explore the PMF and CDF of a Bernoulli or binomial distribution. Observe how the CDF is a right-continuous staircase with jumps matching the PMF values.

Parameters
0.5
10

Quick Check

Which of the following functions is a valid PMF on X={1,2,3}\mathcal{X} = \{1, 2, 3\}?

p(1)=0.3,Β p(2)=0.3,Β p(3)=0.3p(1) = 0.3,\ p(2) = 0.3,\ p(3) = 0.3

p(1)=0.5,Β p(2)=0.3,Β p(3)=0.2p(1) = 0.5,\ p(2) = 0.3,\ p(3) = 0.2

p(1)=0.5,Β p(2)=βˆ’0.1,Β p(3)=0.6p(1) = 0.5,\ p(2) = -0.1,\ p(3) = 0.6

p(1)=1.2,Β p(2)=βˆ’0.1,Β p(3)=βˆ’0.1p(1) = 1.2,\ p(2) = -0.1,\ p(3) = -0.1

Common Mistake: PMF Is a Probability, PDF Is a Density

Mistake:

Treating P(x)P(x) and a probability density function fX(x)f_X(x) as the same kind of object. Students often assume fX(x)≀1f_X(x) \leq 1.

Correction:

For a discrete RV, P(x)=P(X=x)P(x) = \mathbb{P}(X = x) is an actual probability, so 0≀P(x)≀10 \leq P(x) \leq 1. For a continuous RV, fX(x)f_X(x) is a density and can exceed 1 β€” only ∫fX(x) dx\int f_X(x)\,dx must equal 1.

Random Variable

A measurable function X:Ξ©β†’RX : \Omega \to \mathbb{R} from the sample space to the reals. "Random" refers to the randomness in Ο‰\omega; the function XX itself is deterministic.

Related: Probability Mass Function (PMF), Cumulative Distribution Function (CDF)

Probability Mass Function (PMF)

For a discrete random variable XX with support X\mathcal{X}, P(x)=P(X=x)P(x) = \mathbb{P}(X = x) for x∈Xx \in \mathcal{X}.

Related: Random Variable, Cumulative Distribution Function (CDF)

Cumulative Distribution Function (CDF)

F(x)=P(X≀x)F(x) = \mathbb{P}(X \leq x). A non-decreasing, right-continuous function from R\mathbb{R} to [0,1][0, 1].

Related: Probability Mass Function (PMF)

Historical Note: The Birth of Random Variables

1933

The concept of a random variable as a measurable function was formalized by Andrey Kolmogorov in his 1933 monograph Grundbegriffe der Wahrscheinlichkeitsrechnung (Foundations of the Theory of Probability). Before Kolmogorov, probabilists like Laplace and Chebyshev worked with "quantities depending on chance" without a rigorous definition. Kolmogorov's measure-theoretic framework placed probability on the same axiomatic footing as the rest of modern mathematics.

Key Takeaway

A random variable is a function, not a number. The randomness comes from the input Ο‰βˆˆΞ©\omega \in \Omega, not from the function itself. Once we have the PMF (or CDF), we can forget about the underlying sample space and work entirely with numbers.