Tutorials › VEE Mathematical Statistics › Worked PMF-to-CDF and Event-Probability Problems

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

Worked PMF-to-CDF and Event-Probability Problems

Learn to build a discrete distribution from outcome data and use its CDF to calculate event probabilities without mishandling endpoints.

Beginner 10 min read

What You'll Learn

  • Aggregate outcome probabilities that correspond to the same value of a random variable.
  • Construct a PMF and verify that its probabilities sum to one.
  • Write the CDF as a step function on and between support points.
  • Calculate point, interval, and inequality-event probabilities from a PMF or CDF.
  • Choose the correct CDF endpoint convention for strict and non-strict inequalities.

From an Outcome Table to Event Probabilities

A finite outcome table describes the possible results of a random process and the probability of each result. A random variable assigns a numerical value to every outcome. To answer questions about that variable, first combine the probabilities of outcomes that produce the same value. The resulting probability mass function (PMF) summarizes the distribution of the random variable; its cumulative distribution function (CDF) then makes many event probabilities quick to calculate.

The details matter when an event uses a strict inequality or an interval endpoint. For a discrete random variable, probability can be concentrated exactly at an endpoint. A calculation that includes or excludes that point incorrectly can change the answer even when the numerical bounds look nearly identical.

Definition: For a discrete random variable \(X\), its probability mass function is \(p_X(x)=P(X=x)\). Its cumulative distribution function is \(F_X(x)=P(X\le x)\). The support is the set of values \(x\) for which \(p_X(x)>0\). For a finite model, the PMF probabilities sum to one, and the CDF is constant between consecutive support values.

Organize the Calculation

A table may list elementary outcomes rather than values of \(X\). If several outcomes give the same value \(x\), then \(P(X=x)\) is the sum of their outcome probabilities. Once the PMF is assembled, order its support values from smallest to largest. At each support value, the CDF adds that value's probability to all the probability accumulated so far.

For event calculations, translate the event into support values or use the CDF with the correct endpoints. The useful identities include:

$$ P(X\le b)=F_X(b), \qquad P(X>b)=1-F_X(b), \qquad P(X\ge b)=1-F_X(b-), $$

where \(F_X(b-)=P(X<b)\) is the left limit of the CDF at \(b\). For \(a<b\),

$$ P(a<X\le b)=F_X(b)-F_X(a), \qquad P(a\le X\le b)=F_X(b)-F_X(a-). $$

These identities apply to discrete as well as continuous distributions. In a discrete model, the left limit is especially useful because \(F_X(a)\) includes the probability at \(a\), while \(F_X(a-)\) excludes it.

Worked Example: Grouping Outcomes and Building the CDF

A hypothetical inspection program assigns a score \(X\) to a randomly selected device. The table gives every possible inspection outcome and its probability. Construct the PMF and CDF, then calculate \(P(X\le 1)\) and \(P(1<X\le 3)\).

Inspection outcomeProbabilityScore \(X\)
No fault detected0.120
Minor indicator A0.181
Minor indicator B0.251
Single repair needed0.152
Multiple repairs needed0.203
Replacement required0.103

Method: aggregate probabilities by score. There are two outcomes with score 1 and two with score 3. Therefore,

$$ p_X(0)=0.12,\quad p_X(1)=0.18+0.25=0.43,\quad p_X(2)=0.15,\quad p_X(3)=0.20+0.10=0.30. $$

Check the PMF total: \(0.12+0.43+0.15+0.30=1.00\). The outcome probabilities in the original table also total \(0.12+0.18+0.25+0.15+0.20+0.10=1.00\), so the grouped distribution is consistent.

Construct the CDF. Below 0, no support value has been reached. At 0 the CDF jumps to 0.12; at 1 it increases by 0.43; at 2 it increases by 0.15; and at 3 it increases by 0.30. Thus,

$$ F_X(x)= \begin{cases} 0, & x<0,\\ 0.12, & 0\le x<1,\\ 0.55, & 1\le x<2,\\ 0.70, & 2\le x<3,\\ 1, & x\ge 3. \end{cases} $$

