Tutorials › Generalized Linear Models › Cumulative Distribution Functions And Event Probabilities

Probability Models for Responses · Tutorial 5 of 981

Cumulative Distribution Functions And Event Probabilities

Use the CDF to calculate event probabilities while correctly accounting for jumps, flat regions, and interval endpoints.

Beginner 10 min read

What You'll Learn

  • Define the CDF and its left limit, and relate jumps to point probabilities.
  • Calculate probabilities for intervals with different open and closed endpoints.
  • Read point masses and zero-probability regions from jumps and flat stretches.
  • Apply CDF calculations to discrete, density-based, and mixed response distributions.
  • Avoid endpoint errors, including the degenerate interval with equal endpoints.

Why the Cumulative Distribution Function Is Useful

A response distribution can be described by probabilities at individual values, by a density, or by a mixture of both. The cumulative distribution function provides a common way to answer questions about all of these distributions: it records the probability that a response is no greater than a given threshold. Once that function is known, many point and interval probabilities follow by subtraction.

The details at interval endpoints matter. A discrete response can have positive probability at a single value, while a response with a density has probability zero at any one value. The CDF makes this distinction visible through its jumps and continuity.

Definition: For a real-valued random variable \(X\), its cumulative distribution function is \(F(x)=P(X\leq x)\), for every real number \(x\). Its left limit at \(x\) is written \(F(x-)=\lim_{t\uparrow x}F(t)\). The left limit equals \(P(X<x)\).

Reading the CDF: Jumps, Continuity, and Flat Regions

A CDF is nondecreasing: if \(x\leq y\), then \(\{X\leq x\}\) is contained in \(\{X\leq y\}\), so \(F(x)\leq F(y)\). It is right-continuous, and its limits at negative and positive infinity are 0 and 1. These properties follow from basic continuity properties of probability.

Theorem: For every real-valued random variable \(X\), \(F\) is nondecreasing and right-continuous, \(\lim_{x\to-\infty}F(x)=0\), and \(\lim_{x\to+\infty}F(x)=1\). Moreover, \(F(x-)=P(X<x)\), and the probability at an individual value is the jump size: \(P(X=x)=F(x)-F(x-)\).

Proof. Monotonicity follows from event inclusion. To prove right-continuity at \(x\), take any sequence \(x_n\downarrow x\). The events \(\{X\leq x_n\}\) decrease to \(\{X\leq x\}\). Continuity of probability for a decreasing sequence of events (whose first event has probability at most 1) gives \(F(x_n)\to F(x)\). This establishes right-continuity.

For a sequence \(t_n\uparrow x\), the events \(\{X\leq t_n\}\) increase to \(\{X<x\}\). Continuity of probability for an increasing sequence gives \(\lim_n F(t_n)=P(X<x)\), which proves the left-limit identity. The event \(\{X\leq x\}\) is the disjoint union of \(\{X<x\}\) and \(\{X=x\}\). Therefore \(F(x)=F(x-)+P(X=x)\), yielding the jump formula. Finally, as \(x\to-\infty\), the events \(\{X\leq x\}\) decrease to the empty set; as \(x\to+\infty\), they increase to the whole sample space for a real-valued \(X\). Continuity of probability gives the two limits. \(\square\)

For a discrete response, positive point probabilities appear as upward jumps. If \(X\) has a density, then \(P(X=x)=0\) for every \(x\), so its CDF has no jumps. A flat stretch indicates that the response has zero probability in the corresponding interval: if \(F(a)=F(b)\) for \(a\leq b\), then \(P(a<X\leq b)=0\). A CDF can have both jumps and flat stretches.

Interval Probabilities and Endpoint Conventions

The CDF gives interval probabilities by taking differences. Whether an endpoint is included determines whether its point mass is included. The formulas below work for arbitrary real-valued responses; formulas involving \(F(b-)\) use the left limit just defined.

Theorem: For real numbers \(a\leq b\), \(P(a<X\leq b)=F(b)-F(a)\), \(P(a\leq X\leq b)=F(b)-F(a-)\), and \(P(a\leq X<b)=F(b-)-F(a-)\). For \(a<b\), \(P(a<X<b)=F(b-)-F(a)\). If \(a=b\), then \(P(a<X<a)=0\). Also, \(P(X>x)=1-F(x)\) and \(P(X\geq x)=1-F(x-)\).

