Tutorials › VEE Mathematical Statistics › Building a PMF from a Finite Outcome Model

VEE Mathematical Statistics · Random Variables and Distribution Functions · Tutorial 41 of 880

Building a PMF from a Finite Outcome Model

Translate a finite outcome model into a probability mass function by grouping outcomes that produce the same numerical value.

Beginner 10 min read

What You'll Learn

  • Define a numerical random variable as a function on a finite sample space.
  • Distinguish outcomes in the sample space from values of the random variable.
  • Group outcomes that produce the same value before calculating its probability.
  • Construct a PMF when outcomes are equally likely and when their probabilities differ.
  • Check a PMF against the probabilities in the original outcome model.
  • Avoid counting each value only once when several outcomes produce it.

From Outcomes to Probabilities of Numerical Values

A finite probability model describes a limited set of possible outcomes, such as the faces of a die or the possible results of a small experiment. A numerical random variable assigns a number to each outcome. To build its probability mass function (PMF), identify which outcomes produce each numerical value, then add the probabilities of those outcomes.

The key distinction is between an outcome and a value of the random variable. Different outcomes can produce the same value. For example, several different results of a sequence of coin tosses may all produce the value “two heads.” The PMF records the probability of that value, not the separate probabilities as unrelated entries.

Definition: Let \(\Omega\) be a finite sample space with outcome probabilities \(P(\{\omega\})\), and let \(X=g(\omega)\) be a numerical random variable defined on \(\Omega\). The PMF of \(X\) is $$ p_X(x)=P(X=x)=\sum_{\{\omega\in\Omega:\,g(\omega)=x\}}P(\{\omega\}). $$ The sum is over every outcome that the function \(g\) maps to \(x\). If no outcome maps to \(x\), then \(p_X(x)=0\).

The set of outcomes that map to a particular value \(x\) is sometimes called the preimage of \(x\). For a finite model, the practical method is direct: list the outcomes, evaluate \(X\) for each one, group outcomes with matching values, and add their probabilities within each group. When all outcomes are equally likely, counting the group’s outcomes is enough to find its probability. When the outcomes have different probabilities, their probabilities—not just their count—must be added.

Worked Examples

Worked Example: Counting Heads in Three Fair Tosses

A hypothetical game uses three independent, fair coin tosses. Each of the eight ordered sequences is equally likely. Let \(X\) be the number of heads. Construct the PMF of \(X\), then find the probability of getting at least two heads.

Method. Treat each ordered sequence as one outcome, assign its number of heads, and group sequences with the same value. The coin model is fair and independent, so each sequence has probability \((1/2)^3=1/8\). No interest rate or mortality assumption is involved.

The sample space is \(\{HHH,HHT,HTH,THH,HTT,THT,TTH,TTT\}\). Grouping by the number of heads gives:

Value \(x\)Outcomes with \(X=x\)Number of outcomes\(p_X(x)\)
0TTT1\(1/8\)
1HTT, THT, TTH3\(3/8\)
2HHT, HTH, THH3\(3/8\)
3HHH1\(1/8\)

For instance, three different sequences produce \(X=2\), and each has probability \(1/8\), so \(p_X(2)=1/8+1/8+1/8=3/8\). The same reasoning gives the remaining entries. Thus the PMF is \(p_X(0)=1/8,\ p_X(1)=3/8,\ p_X(2)=3/8,\ p_X(3)=1/8\).

“At least two heads” means the disjoint values \(X=2\) or \(X=3\). Therefore, \(P(X\ge 2)=p_X(2)+p_X(3)=3/8+1/8=4/8=1/2\). As a check, the grouped outcome counts are \(1+3+3+1=8\), the number of outcomes in the model.

Common mistake avoided: Counting the value \(X=2\) only once would give \(1/8\), but three distinct sequences produce that value. The PMF probability is their combined probability, \(3/8\).

Worked Example: Grouping Outcomes With Unequal Probabilities

