Tutorials › Exam FAM - Fundamentals of Actuarial Mathematics › Differentiating a CDF to Obtain Density

Exam FAM · Lifetime Distributions · Tutorial 108 of 988

Differentiating a CDF to Obtain Density

Differentiate lifetime CDFs carefully, derive densities on their supports, and use them to compute probabilities while recognizing where pointwise equality does not apply.

Beginner 12 min read

What You'll Learn

  • State the assumptions under which a CDF has a density
  • Explain why the density equals the CDF derivative almost everywhere
  • Identify when continuity of the density gives pointwise equality
  • Differentiate polynomial and exponential lifetime CDFs
  • Handle piecewise CDFs and points where the derivative does not exist
  • Check derived densities by integrating over their supports

Introduction

A cumulative distribution function records the probability that a future lifetime is no greater than a specified time. When that function changes smoothly, its derivative describes how probability is distributed across time. This gives a direct way to derive a density from a CDF, but the precise relationship matters: a density is determined by its CDF only up to changes on sets of probability zero.

For a life aged \(x\), let \(T_x\) denote future lifetime, and let \(F_x(t)=P(T_x\le t)\). This tutorial focuses on differentiating \(F_x\) to obtain a density. The key qualification is that \(F_x'(t)=f_x(t)\) holds almost everywhere for an absolutely continuous lifetime distribution; it holds at a particular point when the density is continuous there.

Definition: A lifetime distribution is absolutely continuous if there is an integrable, nonnegative function \(f_x\) such that \(F_x(t)=\int_{-\infty}^{t} f_x(s)\,ds\). The function \(f_x\) is a probability density function (pdf). For an absolutely continuous distribution, \(F_x'(t)=f_x(t)\) almost everywhere. At any point where \(f_x\) is continuous, \(F_x'(t)=f_x(t)\) at that point.

Why Differentiation Gives a Density

A density describes probability per unit of time, not the probability of a single time value. For a small positive interval of length \(h\), the probability that \(T_x\) lies between \(t\) and \(t+h\) is \(F_x(t+h)-F_x(t)\). If \(F_x\) is differentiable at \(t\), dividing this probability by the interval length and taking a limit gives the rate of change of the CDF.

1
Write the interval probability.
For an absolutely continuous model, \(F_x(t+h)-F_x(t)=\int_t^{t+h} f_x(s)\,ds\).
2
Divide by the interval length.
\(\frac{F_x(t+h)-F_x(t)}{h}=\frac{1}{h}\int_t^{t+h} f_x(s)\,ds\), for \(h\ne 0\).
3
Take the limit.
At a point where \(f_x\) is continuous, the average value of \(f_x\) over the shrinking interval approaches \(f_x(t)\). The limit is therefore both \(F_x'(t)\) and \(f_x(t)\).

The fundamental theorem of calculus also says that if \(F_x(t)\) is represented as the integral of an integrable density, then its derivative equals that density almost everywhere. The qualification “almost everywhere” means that exceptions may occur on a set of time values with length zero. At such points, the density can be assigned different values without changing any probabilities or integrals. Consequently, differentiability of the CDF at one point alone does not identify every possible version of the density at that point.

$$ F_x'(t)=f_x(t)\quad\text{almost everywhere},\qquad P(a<T_x\le b)=F_x(b)-F_x(a)=\int_a^b f_x(t)\,dt. $$

The derivative rule is used only when the stated CDF describes an absolutely continuous distribution. A CDF with jumps or other non-absolutely-continuous probability components cannot be described completely by differentiating it and treating the result as a density. For the smooth polynomial and exponential models below, the density is continuous in the interior of its support, so the derivative gives its value at each such interior point.

Deriving a Density from a Polynomial CDF

When a CDF is given as a polynomial expression on a support interval, differentiate that expression within the interval. Outside the support, the CDF is constant, so its derivative is zero wherever the ordinary derivative exists. Then check that the resulting density is nonnegative and integrates to one.

Worked Example: A Polynomial CDF on a Bounded Lifetime Range

Suppose a hypothetical lifetime \(T_x\), measured in years, has the CDF \(F_x(t)=0\) for \(t<0\), \(F_x(t)=1-(1-t/4)^3\) for \(0\le t\le4\), and \(F_x(t)=1\) for \(t>4\). Derive its density and find \(P(1<T_x\le3)\). The method is to differentiate within the support and then use either CDF differences or density integration.

Step 1: Differentiate on the support. For \(0<t<4\),

$$ f_x(t)=\frac{d}{dt}\left[1-\left(1-\frac{t}{4}\right)^3\right] =\frac{3}{4}\left(1-\frac{t}{4}\right)^2. $$

The derivative is nonnegative on the support. The density is zero outside the support, apart from endpoint values that do not affect probabilities. To check its total integral, substitute \(u=1-t/4\), so \(dt=-4\,du\):

$$ \int_0^4 \frac{3}{4}\left(1-\frac{t}{4}\right)^2dt =3\int_0^1 u^2\,du =3\left[\frac{u^3}{3}\right]_0^1=1. $$

Step 2: Find the interval probability. At \(t=1\), \(F_x(1)=1-(3/4)^3=1-27/64=37/64\). At \(t=3\), \(F_x(3)=1-(1/4)^3=1-1/64=63/64\). Therefore,

$$ P(1<T_x\le3)=F_x(3)-F_x(1) =\frac{63}{64}-\frac{37}{64} =\frac{26}{64}=\frac{13}{32}=0.40625. $$

Rounded to four decimal places, the probability is 0.4063. As a check, integrating \(f_x\) from 1 to 3 gives the same CDF difference. The common mistake avoided here is differentiating only the expression while overlooking the support: the polynomial formula is not the CDF for times outside \([0,4]\).

Deriving a Density from an Exponential CDF

For an exponential future lifetime with rate \(\lambda>0\) per year, the model assumes \(F_x(t)=0\) for \(t<0\) and \(F_x(t)=1-e^{-\lambda t}\) for \(t\ge0\). Differentiating on the positive-time support gives a density with the same rate parameter. The rate’s units matter: if time is measured in years, \(\lambda\) is expressed per year.

Worked Example: An Exponential Lifetime and an Interval Probability

Assume a hypothetical future lifetime \(T_x\) is exponential with rate \(\lambda=0.3\) per year, so \(F_x(t)=1-e^{-0.3t}\) for \(t\ge0\). Derive its density and calculate \(P(1<T_x\le4)\). The method is differentiation followed by subtraction of the endpoint CDF values; this avoids confusing the probability with a density value.

Step 1: Differentiate the CDF. For \(t>0\),

$$ f_x(t)=\frac{d}{dt}(1-e^{-0.3t}) =0.3e^{-0.3t}. $$

The density is nonnegative. Its integral over the support confirms that it is normalized:

$$ \int_0^\infty 0.3e^{-0.3t}\,dt =\left[-e^{-0.3t}\right]_0^\infty =0-(-1)=1. $$

Step 2: Evaluate the CDF at each endpoint. \(F_x(4)=1-e^{-1.2}\), and \(F_x(1)=1-e^{-0.3}\). Thus,

$$ P(1<T_x\le4) =F_x(4)-F_x(1) =e^{-0.3}-e^{-1.2}. $$

Using \(e^{-0.3}=0.7408182207\) and \(e^{-1.2}=0.3011942119\), the difference is \(0.4396240088\). To four decimal places, the probability is 0.4396. The check is that this is positive and less than one, as required for an interval probability.

The common error is to use \(f_x(1)\), a density value per year, as the probability of an interval beginning at year 1. A pointwise density is not an interval probability; the correct probability is the CDF difference, or equivalently the integral of the density over the interval.

Piecewise CDFs and Points of Nondifferentiability

A CDF can be differentiable on separate portions of its support while its derivative changes at a join. In that situation, differentiate each formula on its own interval. The density is identified almost everywhere; at a join where the CDF is not differentiable, there is no ordinary derivative value to report. A value assigned to the density at that single point does not alter its integrals.

Worked Example: A Piecewise CDF with a Change in Slope

Let a hypothetical lifetime, measured in years, have CDF \(F_x(t)=0\) for \(t<0\), \(F_x(t)=t^2/8\) for \(0\le t\le2\), \(F_x(t)=1/2+(t-2)/4\) for \(2<t\le4\), and \(F_x(t)=1\) for \(t>4\). Derive a density almost everywhere and find \(P(1/2<T_x\le3)\). The method is to differentiate each branch, then check the interval probability by both the CDF and density.

Step 1: Differentiate each branch. On \(0<t<2\), the derivative of \(t^2/8\) is \(t/4\). On \(2<t<4\), the derivative of \(1/2+(t-2)/4\) is \(1/4\). Thus a density, with its value at the single join chosen arbitrarily, is

$$ f_x(t)= \begin{cases} t/4,&0<t<2,\\ 1/4,&2<t<4,\\ 0,&t<0\text{ or }t>4. \end{cases} $$

At \(t=2\), the left derivative is \(2/4=1/2\), while the right derivative is \(1/4\); hence \(F_x'(2)\) does not exist. This does not invalidate the density. Its integral is

$$ \int_0^2 \frac{t}{4}\,dt+\int_2^4\frac14\,dt =\left[\frac{t^2}{8}\right]_0^2+\left[\frac{t}{4}\right]_2^4 =\frac12+\frac12=1. $$

Step 2: Calculate the requested probability from the CDF. \(F_x(3)=1/2+(3-2)/4=3/4\), while \(F_x(1/2)=(1/2)^2/8=1/32\). Therefore,

$$ P(1/2<T_x\le3)=\frac34-\frac1{32} =\frac{24}{32}-\frac1{32} =\frac{23}{32}=0.71875. $$

Step 3: Check by integrating the density.

$$ \int_{1/2}^2\frac{t}{4}\,dt+\int_2^3\frac14\,dt =\left[\frac{t^2}{8}\right]_{1/2}^2+\frac14 =\left(\frac12-\frac1{32}\right)+\frac14 =\frac{23}{32}. $$

Rounded to four decimal places, the probability is 0.7188. The common mistake avoided is forcing a single derivative formula through the join at \(t=2\), where the ordinary derivative does not exist.

Checks and Common Exam Traps

Before using a derived density, check the support and parameter units, and verify that the function is nonnegative and has total integral one. For an interval probability, integrating over the interval or subtracting CDF values should give the same result. These checks often expose a missing support restriction, a sign error in differentiation, or a confusion between density and probability.

SituationReliable approachTrap to avoid
Smooth CDF on the interior of its supportDifferentiate there to obtain the density value.Assuming an interior formula applies outside its support.
Absolutely continuous CDF with an integrable densityUse \(F_x'=f_x\) almost everywhere.Claiming the equality must hold at every point for every version of the density.
Piecewise CDFDifferentiate each branch and check joins separately.Reporting a derivative at a point where the left and right derivatives differ.
Interval probabilityUse \(F_x(b)-F_x(a)\) or \(\int_a^b f_x(t)\,dt\).Treating a density value at one time as an interval probability.
Key takeaway: For an absolutely continuous lifetime distribution, the density is the CDF derivative almost everywhere. At points where the density is continuous, the derivative equals the density there. Derive branch by branch, respect the support, and use CDF differences or density integrals for probabilities.

Check Your Understanding

For each problem, state the relevant support or rate assumption and use the CDF derivative or CDF differences as appropriate.

  1. A hypothetical lifetime has \(F_x(t)=1-(1-t/5)^2\) for \(0\le t\le5\), with CDF zero below 0 and one above 5. Find its density in the interior and evaluate the density at \(t=2\). (Answer: \(f_x(t)=\frac{2}{5}(1-t/5)\) for \(0<t<5\); \(f_x(2)=0.24\) per year.)
  2. A future lifetime is exponential with rate \(0.4\) per year and CDF \(1-e^{-0.4t}\) for \(t\ge0\). Find its density at \(t=2\), to four decimal places. (Answer: \(0.4e^{-0.8}=0.1797\) per year.)
  3. A CDF is \(t^2/8\) for \(0\le t\le2\) and \(1/2+(t-2)/4\) for \(2<t\le4\), with the usual zero and one values outside that range. Find \(P(1/2<T_x\le3)\). (Answer: \(23/32=0.7188\) to four decimal places.)
  4. A hypothetical lifetime has \(F_x(t)=(t/3)^2\) for \(0\le t\le3\), zero below 0, and one above 3. Derive the interior density and find \(P(1<T_x\le2)\). (Answer: \(f_x(t)=2t/9\) for \(0<t<3\); \(P(1<T_x\le2)=1/3=0.3333\) to four decimal places.)
  5. A lifetime is exponential with rate \(0.15\) per year. Find \(P(2<T_x\le6)\), to four decimal places, using the CDF derived from its model. (Answer: \(e^{-0.3}-e^{-0.9}=0.3342\) to four decimal places.)
Clinical Biostats