Definition and Probability Mass Function
From Events to Numbers
Up to this point, we have worked with events β subsets of a sample space . 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
Random Variable
Given a probability space , a random variable is a function that is -measurable, meaning that for every ,
This condition ensures that is well-defined for every .
The measurability condition is not merely a technicality. It guarantees that we can compute the probability of every event of the form , which is sufficient to determine the entire probability law of .
Definition: Discrete Random Variable
Discrete Random Variable
A random variable is discrete if it takes values in a countable subset . The function
is called the probability mass function (PMF) of . A valid PMF satisfies:
- for all , and
- .
Definition: Cumulative Distribution Function (Discrete Case)
Cumulative Distribution Function (Discrete Case)
The cumulative distribution function (CDF) of a random variable is
For a discrete RV with PMF , the CDF is a right-continuous staircase:
The CDF is always non-decreasing, right-continuous, with and . For a discrete RV, the jump at each point equals .
Theorem: Properties of the CDF
Let be the CDF of a random variable . Then:
- is non-decreasing.
- is right-continuous: .
- and .
- .
- .
Conversely, any function satisfying (1)--(3) is the CDF of some random variable.
Non-decreasing
If , then , so by monotonicity of probability.
Right-continuity
Define for . Then as , and by continuity of probability from above, .
Limits at infinity
The events as , so . Similarly , giving .
Example: The Bernoulli Random Variable
A coin lands heads with probability . Define if heads, if tails. Find the PMF and CDF of .
PMF
and . The support is .
CDF
1 - px = 0px = 1$.
Definition: Indicator Random Variable
Indicator Random Variable
For an event , the indicator random variable is defined by
Notice that . 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 , let be the number of fixed points (elements that remain in their original position). Find the PMF of for .
Express as a sum of indicators
Define for . Then .
Enumerate for $n = 3$
The permutations of are: , , , , , .
The fixed-point counts are: .
So , , (impossible β if two are fixed, the third must be too), .
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
Quick Check
Which of the following functions is a valid PMF on ?
All values are non-negative and .
Common Mistake: PMF Is a Probability, PDF Is a Density
Mistake:
Treating and a probability density function as the same kind of object. Students often assume .
Correction:
For a discrete RV, is an actual probability, so . For a continuous RV, is a density and can exceed 1 β only must equal 1.
Random Variable
A measurable function from the sample space to the reals. "Random" refers to the randomness in ; the function itself is deterministic.
Related: Probability Mass Function (PMF), Cumulative Distribution Function (CDF)
Probability Mass Function (PMF)
For a discrete random variable with support , for .
Related: Random Variable, Cumulative Distribution Function (CDF)
Cumulative Distribution Function (CDF)
. A non-decreasing, right-continuous function from to .
Related: Probability Mass Function (PMF)
Historical Note: The Birth of Random Variables
1933The 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 , 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.