Tutorials › Stochastic Processes › Discrete Laws and Probability Mass Functions

Random Variables, Expectation and Conditional Expectation · Tutorial 3 of 994

Discrete Laws and Probability Mass Functions

Learn to read and check probability mass functions, identify their possible values, and use them to calculate probabilities in three basic discrete models.

Intermediate 9 min read

What You'll Learn

  • Define a probability mass function for a discrete random variable and relate it to probabilities of Borel events.
  • Check nonnegativity, normalization, and the set of values that can carry probability.
  • Calculate event probabilities from a mass function by summing over the relevant values.
  • Work with Bernoulli and binomial probability mass functions, including endpoint cases.
  • Distinguish an exact geometric waiting time from a tail event involving several failures.

Discrete Laws as Probability Mass Functions

A discrete random variable assigns its probability to individual values. A probability mass function records these point probabilities, making it possible to recover the probability of an event by adding the masses of the values it contains. The essential checks are that no mass is negative, the total mass is one, and the values receiving mass are the stated possible values.

Work on a probability space \((\Omega,\mathcal{F},\mathbb{P})\), and let \(X:\Omega\to\mathbb{R}\) be a random variable. Call \(X\) discrete if there is a finite or countable set \(D\subseteq\mathbb{R}\) such that \(\mathbb{P}(X\in D)=1\). This definition allows a null set of outcomes on which \(X\) takes values outside \(D\). For each real number \(x\), define the probability mass function (pmf) by \(p_X(x)=\mathbb{P}(X=x)\).

Definition: A pmf for a discrete random variable \(X\) is the function \(p_X(x)=\mathbb{P}(X=x)\). Its positive-mass support is \(D_+=\{x\in\mathbb{R}:p_X(x)>0\}\). This set is finite or countable, and \(\sum_{x\in D_+}p_X(x)=1\). A larger finite or countable set \(D\) with \(\mathbb{P}(X\in D)=1\) is also a possible-value set; it may include points whose mass is zero.

The sum over a countable set means the sum of its nonnegative terms, independent of the order of enumeration. Probabilities of events are obtained by summing point masses, with a small measurability qualification: for a Borel set \(A\subseteq\mathbb{R}\), the events \(\{X\in A\}\) and \(\bigcup_{x\in A\cap D}\{X=x\}\) agree except possibly on \(\{X\notin D\}\). The latter event has probability zero, so the two events have the same probability. In particular,

$$ \mathbb{P}(X\in A)=\sum_{x\in A\cap D}p_X(x). $$

If instead \(X\in D\) surely, the two events are equal as sets for every \(A\); probabilities are asserted only when the events in question are measurable. Using Borel sets avoids asking for the measurability of \(\{X\in A\}\) when \(A\) is an arbitrary non-Borel set.

Why the pmf conditions hold. The events \(\{X=x\}\), for distinct \(x\in D\), are disjoint. Their union is \(\{X\in D\}\), so countable additivity gives \(\sum_{x\in D}p_X(x)=\mathbb{P}(X\in D)=1\). Also, each mass is a probability and hence is nonnegative. If \(x\notin D\), then \(\{X=x\}\subseteq\{X\notin D\}\), so \(p_X(x)=0\). Therefore the sum over \(D_+\) is also one.

Proposition: A discrete law is determined by its pmf: if \(X\) is discrete with possible-value set \(D\), then for every Borel set \(A\), \(\mathbb{P}(X\in A)=\sum_{x\in A\cap D}p_X(x)\). Conversely, any nonnegative masses on a finite or countable set that sum to one define a discrete probability law.

Proof. For the first statement, the events \(\{X=x\}\) for \(x\in A\cap D\) are pairwise disjoint and measurable. Their union differs from \(\{X\in A\}\) only on outcomes with \(X\notin D\), a null event. Countable additivity therefore gives the stated sum. For the converse, let \(D\) be finite or countable and let \(p(x)\ge 0\) for \(x\in D\), with \(\sum_{x\in D}p(x)=1\). Take \(\Omega=D\), let \(\mathcal{F}\) be its power set, assign each singleton \(\{x\}\) probability \(p(x)\), and define \(X(x)=x\). For every \(A\subseteq D\), countable additivity gives \(\mathbb{P}(X\in A)=\sum_{x\in A}p(x)\), so \(X\) has the required pmf. \(\square\)

This proposition gives a practical test. A proposed pmf must have nonnegative entries and total mass one. Once those conditions hold, its support identifies the values that actually have positive probability. For a requested event, include the masses of the points in the event and no others.