A hypothetical document-routing model has four possible routing outcomes \(A,B,C,D\), with probabilities \(0.10, 0.20, 0.30, 0.40\), respectively. The numerical score \(X\) assigned to an outcome is \(0\) for \(A\), \(1\) for \(B\) or \(C\), and \(2\) for \(D\). Construct the PMF and find \(P(X\ge 1)\).

Method. Because the outcomes are not equally likely, add their stated probabilities within each score group. The probabilities are part of the finite model; no distributional or interest-rate assumption is needed.

For \(X=0\), the only outcome is \(A\), so \(p_X(0)=P(A)=0.10\). For \(X=1\), both \(B\) and \(C\) map to 1, so \(p_X(1)=P(B)+P(C)=0.20+0.30=0.50\). For \(X=2\), only \(D\) maps to 2, so \(p_X(2)=P(D)=0.40\). The PMF is therefore

$$ p_X(0)=0.10,\qquad p_X(1)=0.50,\qquad p_X(2)=0.40. $$

The event \(X\ge 1\) includes both scores 1 and 2. Hence \(P(X\ge 1)=p_X(1)+p_X(2)=0.50+0.40=0.90\). This also equals the probability of outcomes \(B,C,D\): \(0.20+0.30+0.40=0.90\).

Common mistake avoided: The outcomes \(B\) and \(C\) are separate outcomes but produce the same value of \(X\). Leaving their probabilities separate does not give the PMF entry for \(x=1\); that entry is their sum, \(0.50\). Counting outcomes alone would also be wrong here: the group has two outcomes, but its probability is not “two” or a fraction based on four equally likely outcomes.

Worked Example: Combining a Die and a Coin

A fair six-sided die is rolled and an independent fair coin is tossed. There are 12 equally likely ordered outcomes \((d,c)\), where \(d\) is the die face and \(c\) is \(H\) or \(T\). Define \(X=0\) when the die result is odd, \(X=1\) when the die result is even and the coin shows tails, and \(X=2\) when the die result is even and the coin shows heads. Construct the PMF and find \(P(X>0)\).

Method. Independence and fairness make each ordered outcome probability \((1/6)(1/2)=1/12\). Group the 12 outcomes according to the stated rule for \(X\). No interest or mortality model is involved.

The outcomes with odd die results are \((1,H),(1,T),(3,H),(3,T),(5,H),(5,T)\). There are six, and each maps to \(X=0\). The outcomes with even die results and tails are \((2,T),(4,T),(6,T)\), three outcomes mapping to \(X=1\). The outcomes with even die results and heads are \((2,H),(4,H),(6,H)\), also three outcomes, mapping to \(X=2\).

Adding the probabilities in each group gives \(p_X(0)=6(1/12)=6/12=1/2\), \(p_X(1)=3(1/12)=3/12=1/4\), and \(p_X(2)=3(1/12)=3/12=1/4\). Thus \(P(X>0)=p_X(1)+p_X(2)=1/4+1/4=1/2\). This agrees with the direct event description: \(X>0\) exactly when the die result is even, which has probability \(3/6=1/2\).

Common mistake avoided: The coin result matters only when the die is even. Assigning separate values based on heads and tails for odd die results would contradict the definition of \(X\); all six odd-die outcomes belong in the \(X=0\) group.

Why Grouping Gives the PMF

The construction follows directly from the definition of probability for disjoint events. Fix a possible value \(x\). The event \(X=x\) consists of exactly those sample-space outcomes \(\omega\) for which \(g(\omega)=x\). Each outcome is a distinct elementary event, and distinct elementary events cannot occur simultaneously. The outcomes in this group are therefore disjoint, so the probability of their union is the sum of their probabilities:

$$ \{X=x\}=\bigcup_{\{\omega:\,g(\omega)=x\}}\{\omega\}, \qquad P(X=x)=\sum_{\{\omega:\,g(\omega)=x\}}P(\{\omega\}). $$

This is why the PMF is formed by grouping first and adding second. The mapping \(g\) may send one outcome to a value or many outcomes to the same value; the formula handles either case. If the probabilities differ, each outcome contributes its own probability. If all \(N\) outcomes are equally likely, each has probability \(1/N\). A group containing \(k\) outcomes then has probability \(k/N\).

