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). …
Figure 11.1A random variable $X:S\to\mathbb{R}$ maps sample points of the sample space $S$ to points on the real line (the inverse image of a value is an event in $S$)
Fig. 11.1 — A random variable $X:S\to\mathbb{R}$ maps sample points of the sample space $S$ to points on the real line (the inverse image of a value is an event in $S$)

Drawn by us to help you understand the concept clearly, and verified to make sure it's accurate. For exams, practice from your textbook's own diagram.

What this figure shows. A random variable X:S→RX:S\to\mathbb{R} maps sample points of the sample space SS to points on the real line (the inverse image of a value is an …

Figure 11.2The mapping $X:S\to\mathbb{R}$ for the number of tails when two coins are tossed: $HH\to0$, $TH\to1$, $HT\to1$, $TT\to2$
Fig. 11.2 — The mapping $X:S\to\mathbb{R}$ for the number of tails when two coins are tossed: $HH\to0$, $TH\to1$, $HT\to1$, $TT\to2$

Drawn by us to help you understand the concept clearly, and verified to make sure it's accurate. For exams, practice from your textbook's own diagram.

What this figure shows. The mapping X:S→RX:S\to\mathbb{R} for the number of tails when two coins are tossed: HH→0HH\to0, TH→1TH\to1, HT→1HT\to1, …

Figure 11.3The mapping $X:S\to\mathbb{R}$ for the number of red balls when 3 balls are drawn from an urn of 2 white + 3 red: the 10 samples map to $X=1,2,3$
Fig. 11.3 — The mapping $X:S\to\mathbb{R}$ for the number of red balls when 3 balls are drawn from an urn of 2 white + 3 red: the 10 samples map to $X=1,2,3$

Drawn by us to help you understand the concept clearly, and verified to make sure it's accurate. For exams, practice from your textbook's own diagram.

What this figure shows. The mapping X:S→RX:S\to\mathbb{R} for the number of red balls when 3 balls are drawn from an urn of 2 white + 3 red: the 10 samples map …