Three Basic Discrete Models

Worked Example: A Bernoulli Random Variable

A Bernoulli random variable records one trial with two possible outcomes: \(X=1\) for success and \(X=0\) for failure. Let the success probability be \(p\), where \(0\le p\le1\). Its pmf is \(p_X(1)=p\), \(p_X(0)=1-p\), and zero at every other value. At \(p=0\) or \(p=1\), one of the two listed values has mass zero, so the positive-mass support is a singleton.

For a numerical instance, take \(p=\tfrac38\). Then the failure probability is \(1-p=1-\tfrac38=\tfrac58\). The masses at 0 and 1 are therefore \(\tfrac58\) and \(\tfrac38\). They are nonnegative and normalize because \(\tfrac58+\tfrac38=1\).

For the event \(X=0\) or \(X\ge2\), only the value 0 contributes: \(0\) belongs to the event, while \(1\) does not satisfy \(1\ge2\), and all other values have zero mass. Thus \(\mathbb{P}(X=0\text{ or }X\ge2)=\tfrac58\). As a check, the complementary event is \(X=1\), which has probability \(\tfrac38\); the two probabilities sum to \(\tfrac58+\tfrac38=1\).

A binomial random variable counts successes in a fixed number of trials. In the usual trial model, the trials have the same success probability and are independent; here the formula below is the definition of the binomial pmf. The number of trials \(n\) is a positive integer and \(0\le p\le1\). For \(0<p<1\), the count \(X\) has possible values \(0,1,\ldots,n\), with mass \(\binom{n}{k}p^k(1-p)^{n-k}\) at \(k\). At the endpoints, the law is degenerate: \(p=0\) gives mass one at 0, and \(p=1\) gives mass one at \(n\).

Result: The binomial masses sum to one. For \(0<p<1\), this follows from the binomial theorem: \(\sum_{k=0}^{n}\binom{n}{k}p^k(1-p)^{n-k}=(p+(1-p))^n=1\). At \(p=0\) and \(p=1\), the degenerate laws also have total mass one.

Justification. For \(0<p<1\), apply the binomial theorem to the two numbers \(p\) and \(1-p\); their sum is one, so the displayed sum is \(1^n=1\). Each term is nonnegative because \(p\) and \(1-p\) are positive. At \(p=0\), the specified endpoint law has its single positive mass, of size one, at 0; at \(p=1\), it has its single positive mass, of size one, at \(n\). These cases verify normalization without relying on ambiguous expressions such as \(0^0\).

Worked Example: A Binomial Count

Let \(X\) have a binomial law with \(n=4\) and \(p=\tfrac13\). The failure probability is \(1-p=\tfrac23\). The possible values are \(0,1,2,3,4\), and the formula gives the following masses:

$$ \begin{aligned} p_X(0)&=\binom40\left(\tfrac13\right)^0\left(\tfrac23\right)^4=\tfrac{16}{81},\\ p_X(1)&=\binom41\left(\tfrac13\right)^1\left(\tfrac23\right)^3=\tfrac{32}{81},\\ p_X(2)&=\binom42\left(\tfrac13\right)^2\left(\tfrac23\right)^2=\tfrac{24}{81},\\ p_X(3)&=\binom43\left(\tfrac13\right)^3\left(\tfrac23\right)^1=\tfrac{8}{81},\\ p_X(4)&=\binom44\left(\tfrac13\right)^4\left(\tfrac23\right)^0=\tfrac{1}{81}. \end{aligned} $$

Every mass is nonnegative, and their sum is \((16+32+24+8+1)/81=81/81=1\). The probability of exactly two successes is \(p_X(2)=24/81=8/27\). The probability of at least three successes includes the values 3 and 4, so it is \(8/81+1/81=9/81=1/9\). As a check, the complementary event \(X\le2\) has probability \((16+32+24)/81=72/81=8/9\), and \(1/9+8/9=1\).

A geometric random variable, under the convention used here, counts the trial on which the first success occurs. Thus its possible values are the positive integers. If the success probability satisfies \(0<p\le1\), then

$$ \mathbb{P}(X=k)=(1-p)^{k-1}p,\qquad k=1,2,\ldots. $$

In this formula \(k\) means that there are exactly \(k-1\) failures followed by a success. The event \(X\ge k\), by contrast, means that the first \(k-1\) trials are all failures; it does not require a success on trial \(k\).

