Tutorials › Exam FAM - Fundamentals of Actuarial Mathematics › Converting Between CDFs, Densities, And Survival Functions

Exam FAM · Loss Severity Distributions · Tutorial 597 of 988

Converting Between CDFs, Densities, And Survival Functions

Convert among CDFs, densities, and survival functions while handling support endpoints, atoms, and the almost-everywhere meaning of density recovery.

Beginner 10 min read

What You'll Learn

  • Construct a CDF from a density by integrating over its support
  • Read discrete probabilities from the jumps of a CDF
  • Convert between the CDF and the strict-tail survival function
  • Handle atoms and continuous probability in a mixed distribution
  • Distinguish almost-everywhere density recovery from pointwise equality

Introduction

A loss distribution may be described by a probability mass function, a probability density, a cumulative distribution function, or a survival function. Each description emphasizes something different: the probability at individual values, the accumulation of probability up to a value, or the probability remaining above it. Converting among them requires attention to the support and, especially, to whether the distribution has atoms.

For a loss random variable \(X\), the CDF \(F_X\) is defined for every real \(x\), including values outside the support. A density describes probability through integration, not by assigning positive probability to individual points. A discrete distribution instead places probability at particular values, which appear as jumps in its CDF. A mixed distribution can have both jumps and a continuous component.

Definition: The cumulative distribution function is \(F_X(x)=P(X\le x)\). The strict-tail survival function is \(S_X(x)=P(X>x)=1-F_X(x)\). For a discrete \(X\), the probability mass at \(x\) is \(P(X=x)=F_X(x)-F_X(x-)\), where \(F_X(x-)=\lim_{t\uparrow x}F_X(t)\). If \(X\) has density \(f_X\), then \(P(a<X\le b)=\int_a^b f_X(t)\,dt\).

From a Density to a CDF

A density \(f_X\) is nonnegative (apart from immaterial choices on sets of probability zero) and has total integral 1. If \(X\) is absolutely continuous with density \(f_X\), then its CDF is obtained by accumulating density from the far left:

$$ F_X(x)=\int_{-\infty}^{x} f_X(t)\,dt. $$

If the density is specified only on a support interval, it is zero outside that interval, except that its values at individual endpoints do not affect probabilities. The CDF must be 0 below the support, increase by the integrated probability through the support, and equal 1 above it. Checking that the density integrates to 1 verifies that the resulting CDF reaches 1.

Worked Example: Integrating a Density Across Its Support

A hypothetical claim amount \(X\), measured in thousands of dollars, has density \(f_X(x)=x/2\) for \(0<x<2\), and density 0 elsewhere. Find its CDF and survival function, then calculate \(P(0.5<X\le 1.5)\). State the boundary values.

Method. Integrate the density on the support, and use the definitions \(F_X(x)=P(X\le x)\) and \(S_X(x)=1-F_X(x)\). The density is nonnegative on its support, and its total integral is \(\int_0^2 (x/2)\,dx=[x^2/4]_0^2=1\), so it is a valid density.

For \(x\le 0\), no probability has accumulated, so \(F_X(x)=0\). For \(0<x<2\), \[ F_X(x)=\int_0^x \frac{t}{2}\,dt=\left[\frac{t^2}{4}\right]_0^x=\frac{x^2}{4}. \] For \(x\ge 2\), the full probability has accumulated, so \(F_X(x)=1\). Thus \(F_X(0)=0\) and \(F_X(2)=1\); the piecewise CDF can be written as 0 for \(x\le0\), \(x^2/4\) for \(0<x<2\), and 1 for \(x\ge2\).

The survival function is \(1-F_X(x)\). It is 1 for \(x\le0\), \(1-x^2/4\) for \(0<x<2\), and 0 for \(x\ge2\). In particular, \(S_X(0)=1\) and \(S_X(2)=0\).

For the requested interval, use the CDF difference: \[ P(0.5<X\le1.5)=F_X(1.5)-F_X(0.5) =\frac{1.5^2}{4}-\frac{0.5^2}{4} =\frac{2.25-0.25}{4} =\frac{2}{4}=0.5. \] Direct integration checks the result: \(\int_{0.5}^{1.5}(x/2)\,dx=[x^2/4]_{0.5}^{1.5}=(2.25-0.25)/4=0.5\).

Check and trap avoided. The density integrates to 1 and the CDF is nondecreasing from 0 to 1. Treating the density value at an endpoint as a probability would be a mistake: changing a density at \(x=0\) or \(x=2\) does not change any probability.

From a CDF to a Density or Mass Function

A CDF is nondecreasing, right-continuous, and has limits 0 and 1 as \(x\) tends to negative and positive infinity, respectively. These properties help check a proposed CDF. What can be recovered from it depends on the type of distribution.

If the distribution is absolutely continuous, it has a density \(f_X\) satisfying \(F_X(x)=\int_{-\infty}^x f_X(t)\,dt\). The fundamental theorem of calculus for integrals of integrable functions gives

$$ F_X'(x)=f_X(x) \quad \text{for almost every }x. $$

