Skip to content

Mathematics · Ch 11 — Probability Distributions

Random Variable

11.2

Random Variable

Definition 11.1 (Random variable). A random variable XX is a function defined on a sample space SS into the real numbers R\mathbb R, such that the inverse image of every point, subset or interval of R\mathbb R is an event in SS — i.e. a set to which the underlying experiment already assigns a probability.

Notation: capital letters X,Y,Z,…X,Y,Z,\dots denote random variables (the function itself); the corresponding small letters x,y,z,…x,y,z,\dots denote the possible values the random variable can take. Formally X:S→RX:S\to\mathbb R, and for a sample point ω∈S\omega\in S, X(ω)X(\omega) is the real number assigned to it. The range set (or support) of XX is RX={X(ω):ω∈S}R_X=\{X(\omega):\omega\in S\} — the collection of values XX actually takes.

Inverse image. If xx is a value of XX, its inverse image X−1(x)={ω∈S:X(ω)=x}X^{-1}(x)=\{\omega\in S: X(\omega)=x\} is the set of all sample points mapping to xx — and this set is always an event of SS, so it has a well-defined probability. This is the mechanism that lets us talk about "the probability that XX equals xx": it is really the probability of the underlying event X−1(x)X^{-1}(x).

Worked illustrations.

  • Coin toss. S={H,T}S=\{H,T\}. Let XX = number of heads: X(T)=0, X(H)=1X(T)=0,\ X(H)=1. So XX is a random variable taking the values 00 and 11, and e.g. X−1(1)={H}X^{-1}(1)=\{H\}.
  • Two coins (finding an inverse image). S={HH,HT,TH,TT}S=\{HH,HT,TH,TT\}, X=X= number of tails. Then X(TT)=2, X(HT)=X(TH)=1, X(HH)=0X(TT)=2,\ X(HT)=X(TH)=1,\ X(HH)=0; XX takes the values 0,1,20,1,2 with 1,2,11,2,1 sample points in their inverse images respectively (total 44, matching ∣S∣|S|).
  • Two dice. SS has 3636 ordered pairs (α,β)(\alpha,\beta), 1≤α,β≤61\le\alpha,\beta\le6; X=α+βX=\alpha+\beta takes the values 2,3,…,122,3,\dots,12, with the familiar triangular counts 1,2,3,4,5,6,5,4,3,2,11,2,3,4,5,6,5,4,3,2,1 (summing to 3636). …