A useful practical check is to compare the groups with the original sample space: every possible outcome should appear in exactly one group, because the function assigns exactly one numerical value to each outcome. In a correctly specified finite model, the probabilities attached to the grouped values account for the outcomes in the model. This check can reveal a missed outcome or a probability counted twice.

A Reliable Construction Process

1
Write down the model.
State the outcomes and their probabilities. Record whether outcomes are equally likely; do not assume equal probabilities unless the model says so or they follow from its stated assumptions.
2
Apply the random-variable rule.
For each outcome, calculate the numerical value assigned by \(X=g(\omega)\). Keep the outcome and its assigned value visible while working.
3
Group matching values.
Collect all outcomes that produce the same \(x\). Different outcomes in a group remain distinct when their probabilities are added.
4
Add probabilities and check.
Sum the original outcome probabilities within each group. Confirm that the groups include all outcomes and that no outcome was omitted or counted twice.

Common Exam Traps

  • Confusing a value with an outcome. If three outcomes produce \(X=1\), the value 1 appears once in the PMF, with probability equal to the sum for all three outcomes.
  • Assuming equal likelihood from a finite list. A sample space can be finite even when its outcomes have unequal probabilities. Use the probabilities given by the model.
  • Using the number of outcomes instead of their probabilities. The shortcut \(k/N\) is valid only when all \(N\) outcomes are equally likely.
  • Leaving out a possible value or including an impossible one as positive. The possible values are the outputs actually produced by the mapping. A value not produced by any outcome has probability zero.
  • Misreading an event involving \(X\). Translate a condition such as \(X\ge 1\) into the corresponding values, then add their PMF entries—or identify the matching original outcomes and add their probabilities.
Key takeaway: A finite-outcome PMF is obtained by applying the random-variable rule to every outcome, grouping outcomes that produce the same value, and adding the probabilities within each group. Count outcomes only when the model makes them equally likely.

Check Your Understanding

For each problem, identify the values of the random variable and combine the probabilities of outcomes that give the same value.

  1. A fair die is rolled. Let \(X=1\) for a roll of 1 or 2, and \(X=2\) for a roll of 3, 4, 5, or 6. Give the PMF of \(X\). (Answer: \(p_X(1)=1/3,\ p_X(2)=2/3\).)
  2. Two fair coins are tossed. Let \(X\) be the number of tails. Give the PMF of \(X\). (Answer: \(p_X(0)=1/4,\ p_X(1)=1/2,\ p_X(2)=1/4\).)
  3. In a hypothetical routing model, outcomes \(A,B,C,D\) have probabilities \(0.10,0.20,0.30,0.40\), respectively. Assign \(X=0\) to \(A\), \(X=1\) to \(B\) and \(C\), and \(X=2\) to \(D\). Give the PMF and calculate \(P(X\ge 1)\). (Answer: \(p_X(0)=0.10,\ p_X(1)=0.50,\ p_X(2)=0.40;\ P(X\ge1)=0.90\).)
  4. A spinner has outcomes \(r,s,t,u,v\) with probabilities \(0.05,0.15,0.20,0.25,0.35\), respectively. A score is \(X=0\) for \(r\), \(X=2\) for \(s\) or \(t\), and \(X=5\) for \(u\) or \(v\). Give the PMF and calculate \(P(X=2\text{ or }5)\). (Answer: \(p_X(0)=0.05,\ p_X(2)=0.35,\ p_X(5)=0.60;\ P(X=2\text{ or }5)=0.95\).)
  5. A fair die and a fair coin are used independently. Let \(X=0\) for an odd die result, \(X=1\) for an even result with tails, and \(X=2\) for an even result with heads. Give the PMF and find \(P(X>0)\). (Answer: \(p_X(0)=1/2,\ p_X(1)=1/4,\ p_X(2)=1/4;\ P(X>0)=1/2\).)
Clinical Biostats