“Almost everywhere” means except possibly on a set of values with length zero. A density is determined only up to changes on such sets: changing its value at one point, for example, changes no integral and therefore changes no probability. Thus, differentiating the CDF recovers the density almost everywhere, not necessarily the value of every chosen version of the density at every point. Pointwise equality requires choosing an appropriate version and suitable regularity conditions.

This derivative rule applies when the distribution is absolutely continuous. It does not, by itself, describe probability concentrated at atoms. For a discrete value \(c\), the jump in the CDF is the probability at that value:

$$ P(X=c)=F_X(c)-F_X(c-). $$

The reason is that \(F_X(c)=P(X\le c)\), while \(F_X(c-)=P(X<c)\). Subtracting removes all outcomes below \(c\), leaving exactly the probability of \(X=c\). A CDF with jumps therefore cannot be represented by an ordinary density alone.

Worked Example: Recovering Probabilities from Discrete Jumps

A hypothetical payment \(X\), in thousands of dollars, takes the values 0, 1, and 3 with probabilities 0.2, 0.5, and 0.3, respectively. Construct its CDF and survival function, find each point probability from the jumps, and calculate \(P(1\le X<3)\).

Method. Add the probabilities at values no greater than \(x\) to form the CDF. The jumps occur at the three possible values. The probabilities sum to \(0.2+0.5+0.3=1\).

For \(x<0\), \(F_X(x)=0\). For \(0\le x<1\), only the mass at 0 is included, so \(F_X(x)=0.2\). For \(1\le x<3\), the masses at 0 and 1 are included, so \(F_X(x)=0.2+0.5=0.7\). For \(x\ge3\), all masses are included and \(F_X(x)=0.2+0.5+0.3=1\).

The jump at 0 is \(F_X(0)-F_X(0-)=0.2-0=0.2\). The jump at 1 is \(F_X(1)-F_X(1-)=0.7-0.2=0.5\). The jump at 3 is \(F_X(3)-F_X(3-)=1-0.7=0.3\). These agree with the specified point probabilities.

Since \(S_X(x)=1-F_X(x)\), the survival function is 1 for \(x<0\), 0.8 for \(0\le x<1\), 0.3 for \(1\le x<3\), and 0 for \(x\ge3\). The strict inequality in \(S_X(x)=P(X>x)\) matters: for example, \(S_X(1)=0.3\), because only the outcome 3 is strictly greater than 1.

The event \(1\le X<3\) contains only the outcome \(X=1\), so its probability is 0.5. Equivalently, it is \(F_X(3-)-F_X(1-)=0.7-0.2=0.5\). Using \(F_X(3)-F_X(1)\) instead would give \(1-0.7=0.3\), incorrectly selecting the mass at 3 rather than the mass at 1.

Check and trap avoided. The jumps sum to \(0.2+0.5+0.3=1\), and the CDF ends at 1. Do not use a derivative to recover these point masses; their information is in the jumps.

Survival Functions, Boundaries, and Mixed Distributions

The identity \(S_X(x)=1-F_X(x)\) follows because the events \(X\le x\) and \(X>x\) are disjoint and together include every possible outcome. At an atom, the choice of strict or non-strict inequality changes the tail probability:

$$ P(X>x)=1-F_X(x), \qquad P(X\ge x)=1-F_X(x-). $$

A mixed distribution has at least one atom and also a continuous component. Its CDF has jumps at the atoms and changes continuously where continuous probability accumulates. On intervals where the distribution has an absolutely continuous component, the density describes that component almost everywhere; the jump sizes still must be handled separately. A CDF can also have a singular component that is neither an atom nor described by an ordinary density, so the derivative rule alone does not recover an arbitrary CDF.

Worked Example: Separating an Atom from a Continuous Component

A hypothetical nonnegative claim \(X\), in thousands of dollars, is zero with probability 0.25. With the remaining probability 0.75, its value is uniformly distributed between 0 and 2. Find its CDF, identify its atom and continuous density, find its survival function, and calculate \(P(0<X\le1.2)\).

Method. Combine the point mass at zero with the probability accumulated by the continuous part. Conditional on being in the continuous component, the density is \(1/2\) on \(0<x<2\); multiplying by the component probability 0.75 gives the unconditional density \(0.75(1/2)=0.375=3/8\) on that interval.

For \(x<0\), \(F_X(x)=0\). At zero, the atom gives \(F_X(0)=0.25\). For \(0<x<2\), the continuous probability accumulated from 0 to \(x\) is \(\int_0^x(3/8)\,dt=3x/8\), so \(F_X(x)=0.25+3x/8\). At \(x=2\), this gives \(0.25+3(2)/8=0.25+0.75=1\); thus \(F_X(x)=1\) for \(x\ge2\).

The jump at zero is \(F_X(0)-F_X(0-)=0.25-0=0.25\), the probability of the atom. On \(0<x<2\), the derivative of the displayed CDF is \(3/8\), which is the continuous density there. The CDF reaches 1 at 2, so the total probability is \(0.25+(3/8)(2)=0.25+0.75=1\).