Result: The geometric masses normalize for \(0<p\le1\). Writing \(q=1-p\), if \(0<p<1\) then \(0<q<1\) and \(\sum_{k=1}^{\infty}q^{k-1}p=p\sum_{r=0}^{\infty}q^r=p/(1-q)=1\). If \(p=1\), the mass is one at \(k=1\) and zero at every \(k\ge2\).

Proof. For \(0<p<1\), the finite geometric sum satisfies \(\sum_{r=0}^{m}q^r=(1-q^{m+1})/(1-q)\). Since \(0<q<1\), \(q^{m+1}\) tends to zero as \(m\) tends to infinity. Consequently, \(\sum_{r=0}^{\infty}q^r=1/(1-q)\). Multiplying by \(p\), and using \(1-q=p\), gives total mass \(p/p=1\). Each term \(q^{k-1}p\) is nonnegative. If \(p=1\), then the first trial succeeds with probability one, so the specified masses are one at \(k=1\) and zero thereafter; they also sum to one. \(\square\)

Worked Example: Geometric Waiting Time

Suppose the probability of success on each trial is \(p=\tfrac14\), so the failure probability is \(q=1-p=\tfrac34\). Let \(X\) count the trial of the first success. The probability of success on trial 3, meaning exactly two failures followed by success, is

$$ \mathbb{P}(X=3)=\left(\tfrac34\right)^2\left(\tfrac14\right)=\tfrac{9}{16}\cdot\tfrac14=\tfrac{9}{64}. $$

The event \(X\le3\) is that the first success occurs on trial 1, 2, or 3. Its probability is the sum of those three masses: \(\tfrac14+\tfrac34\cdot\tfrac14+\tfrac{9}{16}\cdot\tfrac14=\tfrac{16}{64}+\tfrac{12}{64}+\tfrac{9}{64}=\tfrac{37}{64}\). The tail event \(X\ge4\) means that the first three trials all fail, so its probability is \((\tfrac34)^3=\tfrac{27}{64}\). These events partition the outcomes, and \(\tfrac{37}{64}+\tfrac{27}{64}=\tfrac{64}{64}=1\), checking the calculation.

Reading Supports and Avoiding Tail Errors

Support is part of a pmf, not an optional afterthought. A formula may be valid only for particular values: a Bernoulli variable has possible values 0 and 1; a binomial count with \(n\) trials has possible values from 0 through \(n\); and the geometric waiting time in this convention takes positive integer values. When computing an event probability, sum over the values in the event that can carry mass. Values outside the support contribute zero. Also distinguish the positive-mass support from a larger set on which a formula is stated: for endpoint Bernoulli or binomial parameters, some nominal values have zero mass.

Common mistake: confusing an exact value with a tail. With a fair success probability \(p=\tfrac12\), the probability of exactly one failure followed by success is \(\mathbb{P}(X=2)=(\tfrac12)^1(\tfrac12)=\tfrac14\). It is incorrect to use this as the probability of at least one failure before eventual success. That latter event includes two failures then success, three failures then success, and every longer finite string of failures before success. Its probability is \(\sum_{k=2}^{\infty}(\tfrac12)^{k-1}(\tfrac12)=\sum_{r=1}^{\infty}(\tfrac12)^{r+1}=\tfrac12\), not \(\tfrac14\). Equivalently, the event is that the first trial fails, which has probability \(\tfrac12\). The expression \(q^{k-1}p\) is the probability of exactly \(k-1\) failures followed by success, namely \(X=k\); a tail probability requires summing all relevant masses.

The same discipline applies to any discrete law: first state the values the variable can take, then translate the event into those values, and finally add the corresponding masses. Checking that the full list sums to one—and, where useful, checking an event against its complement—catches many errors before they propagate into later calculations.

Check Your Understanding

For each question, identify the relevant support values before adding masses.

  1. A Bernoulli variable has success probability \(\tfrac25\). Write its pmf and find the probability that its value is not 1. Verify normalization.
  2. A binomial variable has \(n=3\) and \(p=\tfrac12\). Compute all four masses and check that they sum to one.
  3. For a geometric waiting time with success probability \(\tfrac13\), find the probability of exactly three trials and the probability of needing at least three trials. Explain why these are different events.
  4. Why does a pmf determine probabilities of Borel events even when the variable is only known to lie in its countable possible-value set almost surely?
  5. Give one endpoint case for a Bernoulli or binomial law and state its positive-mass support.