Movement II: One Random Variable
EE 520: Random Processes (Fall 2026). Instructor: John Lipor.
This is the first meeting of Movement II: One Random Variable. We restate the course slogan, as we will at the start of every movement:
A probability model answers three questions: What is uncertain? What is observed? How should observation change belief and action?
Movement I answered these for a target hiding among cells, where the uncertain thing was a label. Movement II keeps the whole belief–action loop and changes the objects inside it: from here on the uncertain thing is a number. The session thesis: a random variable packages a numerical question about an uncertain world, and expectation is its single-number summary, linear no matter what.
The search game so far asked where. Now ask how much. How many looks will tomorrow’s search take before the target is found? How many mines will a single sweep of the minefield turn up? How many packets arrive at a relay in the next second? None of these is known in advance, yet each is a definite number once the world reveals itself. A quantity that is a number, but a number determined by the uncertain outcome, is a random variable. Today we build the three tools that tame such quantities: the distribution (what values, with what probabilities), expectation (the one-number summary), and the indicator method (which computes averages of complicated counts without ever writing down their distribution). By the end you will compute, in one line, how much ground a team of uncoordinated searchers covers, a count whose distribution we never write down.
Definition 1 (Random variable). A random variable is a function that assigns a number to each outcome. Every set of values then names an event , and inherits its probabilities from : .
(There is a technical condition, that each such set be a legitimate event, which measure theory handles; as promised in Session 1 we will never need it.) A random variable is discrete if it takes values in a finite or countable set. For discrete the probabilities collapse to one value at a time.
Definition 2 (Probability mass function and support). The probability mass function (PMF) of a discrete random variable is . Its support is the set of values with . The PMF is nonnegative and sums to one over the support: .
Example: tossing a fair coin twice, let count the heads. Then , and reading off the outcomes gives , , . The event “at least one head” is , with : once we have the PMF, probabilities of value-events are just sums.
The PMF answers “what is the probability of exactly ?” Often we want “at most ,” and accumulating the PMF gives a function that means what it says at every real number.
Definition 3 (Cumulative distribution function). The cumulative distribution function (CDF) of is , defined for every .
For a discrete variable is a running total of the PMF: it is flat between support points and jumps by at each value , producing a staircase (Figure 1). Three properties hold for any CDF and are worth reading off the staircase: is nondecreasing; as and as ; and is right-continuous, so the value at a jump is the higher one (the filled dot). The jump height recovers the PMF: . The CDF is the object that will survive into Session 6, where continuous variables have no PMF but every variable has a CDF.
Definition 4 (Expectation). The expectation (expected value, mean) of a discrete random variable is the sum taken over the support.
Two readings, both correct and neither to be belabored. As a long-run average, is the value the sample mean of many independent copies of settles toward. As a center of mass, is the balance point of the PMF regarded as weights placed along the number line. The mean of the coin-count above is .
To average a function of we do not need the distribution of that function; we reweight the values of themselves.
Theorem 1 (Law of the unconscious statistician (LOTUS)). For any function ,
Proof. Group the outcomes of by the value of . By definition , and . Substituting and exchanging the order of the finite (or absolutely convergent) sums, since for each the outer value equals . The point is that we never had to find the PMF of . ◻
Theorem 2 (Linearity of expectation). For random variables and constants ,
Proof. Work on the outcome space directly, where and are ordinary functions of . Writing for a discrete model, No assumption whatsoever was made about how and relate. ◻
Linearity needs no independence. Theorem 2 holds for any and : independent or not, correlated or not, same experiment or different. This unconditional freedom is what makes the indicator method below so powerful. We will compute the mean of a complicated count by breaking it into a sum of simple pieces and adding their means, even when the pieces are tangled together, precisely because linearity never asks whether they are.
An indicator of an event is the random variable that equals when occurs and otherwise. Its mean is just the probability of the event: This tiny identity, married to linearity, is a counting machine. Whenever a random variable counts how many of several events occur, write it as a sum of indicators, , and then The expected count is the sum of the individual event probabilities, with no distribution of ever computed and no independence required. The worked examples put this to work on a count whose pieces are tangled together.
Expectation locates the center; variance measures spread.
Definition 5 (Variance and standard deviation). The variance of is , and the standard deviation is , carried in the same units as .
The two expressions agree by expanding the square and using linearity: with . Variance is not linear; it responds to affine changes by the square of the scale: The shift drops out (moving the center does not change spread) and the scale enters squared.
For a sum, the two-variable expansion shows what independence buys. For any , the last bracket being the cross term. When and are independent, , so the cross term vanishes and variances add: . The same cancellation extends to any number of pairwise-independent terms.
Remark 1. We are borrowing one fact on credit: that independence forces . It is intuitive (the average of a product of unrelated quantities is the product of the averages) and we will prove it properly in Session 8, once joint distributions give us the tools. Everything in this session’s variance computations uses only the vanishing of that cross term.
Ten searchers set out over a field of cells. They do not coordinate: each independently picks one cell uniformly at random and searches it. Let be the number of distinct cells searched. Had they coordinated, would be . How much coverage do they lose by not talking?
The PMF of is a genuine chore: it requires counting the ways ten choices can land on exactly distinct cells. The indicator method skips it, provided we choose the right pieces. Indicators on the searchers do not help, since whether searcher reaches a new cell depends on everyone else’s choices. Put the indicators on the cells instead: let , so that . Cell is missed exactly when all ten searchers pick other cells; each does so with probability , independently of the others, so By [eq:indicator] and linearity, On average about two of the ten looks are wasted on cells someone else already searched.
Notice what linearity just ignored. The indicators are not independent: there are only ten searchers, so if cells through are all covered, at most one searcher is left for the other eleven cells. Linearity never asked. This is the freedom of Theorem 2 in action: a count whose pieces are tangled together, averaged in one line.
For the variance, expand as in [eq:varsum], now with twenty terms: Each indicator satisfies , so . For the cross terms, the product is itself an indicator, of the event that both cells are covered, so . Both cells are missed exactly when every searcher picks one of the other cells, which each does with probability ; inclusion–exclusion (Session 1) on the two “missed” events then gives Each cross term is therefore . It is negative because covering one cell uses up a searcher who might have covered the other. Each one is tiny, but there are of them: Had we treated the indicators as independent and dropped the cross terms, we would have reported a variance of , more than four times too large. Dependence left the mean untouched in (a), but it reshaped the spread: because the searchers form a fixed pool, the coverage count is far more predictable than twenty independent cells would be. Linearity of the mean needs no independence; additivity of variance does, and dependence enters the variance only through the cross terms.
A search vehicle must cover one unit of distance, and its speed depends on the sea state: or units per hour, equally likely. The time taken is . A planner who averages first uses the mean speed and budgets whereas the expected time, by LOTUS, is a third more than the plan: the slow case costs far more time than the fast case saves. The two disagree, and not by accident: is convex on the positive axis, and for convex one always has . That inequality is Jensen’s inequality; we name it and move on. The moral is operational: you may not push an expectation through a nonlinear function. Averaging and transforming do not commute unless is affine, the one case where Theorem 2 applies.
Work these in class.
(Indicators, tangled pieces.) A faulty router delivers
packets in a uniformly random order (all
orders equally likely). Let
be the number of packets that arrive in their original position. Find
without finding the PMF. Are your indicators independent?
Answer:
,
and each indicator has probability
,
so
for every
.
The indicators are dependent (if
packets are in place, so is the last one), and linearity ignores
that.
(CDF.) A discrete
has PMF
.
Compute
and
.
Answer:
;
.
(Conceptual.) A relay’s backlog
is
or
packets, each with probability
.
Compute
.
Is the expected value a backlog the relay can ever actually hold? What
does this say about reading “expected” as “typical”?
Answer:
,
a value
never takes; the mean is a balance point, not a prediction of any single
outcome, so “expected” is not the same as “typical.”
A random variable is the course thesis pointed at a number: what is uncertain is now a numerical quantity, its distribution (PMF or, more durably, CDF) is the full model of it, and expectation compresses that model to one summary. The engine of the session was linearity, which holds with no strings attached, and its partner the indicator method, which turns any count into a sum of event probabilities and computed the expected coverage of ten uncoordinated searchers in a single line, even though the pieces of that count were dependent. Variance then measured the spread, and there, unlike for the mean, independence mattered: it is what makes the cross terms vanish so variances add, and in the coverage count, where it failed, the cross terms cut the variance by more than a factor of four. We also drew the boundary between averaging and transforming: except when is affine. Next session takes the ad-hoc counts we built by hand and recognizes the recurring shapes among them, the handful of named distributions that model almost every sensor and arrival count, and it meets the first genuinely new tool of Movement II: the CDF method for the distribution of a maximum or a minimum.
You know a random variable’s PMF. In one sentence each, how do
you get (i) its CDF and (ii) the probability of the event
?
Answer: (i)
is the running total
;
(ii)
.
Why can the expected number of cells covered by uncoordinated
searchers be computed without the distribution of that count, and why
does treating the cell indicators as independent give the right mean but
the wrong variance?
Answer: write the count as a sum of cell indicators and use
linearity, which needs no independence; the variance, however, contains
the cross terms
,
which are negative here, so dropping them overstates the
spread.
Give a one-line reason
need not equal
,
and name the general principle.
Answer:
is nonlinear (convex), so averaging and transforming do not commute;
Jensen’s inequality gives
for positive
.