The survival function is 1 for \(x<0\), \(1-(0.25+3x/8)=0.75-3x/8\) for \(0\le x<2\), and 0 for \(x\ge2\). At zero, \(S_X(0)=0.75\), because it means \(P(X>0)\), not \(P(X\ge0)\).

For \(0<X\le1.2\), only the continuous component contributes. Its probability is \[ \int_0^{1.2}\frac{3}{8}\,dt=\frac{3}{8}(1.2)=0.45. \] The CDF calculation confirms this: \(F_X(1.2)=0.25+(3/8)(1.2)=0.25+0.45=0.70\), and \(F_X(0)=0.25\), so \(F_X(1.2)-F_X(0)=0.70-0.25=0.45\).

Check and trap avoided. The event excludes zero, so subtracting \(F_X(0)\) removes the atom. Using \(F_X(1.2)\) alone would incorrectly include the 0.25 probability at zero.

A Reliable Conversion Procedure

When a problem gives one representation and asks for another, first determine whether the distribution is continuous, discrete, or mixed. Then use the relevant conversion and check its boundaries. The following sequence keeps support and jump conventions explicit.

1
Identify the support and distribution type.
Record where probability can occur and whether there are atoms. Do not assume that a density describes the entire distribution if the CDF has jumps.
2
Build or inspect the CDF.
For a density, integrate from the left endpoint of the support (or from negative infinity). For point masses, add the probabilities at values no greater than \(x\).
3
Recover the requested quantity.
Use \(S_X(x)=1-F_X(x)\); use jump sizes for point probabilities; and, only for an absolutely continuous component, use \(F_X'=f_X\) almost everywhere.
4
Check endpoints and total probability.
Verify that the CDF is nondecreasing and right-continuous, that its limits are 0 and 1, and that any density and jumps together account for total probability 1.

Common Mistakes

Two boundary conventions cause frequent errors. First, a density value at a single point is not a probability and can be changed without affecting the distribution. Second, the strict-tail survival function excludes an atom at the threshold: \(S_X(x)=P(X>x)\), while \(P(X\ge x)=1-F_X(x-)\).

For the mixed example, a mistaken calculation might treat \(S_X(0)\) as \(P(X\ge0)\) and write \(S_X(0)=1\). That is the wrong tail for the survival function defined here. The correction is \(S_X(0)=1-F_X(0)=1-0.25=0.75\); the probability \(P(X\ge0)=1\) is instead \(1-F_X(0-)\).

Finally, do not claim that an arbitrary density equals the derivative of its CDF at every point. For an absolutely continuous distribution, the derivative equals the density almost everywhere. A density may be assigned a different value at a single point, or on any set of length zero, without changing its integrals or the distribution.

Key takeaway: Integrate a density to obtain an absolutely continuous CDF; read point probabilities from CDF jumps; and use \(S_X=1-F_X\) for the strict upper tail. Always state the support and check endpoint conventions. Density recovery from differentiation is an almost-everywhere statement, not generally a pointwise one.

Check Your Understanding

For each problem, identify the support or atoms before converting, and pay particular attention to the endpoint inequalities.

  1. A hypothetical loss has density \(f_X(x)=1/4\) for \(2<x<6\) and 0 elsewhere. Give \(F_X(x)\) and \(S_X(x)\), including their values at 2 and 6. (Answer: \(F_X(x)=0\) for \(x\le2\), \((x-2)/4\) for \(2<x<6\), and 1 for \(x\ge6\); \(S_X(x)=1\) for \(x\le2\), \(1-(x-2)/4\) for \(2<x<6\), and 0 for \(x\ge6\).)
  2. A discrete loss takes values 2, 5, and 8 with probabilities 0.1, 0.6, and 0.3. Find \(F_X(5)\), \(F_X(5-)\), \(P(X=5)\), and \(S_X(5)\). (Answer: \(F_X(5)=0.7\), \(F_X(5-)=0.1\), \(P(X=5)=0.6\), and \(S_X(5)=0.3\).)
  3. A mixed loss has probability 0.2 at zero and density \(0.4\) on \(0<x<2\), with no other probability. Find the continuous probability, \(F_X(1)\), and \(P(X>1)\). (Answer: the continuous probability is \(0.8\), \(F_X(1)=0.2+0.4=0.6\), and \(P(X>1)=0.4\).)
  4. A CDF is 0 for \(x<1\), 0.3 for \(1\le x<4\), 0.3 for \(4\le x<7\), and 1 for \(x\ge7\). Find the probabilities at 1, 4, and 7, and explain whether a density alone describes this distribution. (Answer: the point probabilities are 0.3 at 1, 0 at 4, and 0.7 at 7; a density alone does not describe it because it has atoms.)
  5. An absolutely continuous loss has density \(f_X(x)=x/8\) on \(0<x<4\) and zero elsewhere. Find \(F_X(2)\), \(S_X(2)\), and \(P(1<X\le3)\). (Answer: \(F_X(2)=2^2/16=0.25\), \(S_X(2)=0.75\), and \(P(1<X\le3)=(3^2-1^2)/16=0.5\).)
Clinical Biostats