Movement III: Two Random Variables
EE 520: Random Processes (Fall 2026). Instructor: John Lipor.
Course thesis. A probability model answers three questions: What is uncertain? What is observed? How should observation change belief and action?
A packet’s arrival time tells you something about the next packet’s. A range reading tells you something about the bearing reading. In every case two numbers are coupled: learning one shifts your belief about the other. One random variable was Movement II; the pedagogical center of this course is what happens when there are two. To reason about a pair we need a distribution over pairs, a joint distribution, and this session builds its whole toolkit: marginals, conditionals, an independence test you can sometimes run by eye, and the covariance that measures linear coupling. A running warning organizes the geometry: for continuous pairs the support (the region the pair can land in) does half the work, so we will draw it before we integrate.
For a discrete pair the joint PMF is the probability of the two statements holding together (the comma is an intersection). It is nonnegative and sums to one over all pairs. Take the central example of this course: a latent indicator (“target absent / present”) queried by a noisy binary sensor whose flag is . Fix a prior , a detection probability , and a false-alarm probability . Each cell of the table is a prior times a likelihood, , which is just the chain rule of Session 1:
| (row sum) | |||
|---|---|---|---|
| (col. sum) |
The entries came from , , , and , and they sum to . The row and column totals sit in the margins of the table, which is exactly where the name comes from: the marginal PMF of is , and likewise . Marginalizing is summing out the variable you do not care about.
A conditional PMF renormalizes one line of the table. Given , Read that computation slowly: it is Session 2’s Bayes rule, now living in a table. The joint entry (prior likelihood) is the numerator, the column total (the evidence ) is the denominator, and the quotient is the posterior. A flag pushes belief from a prior up to ; a silent sensor pulls it down to about .
A joint table is Bayes in a new costume. Building the table from priors and likelihoods, then reading a column backwards, is precisely posterior prior likelihood evidence. The joint distribution is the complete model; marginals and conditionals are the two operations (sum out, renormalize) that extract everything else from it.
For a continuous pair we integrate a density over regions of the plane.
Definition 1 (Jointly continuous). Random variables and are jointly continuous with joint PDF if, for every region , The density is nonnegative and integrates to over the plane.
As in one dimension, is a density, not a probability: it may exceed , and the probability of any single point is zero. The marginal PDF is obtained by integrating out the unwanted variable, the continuous echo of summing a row or a column. The one habit that prevents most errors in this movement is geometric.
Draw the support before touching any integral. The support of is the region where . Every marginal, conditional, and probability is an integral whose limits are dictated by that region. Sketch it first; then a vertical or horizontal slice reads off the inner limits directly. Integrating over a convenient rectangle instead of the actual support is the single most common mistake here.
Slice the joint density at and renormalize:
Definition 2 (Conditional density). For with , the conditional density of given is a genuine density in for each fixed (nonnegative, integrates to ). Always state its support: ranges over the slice of the support at that .
This definition quietly settles the pitfall flagged in Session 1: how can we condition on when ? We never divide by zero. We divide the joint density by the marginal density, both finite, and the result is the sensible limit of as . Conditioning on a measurement’s exact value is legitimate for continuous variables, and this quotient is what it means. It is, once more, Session 2’s Bayes rule now with densities: is a posterior over after observing .
Definition 3 (Independence). and are independent if for all (for discrete variables, ). Equivalently, : knowing tells you nothing about .
Independence is a claim to be checked, never a default. There is a fast test that needs no integration at all, and it is purely about the shape of the support.
Proposition 1 (Non-product support forces dependence). If the support of is not a product set (a rectangle , possibly infinite), then and are dependent.
Proof. Suppose and were independent, so everywhere. Pick any with and any with . Then , so lies in the support. That is, the support contains the entire product of with : it is a rectangle. Contrapositively, a non-rectangular support rules out independence. ◻
So whenever the region where can live has a slanted or curved edge, so that the range of depends on the value of , the variables are dependent before any density is written down. A rectangular support does not by itself grant independence (the density must still factor); but a non-rectangular one denies it immediately.
Expectations of functions of a pair integrate against the joint density, The linear coupling of and is measured by the covariance.
Definition 4 (Covariance and correlation coefficient). and, when both variances are positive, the correlation coefficient is
We record the sign and magnitude here; the geometry of (why it is a cosine, why means an exact line) waits for Session 12. One consequence is immediate and settles a debt from Session 4.
Proposition 2 (Product expectation under independence). If and are independent, then , hence and .
Proof. By independence , so the double integral factors: Then . Expanding and dropping the vanishing cross term gives the additivity of variance for independent variables that Session 4 promised. ◻
The detection table was built cell by cell as prior likelihood. Do the same with densities. A ranging sensor watches targets scattered uniformly over a disk of radius around it. The range of a target then has (the fraction of the disk’s area within radius ), so its prior density is far targets are more common, because there is more area at large range. The sensor’s error magnitude grows with range; model it, given , as uniform up to twice the range. That is the likelihood,
The joint. The conditional-density definition, read backwards, says , the density form of the chain rule. On the region where both factors are positive, and elsewhere. The pair is uniform on the triangle with vertices , , (Figure 1). That flatness is not built in anywhere: far ranges are more common by the factor , but each spreads its error over an interval longer by the same factor, and the two effects cancel exactly. (It also makes the constant , since has area ; change either model ingredient and both the flatness and the tidy constant disappear.)
The evidence. The marginal of plays the role of the column total in the table. Read its limits off the picture: a horizontal slice at height runs from the hypotenuse to the right edge, (we need and ), so which integrates to over .
Reading the table backwards. Suppose a calibration run reveals that the error on some target was . What does that say about its range? Divide the joint by the evidence: Given the error, the range is uniform on . A large error rules out every range below (no target that close can err that much) and is otherwise silent: the posterior is flat on what remains, because the joint was flat. This is Session 2’s Bayes rule, now with densities: prior , likelihood , evidence .
Dependence. No test is needed: the likelihood changes with , so it cannot equal , and by the equivalent form of the definition and are dependent. The support test agrees, since is not a rectangle.
Prior likelihood, with densities. A two-stage model (draw from a prior, then from a likelihood given ) is a joint density, . Integrating out gives the evidence ; dividing the joint by it gives the posterior . The detection table and the ranging triangle are the same computation, one with sums and one with integrals.
A floor is ruled with parallel lines a distance apart. Drop a needle of length at random. What is the probability that it crosses a line?
Nothing in the question names two random variables; choosing them is the first step. The needle’s position relative to the lines is fixed by two numbers:
, the distance from the needle’s center to the nearest line, ;
, the acute angle between the needle and the lines, .
“At random” becomes a model: uniform on , uniform on , and and independent. That last word is an assumption, so justify it rather than assume it: the floor looks the same at every offset from the lines, so where the center lands has no bearing on how the needle is turned. With independence the joint density factors, on a rectangle, as independence requires.
The event. The half-needle on the near side of the center reaches a perpendicular distance toward the nearest line, so the needle crosses exactly when . Draw the support and the event together (Figure 2): the crossing region is the area under the curve inside the rectangle. A vertical slice at angle runs , so For a needle as long as the line spacing, .
Two remarks. First, the support sketch is what made matter: it keeps the curve inside the rectangle, so the inner limit is always . For a longer needle the curve leaves the top of the rectangle, the inner limit becomes , and the formula changes; the picture shows this before any integral does. Second, the answer contains , so dropping many needles and counting crossings estimates : with drops and crossings, . It is one of the oldest Monte Carlo computations, and a simulator for it needs nothing beyond the uniform samplers of Session 7.
The Development resolved how to condition on even though : take the slab and let . Here is why that recipe has to name a variable, not just an event.
Let and be independent and uniform on , so the pair is uniform on the unit square. Given that , what is the distribution of ? Symmetry along the diagonal suggests the answer is uniform. But is a probability-zero event, so we must approach it through a thin neighborhood, and there is more than one natural way to do that.
As a difference. The event is with . Its slab is a band of constant vertical width around the diagonal (left panel of Figure 3). Ignoring corner pieces of area of order , so : uniform, as symmetry suggested.
As a ratio. The same event is with . Its slab is the wedge , whose vertical width grows with (right panel). Now so , a density on , piled toward large . Conditioned on “the same” event, has mean one way and the other.
Neither computation is wrong. The two neighborhoods shrink to the same diagonal, but the wedge holds more of the square near than near at every stage, and that weighting survives the limit. So “condition on ” is not yet a question; “condition on ” and “condition on ” are two different questions with two different answers. The Development’s definition was never ambiguous, because it conditions on the value of a named variable , and the slab is built from that variable. The practical rule: condition on the quantity that was actually measured. If an instrument reports the difference of two readings, the band is the right limit; if it reports their ratio, the wedge is.
Work these in class.
(Mechanical: read a joint table.) A pair
with
has joint PMF
,
,
,
.
Find the marginal of
,
the conditional
,
and decide whether
and
are independent.
Answer:
,
.
Column
totals
,
so
.
Not independent:
.
(Conceptual: rectangle is not enough.) Let
on the unit square
(and
elsewhere). Confirm it is a valid density, find
,
and decide independence.
Answer:
,
so it is valid. Integrating out
,
on
(and
by symmetry). The support is a rectangle, yet
,
so
and
are dependent. Product support is necessary for independence,
not sufficient.
(Conceptual: the support test by eye.)
is uniform on the unit disk
.
Without any integration, are
and
independent?
Answer: No. The disk is not a product set (the range of
shrinks as
),
so by the proposition the variables are dependent.
The course thesis asks what is uncertain, what is observed, and how observation should change belief. A joint distribution answers the first two at once: it is the complete model of two uncertain quantities, and everything else is extracted by two moves. Summing (or integrating) out a variable gives a marginal; renormalizing a slice gives a conditional, which is Session 2’s posterior wearing densities; run in the other direction, prior likelihood builds a joint. Conditioning on a probability-zero value is legitimate, but only once we say which variable took that value. The support carries real information: a non-rectangular one forces dependence for free, and drawing it before integrating turns most double integrals into bookkeeping. Covariance measures the linear part of the coupling, and its vanishing under independence finally paid Session 4’s debt about the variance of a sum. Next session we ask the natural follow-up: once we have the conditional distribution of given , what single number should we report as our best guess of ? That number is the conditional expectation , and it is the first genuine estimator of the course.
You have a joint PMF table. Which operation gives a marginal, and
which gives a conditional?
Answer: A marginal is a row or column sum (sum out the
other variable); a conditional is a single row or column
renormalized to sum to
(divide by its marginal total).
The support of
is the region
under a parabola. Without computing anything, can
and
be independent? Why?
Answer: No. The support is not a rectangle (the upper limit of
is
,
which depends on
),
so by the product-support proposition they are dependent.
Zero correlation and independence: does
imply
and
are independent?
Answer: No. Independence implies
,
but not conversely; covariance sees only linear coupling, and a
nonlinear dependence can leave it zero (the standard counterexample
appears later in the course).