Proof. The event \(\{a<X\leq b\}\) is the part of \(\{X\leq b\}\) left after removing \(\{X\leq a\}\), so its probability is \(F(b)-F(a)\). For \(\{a\leq X\leq b\}\), remove \(\{X<a\}\) from \(\{X\leq b\}\), giving \(F(b)-F(a-)\). Similarly, \(\{a\leq X<b\}\) is \(\{X<b\}\) with \(\{X<a\}\) removed, giving \(F(b-)-F(a-)\).

When \(a<b\), \(\{a<X<b\}\) is \(\{X<b\}\) with \(\{X\leq a\}\) removed, so its probability is \(F(b-)-F(a)\). When \(a=b\), the event \(\{a<X<a\}\) is empty and has probability zero. The strict upper tail is the complement of \(\{X\leq x\}\), while \(\{X\geq x\}\) is the complement of \(\{X<x\}\), proving the two tail formulas. \(\square\)

If \(X\) has a density \(f\), then \(P(X=x)=0\) at each point. Thus \(F(x-)=F(x)\), and including or excluding a finite endpoint does not change an interval probability. Where the density is defined, the interval probability can also be calculated by integrating \(f\) over the interval. For a discrete response, endpoint changes can change the answer, so the relevant left limit or CDF value must be used.

Worked Example: A Discrete Response With Several Jumps

Suppose \(X\) takes the values 0, 1, and 3, with probabilities \(0.2\), \(0.5\), and \(0.3\), respectively. The probabilities sum to \(0.2+0.5+0.3=1\). The CDF is \(F(x)=0\) for \(x<0\), \(F(x)=0.2\) for \(0\leq x<1\), \(F(x)=0.7\) for \(1\leq x<3\), and \(F(x)=1\) for \(x\geq3\).

Point probability at 1. Since \(F(1)=0.7\) and \(F(1-)=0.2\), the jump is \(F(1)-F(1-)=0.7-0.2=0.5\), as specified.

Probability from 0 through 1, including both endpoints. The formula is \(P(0\leq X\leq1)=F(1)-F(0-)=0.7-0=0.7\). This includes the masses at both 0 and 1.

Probability strictly between 0 and 3. Since \(0<3\), use \(P(0<X<3)=F(3-)-F(0)=0.7-0.2=0.5\). Only the mass at 1 is in this open interval.

Probability from 1 up to but not including 3. Here \(P(1\leq X<3)=F(3-)-F(1-)=0.7-0.2=0.5\). It includes the mass at 1 and excludes the mass at 3.

Worked Example: Calculating an Interval Probability From a Density

Suppose a response has density \(f(x)=x+1\) for \(-1\leq x\leq0\), \(f(x)=1-x\) for \(0<x\leq1\), and \(f(x)=0\) elsewhere. The total integral is \(\int_{-1}^{0}(x+1)\,dx+\int_{0}^{1}(1-x)\,dx=\frac12+\frac12=1\).

For \(-1\leq x\leq0\), integrating from the left endpoint gives \(F(x)=\int_{-1}^{x}(t+1)\,dt=(x+1)^2/2\). For \(0<x\leq1\), the probability accumulated up to 0 is \(1/2\), so \(F(x)=1/2+\int_0^x(1-t)\,dt=1/2+x-x^2/2\). Outside the support, \(F(x)=0\) for \(x<-1\) and \(F(x)=1\) for \(x>1\).

To calculate \(P(-0.5<X\leq0.5)\), first evaluate \(F(0.5)=1/2+0.5-(0.5)^2/2=0.875\). Also, \(F(-0.5)=((-0.5)+1)^2/2=(0.5)^2/2=0.125\). Therefore \(P(-0.5<X\leq0.5)=F(0.5)-F(-0.5)=0.875-0.125=0.75\). There is no point mass at either endpoint, so the same probability results if either endpoint is included or excluded.

