Ma · Mathematics

When Is a Random Variable Almost Surely Constant?

Published By the 9to5Science editorial team

At a glance

  1. 1. Check independence

    If X is independent of itself, then every event determined by X has probability zero or one.

  2. 2. Use rational thresholds

    Apply this to events where X is at most a rational number.

  3. 3. Locate the cut

    The threshold probabilities switch from zero to one at a single value c.

  4. 4. Conclude constancy

    Those threshold events imply that X equals c with probability one.

A real-valued random variable is almost surely constant if there is a fixed number cc such that P(X=c)=1P(X=c)=1. Its value may differ from cc on a probability-zero set; that does not affect the claim.

A standard result is that if XX is independent of itself, then it is almost surely constant. The proof uses events such as {X≤q}\{X\leq q\} for rational numbers qq. The rational thresholds are enough to pin down the distribution without relying on an uncountable collection of events.

What “independent of itself” means

Two random variables are independent when events specified by their values are independent. Thus, for every pair of Borel sets B,C⊆RB,C\subseteq\mathbb{R},

P(X∈B,X∈C)=P(X∈B)P(X∈C).P(X\in B, X\in C)=P(X\in B)P(X\in C).

When both variables are the same XX, take B=CB=C. The event on the left is just {X∈B}\{X\in B\}, so

P(X∈B)=P(X∈B)2.P(X\in B)=P(X\in B)^2.

The only probabilities pp satisfying p=p2p=p^2 are 00 and 11. Therefore every event determined by XX has probability either zero or one. In the language of sigma-algebras, σ(X)\sigma(X) is independent of itself.

Proof using rational thresholds

Define the distribution function F(t)=P(X≤t)F(t)=P(X\leq t). For every rational number qq, the event {X≤q}\{X\leq q\} is determined by XX. The preceding argument gives

F(q)∈{0,1}for every q∈Q.F(q)\in\{0,1\}\qquad\text{for every }q\in\mathbb{Q}.

Because XX is real-valued, it is finite with probability one. Consequently, F(q)F(q) is zero for sufficiently small rational thresholds and one for sufficiently large ones. Define

c=inf⁡{q∈Q:F(q)=1}.c=\inf\{q\in\mathbb{Q}:F(q)=1\}.

This is a finite real number. If q<cq<c, then F(q)=0F(q)=0 by the definition of the infimum. If q>cq>c, there is a rational rr with c<r<qc<r<q and F(r)=1F(r)=1; since FF is nondecreasing, F(q)=1F(q)=1 as well.

These facts imply that X=cX=c almost surely. For example, choose rational numbers qn<cq_n<c increasing to cc. Each event {X≤qn}\{X\leq q_n\} has probability zero, and their union is {X<c}\{X<c\}, so P(X<c)=0P(X<c)=0. Choose rational numbers rn>cr_n>c decreasing to cc. Each event {X≤rn}\{X\leq r_n\} has probability one, and their intersection is {X≤c}\{X\leq c\}, so P(X≤c)=1P(X\leq c)=1. Together, these give P(X=c)=1P(X=c)=1.

The converse also holds: if X=cX=c almost surely, then events determined by XX have probability zero or one, and XX is independent of itself. Null events in σ(X)\sigma(X) do not change that conclusion.

Worked example: a Bernoulli random variable

Suppose XX is Bernoulli with P(X=1)=pP(X=1)=p and P(X=0)=1−pP(X=0)=1-p. If XX is independent of itself, the event {X=1}\{X=1\} must be independent of itself. Hence

P(X=1)=P(X=1)2,p=p2.P(X=1)=P(X=1)^2, \qquad p=p^2.

So p=0p=0 or p=1p=1. In either case, XX is constant with probability one: it equals 00 when p=0p=0 and equals 11 when p=1p=1. Any value 0<p<10<p<1 rules out independence of XX from itself.

Other common ways to establish constancy

Self-independence is only one criterion. If XX has a finite second moment, then

Var⁡(X)=E[(X−E[X])2].\operatorname{Var}(X)=\mathbb{E}\big[(X-\mathbb{E}[X])^2\big].

If this variance is zero, the nonnegative random variable (X−E[X])2(X-\mathbb{E}[X])^2 has expectation zero, so it is zero almost surely. Thus X=E[X]X=\mathbb{E}[X] almost surely. Conversely, an almost surely constant variable with finite second moment has variance zero.

More generally, if gg is a nonnegative measurable function and E[g(X)]=0\mathbb{E}[g(X)]=0, then g(X)=0g(X)=0 almost surely. For example, taking g(x)=(x−c)2g(x)=(x-c)^2 proves that a finite second moment around cc equal to zero forces X=cX=c almost surely.

Common mistakes

  • Confusing self-independence with an independent copy. An independent copy YY of XX can have the same non-degenerate distribution as XX. The result concerns XX and XX itself, not XX and a separately constructed copy.
  • Thinking equal distributions imply independence. Two random variables may have the same distribution and still be dependent. A variable and itself are generally dependent unless it is almost surely constant.
  • Ignoring “almost surely.” The result does not require X=cX=c at every point of the sample space; exceptional outcomes with probability zero are allowed.
  • Applying the zero-variance criterion without its assumptions. The usual variance argument requires a finite second moment. Self-independence, by contrast, gives the conclusion for any real-valued random variable, whether or not its expectation or variance exists.

References

  1. Patrick Billingsley, Probability and Measure
  2. Olav Kallenberg, Foundations of Modern Probability

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.