1.6. Discrete Random Variables¶
1.6.1. Discrete Distributions and Probability Mass Functions¶
Definition 1.6.1 : Discrete random variable
A random variable is a discrete random variable if its space is either finite or countable.
Example 1.6.2 : Number of flips until the first head
Consider independent flips of a coin with \(P(H)=P(T)=\frac{1}{2}\) on each flip. The sample space \(\mathcal{C}\) consists of sequences such as \(\mathrm{TTHTHHT}\cdots\). Let \(X\) be the number of flips needed to obtain the first head, so \(X(\mathrm{TTHTHHT}\cdots)=3\). The space of \(X\) is the countable set \(\mathcal{D}=\{1,2,3,4,\ldots\}\).
The event \(X=1\) occurs when the sequence begins with H, giving \(P(X=1)=\frac{1}{2}\). The event \(X=2\) occurs when the sequence begins with TH, so independence gives \(P(X=2)=\left(\frac{1}{2}\right)\left(\frac{1}{2}\right)=\frac{1}{4}\). In general, \(X=x\) requires \(x-1\) tails followed by a head, giving the geometric sequence of probabilities
The probability that the first head appears on an odd number of flips is
Definition 1.6.3 : Probability mass function (pmf)
Let \(X\) be a discrete random variable with space \(\mathcal{D}\). The probability mass function (pmf) of \(X\) is given by
Concept 1.6.4 : Properties of a pmf
Let \(X\) be a discrete random variable with finite or countable range \(\mathcal{D}\). Its pmf \(p_X\) satisfies the two properties
- (i) \(0\leq p_X(x)\leq1\) for every \(x\in\mathcal{D}\).
- (ii) \(\sum_{x\in\mathcal{D}}p_X(x)=1\).
Proof
-
(i) By Definition 1.6.3, \(p_X(x)=P(X=x)\), so Theorem 1.3.7 gives \(0\leq p_X(x)\leq1\).
-
(ii) The events \(\{X=x\}\), for \(x\in\mathcal{D}\), are pairwise disjoint and their union is the sample space. Countable additivity in Definition 1.3.2 therefore gives
\[ \sum_{x\in\mathcal{D}}p_X(x) =P\left(\bigcup_{x\in\mathcal{D}}\{X=x\}\right) =1. \]
Conversely, a function satisfying these two properties on a finite or countable space uniquely determines the distribution of a discrete random variable. This converse is used without proof.
Definition 1.6.5 : Support of a discrete random variable
The support of a discrete random variable \(X\) is the set of points in the space of \(X\) which have positive probability. We often denote the support of \(X\) by \(\mathcal{S}\). Then \(\mathcal{S} \subset \mathcal{D}\), but it may be that \(\mathcal{S}=\mathcal{D}\).
Concept 1.6.6 : Relation between the pmf and cdf discontinuities
Let \(X\) be a discrete random variable with space \(\mathcal{D}\). According to Theorem 1.5.8, each point of discontinuity \(x\) of \(F_X\) has positive mass: \(P(X=x)>0\). For \(x \in \mathcal{S}\), the pmf value \(p_X(x)\) equals the size of the discontinuity of \(F_X\) at \(x\). If \(x \notin \mathcal{S}\), then \(P[X=x]=0\), so \(F_X\) is continuous at \(x\).
1.6.2. Transformations¶
Concept 1.6.7 : Transformation of a random variable
Let \(X\) be discrete with known pmf and countable range \(\mathcal{D}_X\), and let \(Y=g(X)\). Its range is \(\mathcal{D}_Y=\{g(x):x\in\mathcal{D}_X\}\), and for \(y\in\mathcal{D}_Y\),
Proof
The event \(\{Y=y\}\) is the disjoint union of the events \(\{X=x\}\) for which \(g(x)=y\). Countable additivity gives the formula.
When \(g\) is one-to-one, the sum has at most one term and becomes \(p_Y(y)=p_X(g^{-1}(y))\).