From Density to Cumulative Probability
A density describes how probability is spread across the possible values of a continuous random variable. A cumulative distribution function (CDF) answers a different question: how much probability has accumulated at or below a specified value? To construct the CDF, integrate the density from the lower end of the range up to that value.
The key is to accumulate all probability to the left of \(x\), not just the density at \(x\) or the probability in a small interval around it. When the density is given in pieces, the CDF must also account for each piece already passed. Outside the range where the density is positive, the CDF has constant tails.
This construction assumes a continuous distribution described completely by a density: \(f_X(t)\geq 0\), and the density integrates to one over its support. A density specified only on \([a,b]\) is taken to be zero elsewhere. The integral formula alone does not describe a distribution that also has point probabilities; such a model would need those probabilities included as well.
Why the Integral Gives the CDF
A density assigns probability to intervals by integration. In particular, for \(r<s\), the probability that \(X\) lies between \(r\) and \(s\) is the area under its density over that interval. To find \(P(X\leq x)\), accumulate that area from the beginning of the support to \(x\).
The first equality uses the fact that \(X\) cannot be below \(a\) under this model. The second is the defining probability rule for a density. If \(x<a\), no supported values have accumulated, so the probability is zero. If \(x>b\), the integral has accumulated the entire density, which totals one, so the probability is one.
A Reliable Construction Process
Record where the density is positive and where it is zero. The lowest supported value is the starting point for accumulation.
For \(x\) below the support, no probability has accumulated, so write \(F_X(x)=0\).
Within the support, integrate the density from its lower endpoint to \(x\). If the density changes formula, split the integral at each change and include the probability accumulated in earlier pieces.
Above the support, the CDF is one. Check that the density integrates to one and that the constructed CDF reaches one at the upper endpoint.
Worked Constructions
Worked Example: A Triangular Density on a Finite Interval
A hypothetical claim amount \(X\), measured in thousands of dollars, has density \(f_X(x)=2x/9\) for \(0\leq x\leq 3\), and zero otherwise. Construct its CDF and find \(F_X(1.5)\). The assumed distribution is continuous with support \([0,3]\); no interest or mortality assumptions are involved.
Method: integrate from the lower support endpoint. First verify the density has total probability one:
For \(x<0\), the random variable cannot take a value at or below \(x\), so \(F_X(x)=0\). For \(0\leq x\leq 3\), integrate from zero:
For \(x>3\), all probability has accumulated, so \(F_X(x)=1\). Thus,
At \(x=1.5\), \(F_X(1.5)=(1.5)^2/9=2.25/9=0.25\), or \(0.2500\) to four decimal places. The result is consistent with the formula: it is between zero and one, and the CDF reaches \(3^2/9=1\) at the upper endpoint.
Mistake avoided: using the density value \(f_X(1.5)=3/9\) as the CDF. A density value is not cumulative probability; the CDF requires the integral from the support's lower endpoint.
Worked Example: Carrying Accumulated Probability Across a Breakpoint
In a hypothetical model, a service time \(X\), in hours, has density \(f_X(x)=1/3\) for \(0\leq x<1\), \(f_X(x)=2/3\) for \(1\leq x\leq 2\), and zero otherwise. Construct the CDF and find \(F_X(1.5)\). The model is continuous and has support \([0,2]\).
Method: integrate piece by piece. Check the total area by adding the areas on the two unit-length intervals:
For \(x<0\), \(F_X(x)=0\). For \(0\leq x<1\), only the first density piece contributes:
For \(1\leq x\leq 2\), the first interval has already contributed \(1/3\). Add the integral from 1 to \(x\) using the second density:
For \(x>2\), \(F_X(x)=1\). The resulting CDF is
At the breakpoint, the first formula accumulates \(1/3\) by the time \(x=1\), and the next formula also gives \((2(1)-1)/3=1/3\). At \(x=1.5\), \(F_X(1.5)=(3-1)/3=2/3=0.6667\) to four decimal places. At \(x=2\), the formula gives \(1\), agreeing with the total probability.
Mistake avoided: writing only \(\int_1^x (2/3)\,dt\) on the second interval. That would omit the \(1/3\) already accumulated before \(x=1\), producing a CDF that incorrectly resets at the breakpoint.
Worked Example: A Density with a Gap in Its Support
A hypothetical claim payment \(X\), measured in thousands of dollars, has density \(f_X(x)=1/3\) on \(0\leq x\leq 1\), density \(f_X(x)=2/3\) on \(2\leq x\leq 3\), and zero elsewhere. There is no probability in the interval between 1 and 2. Construct the CDF and find \(F_X(2.5)\). The continuous model has support \([0,1]\cup[2,3]\).
Method: accumulate the first supported region, retain its total across the gap, then integrate the next region. The density is valid because
Below zero, \(F_X(x)=0\). For \(0\leq x\leq 1\),
Between 1 and 2, there is no additional density, so the CDF remains at the probability already accumulated, \(1/3\). For \(2\leq x\leq 3\), start with that same accumulated amount and add the area from 2 to \(x\):
Above 3, the CDF is one. Therefore,
At \(x=2.5\), \(F_X(2.5)=(5-3)/3=2/3=0.6667\) to four decimal places. At the start of the second supported region, the formula gives \(F_X(2)=1/3\); at its end it gives \(F_X(3)=1\). These checks confirm that probability is retained across the gap and that the full density has accumulated by the upper endpoint.
Mistake avoided: setting the CDF back to zero at \(x=2\) because the density was zero in the gap. A zero density means no new probability accumulates there; it does not erase probability accumulated earlier.
Checks and Common Traps
A constructed CDF should agree with the distribution's support and with the total area under its density. These checks often reveal errors before any further probability calculation is attempted.
- Reverse integration limits. For a CDF, accumulate from the lower support endpoint up to \(x\). Integrating from \(x\) to the upper endpoint instead calculates an upper-tail area, not \(P(X\leq x)\).
- Drop earlier pieces. On a later interval, add the probability accumulated on all earlier intervals. Do not integrate only the density formula that applies at \(x\).
- Miss a constant region. If the density is zero over a gap, the CDF stays at its previously accumulated value throughout the gap.
- Forget the tails. The CDF is zero below the support and one above it. Leaving either part undefined gives an incomplete construction.
- Fail to check normalization. If the density integrates to a value other than one over its full support, it is not a valid density as stated, and the proposed upper tail of one will not match the integral.
For a piecewise density, a useful final check is to compare the formulas on either side of each breakpoint: the accumulated probability before and after the breakpoint must agree. Also evaluate the expression at the upper end of the support; it must equal one. These checks are not a substitute for integrating correctly, but they help identify missing area and incorrect constants.
Check Your Understanding
For each continuous model, construct the CDF before evaluating the requested value. Answers are included for checking.
- A hypothetical measurement \(X\) has density \(1/4\) on \(2\leq x\leq 6\) and zero elsewhere. Give its CDF and find \(F_X(5)\). (Answer: \(F_X(x)=0\) for \(x<2\), \((x-2)/4\) for \(2\leq x\leq 6\), and \(1\) for \(x>6\); \(F_X(5)=0.7500\).)
- A hypothetical severity variable has density \(2x/25\) on \(0\leq x\leq 5\) and zero elsewhere. Find its CDF and \(F_X(4)\). (Answer: \(F_X(x)=0\) for \(x<0\), \(x^2/25\) for \(0\leq x\leq 5\), and \(1\) for \(x>5\); \(F_X(4)=0.6400\).)
- A service duration has density \(c\) on \(0\leq x<1\), density \(3c\) on \(1\leq x\leq 2\), and zero elsewhere. Find \(c\), construct the CDF, and evaluate \(F_X(1.5)\). (Answer: \(c=1/4\); the CDF is \(0\) for \(x<0\), \(x/4\) for \(0\leq x<1\), \((3x-2)/4\) for \(1\leq x\leq 2\), and \(1\) for \(x>2\); \(F_X(1.5)=0.6250\).)
- A hypothetical cost \(X\) has density \(k(4-x)\) on \(1\leq x\leq 3\) and zero elsewhere. Find \(k\), construct the CDF, and evaluate \(F_X(2)\). (Answer: \(k=1/4\); \(F_X(x)=0\) for \(x<1\), \((4x-x^2/2-7/2)/4\) for \(1\leq x\leq 3\), and \(1\) for \(x>3\); \(F_X(2)=0.6250\).)