The first event includes the scores 0 and 1:

$$ P(X\le 1)=p_X(0)+p_X(1)=0.12+0.43=0.55=F_X(1). $$

The second event includes the scores strictly greater than 1 and no greater than 3, namely 2 and 3:

$$ P(1<X\le 3)=p_X(2)+p_X(3)=0.15+0.30=0.45. $$

The CDF gives the same result: \(F_X(3)-F_X(1)=1-0.55=0.45\). As a check, the two disjoint events \(X\le1\) and \(1<X\le3\) cover the support, and their probabilities sum to \(0.55+0.45=1.00\). The common mistake avoided here is treating the two outcomes with score 1 as only one outcome's probability.

Why CDF Differences Work

A CDF value includes all probability at or below its argument. Subtracting two such accumulated probabilities removes the probability below the lower bound and leaves exactly the probability between the bounds, with the endpoint convention determined by the subtraction.

1
Start with the upper cumulative probability.
\(F_X(b)\) is the probability of the event \(X\le b\).
2
Remove the probability at or below the lower bound.
\(F_X(a)\) is \(P(X\le a)\), so subtracting it removes all values at or below \(a\).
3
Identify what remains.
The event left over is \(a<X\le b\), giving \(P(a<X\le b)=F_X(b)-F_X(a)\).

This argument is a direct use of disjoint events: \(\{X\le b\}\) is the union of \(\{X\le a\}\) and \(\{a<X\le b\}\), and those two events do not overlap. Therefore their probabilities add, and rearranging gives the CDF-difference formula. If the lower endpoint is to be included, subtract \(F_X(a-)=P(X<a)\) instead; then the remaining event is \(a\le X\le b\).

Worked Example: Strict and Inclusive Endpoints

A hypothetical service contract has a discrete payout \(X\), in thousands of dollars. The possible payout amounts and probabilities are shown below. Find \(P(1\le X<4)\) and \(P(X\ge2)\).

Payout \(x\), in thousands\(p_X(x)\)
00.08
10.17
20.25
40.20
60.30

First check the model. The probabilities total \(0.08+0.17+0.25+0.20+0.30=1.00\). The CDF values at the support points are

$$ F_X(0)=0.08,\quad F_X(1)=0.25,\quad F_X(2)=0.50,\quad F_X(4)=0.70,\quad F_X(6)=1.00. $$

For \(1\le X<4\), the only possible payout values are 1 and 2. Thus,

$$ P(1\le X<4)=p_X(1)+p_X(2)=0.17+0.25=0.42. $$

Using CDF limits gives the same result. Since there is no support value strictly between 2 and 4, \(F_X(4-)=F_X(2)=0.50\). Also, \(F_X(1-)=P(X<1)=0.08\). Therefore,

$$ P(1\le X<4)=F_X(4-)-F_X(1-)=0.50-0.08=0.42. $$

For \(X\ge2\), include the mass at 2 as well as the masses at 4 and 6:

$$ P(X\ge2)=0.25+0.20+0.30=0.75. $$

Equivalently, \(P(X\ge2)=1-P(X<2)=1-F_X(2-)=1-0.25=0.75\). The two event probabilities check against the PMF: the first uses values 1 and 2, and the second uses 2, 4, and 6, so their overlap at 2 is intentional. The mistake avoided is assuming that an interval written with a strict upper bound includes the mass at that upper bound.

A Full Event Calculation from a Finite Table

When an outcome table contains several support values, it is often safest to list the values that satisfy each event before calculating. A non-integer threshold does not create a new possible value of a discrete random variable; it only determines which existing support values are included.

Worked Example: Multiple Inequalities from an Outcome Table

A hypothetical monitoring system records a signed adjustment \(X\), in dollars, for one account. The table lists the system's possible outcomes. Construct the PMF and CDF, then find \(P(X\le1.5)\), \(P(-1<X\le5)\), and \(P(X\ge2)\).

System outcomeProbabilityAdjustment \(X\), dollars
Large downward adjustment0.10-2
No adjustment0.200
Small upward adjustment0.452
Large upward adjustment0.255

