Discrete Random Variables
A random variable is a function that assigns a numerical value to each outcome of a random experiment. When those numerical values form a countable set — such as the whole numbers 0, 1, 2, 3, … — the random variable is called discrete. Discrete random variables arise naturally whenever we count things: the number of heads in five coin flips, the number of defective items in a batch, or the score rolled on a die. Every discrete random variable is fully described by its probability distribution, which specifies the probability assigned to each possible value. These probabilities must all be non-negative and must sum to exactly 1, reflecting the certainty that some outcome must occur. The distribution can be listed in a table, drawn as a bar chart, or expressed as a formula called the probability mass function (PMF). Understanding discrete random variables is foundational to probability theory, statistics, and countless real-world applications — from quality control in manufacturing to predicting the spread of diseases to designing fair games and lotteries. Mastering this concept opens the door to expected value, variance, and the powerful probability distributions such as the binomial and Poisson that appear throughout mathematics and science.
- Identify the Sample Space
- Define the Probability Mass Function (PMF)
- Verify the Two PMF Conditions
- Compute the Expected Value (Mean)
- Compute the Variance and Standard Deviation
Identify the Sample Space
Start with a random experiment and list all possible outcomes. For example, rolling a fair six-sided die gives sample space S = {1, 2, 3, 4, 5, 6}. The random variable X is a rule that maps each outcome to a number — in this case X(outcome) = the face value shown, so X takes values in {1, 2, 3, 4, 5, 6}.
Define the Probability Mass Function (PMF)
The PMF is the function P(X = x) that gives the probability for each specific value x. For a fair die, P(X = x) = 1/6 for x ∈ {1,2,3,4,5,6} and P(X = x) = 0 otherwise. More complex examples arise when outcomes are not equally likely — for instance, counting the number of heads in 3 coin flips gives P(X = 0) = 1/8, P(X = 1) = 3/8, P(X = 2) = 3/8, P(X = 3) = 1/8.
Verify the Two PMF Conditions
Any valid PMF must satisfy: (1) P(X = x) ≥ 0 for all values x, meaning probabilities are never negative. (2) The sum of all probabilities equals 1: ∑ P(X = x) = 1 over all possible x. Check the 3-coin example: 1/8 + 3/8 + 3/8 + 1/8 = 8/8 = 1. ✓ If these conditions fail, the function is not a legitimate probability distribution.
Compute the Expected Value (Mean)
The expected value E[X] (also written μ) is the long-run average value of the random variable. It is computed by multiplying each value by its probability and summing: E[X] = ∑ x · P(X = x). For the 3-coin flip: E[X] = 0·(1/8) + 1·(3/8) + 2·(3/8) + 3·(1/8) = 0 + 3/8 + 6/8 + 3/8 = 12/8 = 1.5. This means if you repeatedly flip 3 coins, on average you get 1.5 heads per trial.
Compute the Variance and Standard Deviation
Variance Var(X) = E[X²] − (E[X])² measures how spread out the distribution is. First find E[X²] = ∑ x² · P(X = x). For 3-coin: E[X²] = 0·(1/8) + 1·(3/8) + 4·(3/8) + 9·(1/8) = 0 + 3/8 + 12/8 + 9/8 = 24/8 = 3. Then Var(X) = 3 − (1.5)² = 3 − 2.25 = 0.75. The standard deviation σ = √0.75 ≈ 0.866, indicating typical deviation from the mean.
The Key Equation
- E[X] — Expected value (same units as X): The long-run average or mean of the random variable X over infinitely many repetitions of the experiment.
- x — Possible value (dimensionless or units of X): Each specific numerical value that the random variable X can take.
- P(X = x) — Probability mass function (dimensionless (probability)): The probability that the random variable X takes the specific value x; must satisfy 0 ≤ P(X = x) ≤ 1.
- \sum_{x} — Summation over all values (—): Indicates that the product x · P(X = x) is added up for every value x in the support of X.
Worked Example
Problem. A game involves spinning a wheel with three sections. Section A (probability 0.5) pays 4. Section C (probability 0.2) pays $10. Let X be the dollar payout. (a) Verify this is a valid PMF. (b) Find E[X]. (c) Find Var(X).
Answer. E[X] = 3.82
Origins · 1 minAndrei Andreyevich Markov and how this was discovered
Markov made foundational contributions to probability theory, including the rigorous study of sums of independent random variables and the law of large numbers. He pioneered what are now called Markov chains — sequences of random variables where each depends only on the previous state — extending probability theory far beyond classical combinatorics into the realm of stochastic processes. Markov famously applied his probability analysis to the sequence of vowels and consonants in Pushkin's poem 'Eugene Onegin', one of the earliest uses of statistical analysis in linguistics — a striking example of a random variable defined on a literary text.
Related Concepts
- Binomial Distribution — The binomial distribution is one of the most important discrete random variables, counting the number of successes in n independent trials and building directly on PMF ideas.
- Expected Value — Expected value is the primary summary statistic of any discrete random variable, representing its long-run average and guiding decisions under uncertainty.
- Continuous Random Variables — Understanding discrete random variables provides the foundation for studying continuous random variables, where sums become integrals and PMFs become probability density functions.
- Sample Space and Events — Random variables are functions defined on the sample space, so a solid grasp of sample spaces and events is essential before working with random variables.