The CDF is flat to the left of \(-1\) and to the right of 1. For example, \(P(2<X\leq4)=F(4)-F(2)=1-1=0\): the response has no probability in that region.

Mixed Distributions: Using Both Jumps and Flat Regions

A CDF need not be entirely smooth or entirely composed of jumps. It can increase continuously over part of the response range, stay flat over another part, and jump at individual values. The same endpoint formulas apply without modification.

Worked Example: A CDF With a Jump, a Continuous Part, and a Flat Stretch

Suppose a response has probability \(0.2\) at \(-1\), a continuous component with density \(0.25\) on \([0,2]\), and probability \(0.3\) at 3. The continuous component has total probability \(0.25(2-0)=0.5\), so the three parts sum to \(0.2+0.5+0.3=1\). Its CDF is 0 for \(x<-1\); 0.2 for \(-1\leq x<0\); \(0.2+x/4\) for \(0\leq x\leq2\); 0.7 for \(2<x<3\); and 1 for \(x\geq3\).

Mass at \(-1\). The left limit is \(F((-1)-)=0\), while \(F(-1)=0.2\). Thus \(P(X=-1)=0.2-0=0.2\).

Probability from 0, excluded, to 2, included. Since \(F(0)=0.2\) and \(F(2)=0.2+2/4=0.7\), \(P(0<X\leq2)=F(2)-F(0)=0.7-0.2=0.5\).

Probability from 2 through 3, including both endpoints. The left limit at 2 is \(F(2-)=0.7\), and \(F(3)=1\). Therefore \(P(2\leq X\leq3)=F(3)-F(2-)=1-0.7=0.3\). This interval includes the atom at 3; there is no atom at 2.

Probability strictly between 2 and 3. The CDF is flat there, so \(P(2<X<3)=F(3-)-F(2)=0.7-0.7=0\). The jump at 3 is not part of the open interval.

Common Mistakes and Why the CDF Matters

The CDF is useful because it puts probability questions for discrete, continuous, and mixed responses on the same footing. In applications, thresholds often define meaningful events: a measurement exceeding a clinical cutoff, a count lying in a specified range, or a response falling below a limit. The CDF translates those questions into event probabilities while keeping endpoint conventions explicit.

  • Using \(F(x)\) as the probability at \(x\). \(F(x)\) is \(P(X\leq x)\), not \(P(X=x)\). The point probability is \(F(x)-F(x-)\).
  • Ignoring a jump at an included endpoint. For example, \(P(a\leq X\leq b)\) uses \(F(a-)\), not \(F(a)\), because the event includes any mass at \(a\).
  • Assuming every endpoint has zero probability. This is true for a response with a density, but not for every response. Check whether the CDF jumps at the endpoint.
  • Applying the open-interval formula when \(a=b\). The formula \(F(b-)-F(a)\) for \(P(a<X<b)\) requires \(a<b\). When \(a=b\), the event is empty and its probability is zero. Substituting \(a=b\) into that formula could give a negative value if there is a point mass at \(a\).
  • Calling every flat region evidence of a point mass. A flat region indicates zero probability across that stretch; point masses are indicated by jumps, not by flatness.
Key takeaway: Start with the event’s exact endpoint convention. Use \(F(x)=P(X\leq x)\), use \(F(x-)=P(X<x)\), and subtract the matching cumulative probabilities. A jump represents point mass; a flat stretch represents a region with no probability.

Check Your Understanding

Use the CDF definitions and endpoint formulas to answer each question.

  1. For a response with a point mass at \(x=2\), which expression gives \(P(X=2)\) in terms of the CDF and its left limit?
  2. State a CDF formula for \(P(a\leq X<b)\), and explain which endpoints it includes.
  3. If \(F(4)=F(7)\), what is \(P(4<X\leq7)\)? Does this conclusion tell you whether there is a point mass at 4?
  4. Why must the formula \(P(a<X<b)=F(b-)-F(a)\) be restricted to \(a<b\)? What is the probability when \(a=b\)?
  5. A CDF has a jump from 0.35 just before \(x=5\) to 0.50 at \(x=5\). What is \(P(X=5)\)?
Clinical Biostats