Build the PMF. Each outcome has a different adjustment, so the PMF is \(p_X(-2)=0.10\), \(p_X(0)=0.20\), \(p_X(2)=0.45\), and \(p_X(5)=0.25\). Its total is \(0.10+0.20+0.45+0.25=1.00\).

Build the CDF. Accumulate the probabilities from the smallest support value upward:

$$ F_X(x)= \begin{cases} 0, & x<-2,\\ 0.10, & -2\le x<0,\\ 0.30, & 0\le x<2,\\ 0.75, & 2\le x<5,\\ 1, & x\ge5. \end{cases} $$

For \(X\le1.5\), the support values that qualify are \(-2\) and 0. Hence,

$$ P(X\le1.5)=0.10+0.20=0.30. $$

For \(-1<X\le5\), the value \(-2\) is excluded, while 0, 2, and 5 are included:

$$ P(-1<X\le5)=0.20+0.45+0.25=0.90. $$

The CDF check is \(F_X(5)-F_X(-1)=1.00-0.10=0.90\). Finally, \(X\ge2\) includes 2 and 5, giving

$$ P(X\ge2)=0.45+0.25=0.70. $$

As a further check, \(P(X<2)=0.10+0.20=0.30\), so \(P(X\ge2)=1-0.30=0.70\). The calculation avoids treating \(1.5\) or \(-1\) as possible outcomes: they are thresholds, not support values.

Common Endpoint Trap

The distinction between \(X>b\) and \(X\ge b\) is most important when there is positive probability at \(b\). In the service-contract example, \(P(X\ge2)=0.75\). A tempting but incorrect calculation is \(1-F_X(2)=1-0.50=0.50\). Since \(F_X(2)=P(X\le2)\), that subtraction gives \(P(X>2)\), which excludes the probability \(P(X=2)=0.25\). The correct calculation is

$$ P(X\ge2)=1-P(X<2)=1-F_X(2-)=1-0.25=0.75. $$

A reliable practice is to translate the inequality into the support values it includes. Use a CDF formula only after confirming whether the endpoint mass belongs in the event. This is also why \(P(X\le b)\) is \(F_X(b)\), while \(P(X<b)\) is \(F_X(b-)\).

Key takeaway: Begin with the outcome table, combine probabilities for equal values of \(X\), and verify that the PMF totals one. Then order the support to build the CDF. For each requested event, check the support values or apply the CDF formula whose endpoints match the inequality exactly.

Check Your Understanding

For each finite model, identify the relevant support values before calculating. Probabilities are written as decimals.

  1. A hypothetical sensor produces readings \(X=0,1,2\) from outcomes with probabilities 0.15, 0.25, and 0.60, respectively. Find \(F_X(1)\) and \(P(X>1)\). (Answer: \(F_X(1)=0.40\), \(P(X>1)=0.60\))
  2. A hypothetical claims file has outcomes with probabilities 0.20, 0.30, 0.10, and 0.40, producing values \(X=0,1,1,3\), respectively. Construct the PMF and find \(P(X=1)\). (Answer: \(p_X(0)=0.20,\ p_X(1)=0.40,\ p_X(3)=0.40;\ P(X=1)=0.40\))
  3. A hypothetical payment amount \(X\) has support \(1,2,4\), with probabilities 0.25, 0.35, and 0.40. Find \(P(1<X\le4)\). (Answer: \(0.75\))
  4. A hypothetical score \(X\) has support \(-1,0,3,6\), with probabilities 0.10, 0.15, 0.50, and 0.25. Find \(P(0\le X<6)\) and \(P(X\ge3)\). (Answer: \(P(0\le X<6)=0.65,\ P(X\ge3)=0.75\))
  5. A hypothetical discrete benefit \(X\) has support \(0,2,5,8\), with probabilities 0.12, 0.28, 0.35, and 0.25. Find \(F_X(4)\), \(P(2<X\le8)\), and \(P(X\ge5)\). (Answer: \(F_X(4)=0.40,\ P(2<X\le8)=0.60,\ P(X\ge5)=0.60\))
Clinical Biostats