Why a Discrete-Continuous Sum Is a Mixture
A total can combine a discrete count and a continuous amount. For example, a hypothetical payment might consist of a fixed charge for each recorded event plus a continuously varying additional cost. The total is neither purely discrete nor generally a single familiar continuous distribution. Its distribution is built by considering each possible discrete outcome and shifting the continuous distribution by that amount.
The key is to condition on the discrete variable. For each fixed discrete value, the sum has a shifted version of the continuous variable’s distribution. The unconditional distribution is the probability-weighted mixture of those shifted distributions. Independence is essential to the simple formulas below: it ensures that the distribution of the continuous variable remains the same for every discrete outcome.
Deriving the Mixture Formula
The CDF formula follows directly from conditioning on the discrete value. Given \(D=d_j\), the event \(S\le s\) is the event \(X\le s-d_j\). Independence means that \(X\), even after conditioning on \(D=d_j\), still has CDF \(F_X\).
If \(F_X\) has density \(f_X\), differentiating the shifted CDFs gives the density formula. For a finite set of discrete values, this is just differentiation of a finite sum. For a countable set, the mixture can also be understood as a weighted sum of the conditional densities; its total integral is one because each shifted density integrates to one and the probabilities \(p_j\) sum to one.
Each term is a shifted density, not a new probability mass at \(d_j\). In particular, if \(X\) is continuous, then \(S\) has no point masses: for any fixed \(s\), conditioning on \(D=d_j\) gives \(P(X=s-d_j)=0\), so the weighted sum is also zero.
Support and Overlap
The support determines which terms in the mixture can contribute at a given \(s\). If \(X\) can take values only in an interval \((a,b)\), then the conditional sum \(D+X\), given \(D=d_j\), lies in \((d_j+a,d_j+b)\). Outside that shifted interval, \(f_X(s-d_j)=0\). Thus a sum may have separate pieces of support, or several shifted densities may overlap and add together.
For example, if \(X\) is exponential, it is supported on nonnegative values. At a particular \(s\), only discrete values \(d_j\le s\) can contribute. If \(X\) is uniform on a bounded interval, only shifts whose translated intervals contain \(s\) contribute. These restrictions are useful for avoiding unnecessary terms, especially when \(D\) has many possible values.
Worked Example: Separate Shifted Supports
Let \(D\) represent a hypothetical fixed surcharge, with \(P(D=0)=0.65\) and \(P(D=2)=0.35\). Independently, let \(X\sim\operatorname{Uniform}(0,1)\) dollars, and define the total \(S=D+X\). Find the density and calculate \(P(S\le 2.4)\). The method is conditioning on each surcharge value and mixing the shifted uniform distributions.
Step 1: State the continuous density and its shifts. The density of \(X\) is 1 on \((0,1)\) and 0 elsewhere. Given \(D=0\), \(S\) lies in \((0,1)\). Given \(D=2\), \(S\) lies in \((2,3)\).
Step 2: Mix the shifted densities. The two intervals do not overlap, so the unconditional density is
Step 3: Calculate the requested probability. If \(D=0\), then \(S=X<1\), so \(S\le2.4\) with probability 1. If \(D=2\), the condition is \(X\le0.4\), which has probability \(0.4\) under the uniform distribution. Therefore
Check and common mistake avoided. The density integrates to \(0.65(1)+0.35(1)=1\). A common error is to put the second density on \((0,1)\) as well; adding 2 shifts that component to \((2,3)\).
When Shifted Densities Overlap
When two or more translated supports overlap, their contributions must be added at each point in the overlap. The result is still a valid density, even if its value exceeds 1 at some points. A density value is not itself a probability; probabilities are found by integrating the density over an interval, or by using the CDF.
Worked Example: Adding Overlapping Exponential Components
Let \(D\) represent a hypothetical integer-valued adjustment, with \(P(D=0)=0.2\), \(P(D=1)=0.5\), and \(P(D=2)=0.3\). Independently, let \(X\) have an exponential distribution with rate 2 per unit, so \(f_X(x)=2e^{-2x}\) for \(x\ge0\) and \(F_X(x)=1-e^{-2x}\) for \(x\ge0\). Find \(f_S(1)\) and \(P(S\le1.5)\), where \(S=D+X\). The method is the shifted-density and shifted-CDF mixture.
Step 1: Determine which shifts contribute to the density at 1. The term for \(D=0\) uses \(f_X(1)\); the term for \(D=1\) uses \(f_X(0)\). The term for \(D=2\) uses \(f_X(-1)=0\), since the exponential distribution has no negative support.
Step 2: Find the CDF at 1.5. For \(D=0\), the continuous-variable argument is \(1.5\). For \(D=1\), it is \(0.5\). For \(D=2\), it is \(-0.5\), for which the CDF is zero. Thus
Probabilities are rounded to four decimal places. As a check, the CDF is between 0 and 1. The density value \(1.0541\) is not a probability and need not be at most 1.
Common mistake avoided. Using \(f_X(1)\) for both of the first two terms would ignore the shift by \(D=1\). That incorrect calculation gives \(0.7f_X(1)\); the correct second term uses \(f_X(1-1)=f_X(0)\).
Worked Example: A Density with Three Regions
Let \(D\) be a hypothetical discrete adjustment with \(P(D=0)=0.4\) and \(P(D=1)=0.6\). Independently, let \(X\sim\operatorname{Uniform}(0,2)\), measured in the same units, and set \(S=D+X\). Find the density of \(S\) and calculate \(P(0.5<S<2.5)\). The method is to identify where each shifted uniform density is present, then add the weights in the overlap.
Step 1: Write each shifted component. The density of \(X\) is \(1/2\) on \((0,2)\). The \(D=0\) component contributes \(0.4(1/2)=0.2\) on \((0,2)\). The \(D=1\) component contributes \(0.6(1/2)=0.3\) on \((1,3)\).
Step 2: Add contributions by region. On \((0,1)\), only the first component contributes. On \((1,2)\), both components contribute. On \((2,3)\), only the second component contributes.
Step 3: Integrate over the requested interval. The interval \((0.5,2.5)\) covers length \(0.5\) in \((0,1)\), length 1 in \((1,2)\), and length \(0.5\) in \((2,3)\).
Check and common mistake avoided. The complete density integrates to \(1(0.2)+1(0.5)+1(0.3)=1\). In the overlap \((1,2)\), using only the larger weight would omit one component; both shifted densities must be added.
Assumptions and Exam Traps
The formulas rely on the model stated at the outset: \(D\) is discrete, \(X\) is continuous with a density, and \(D\) and \(X\) are independent. If they are dependent, then the conditional distribution of \(X\) may vary with \(D\). The general conditioning step still holds, but the terms must use the conditional CDFs or densities:
It is not generally valid in that case to replace each conditional CDF by the same \(F_X\). Other frequent errors are shifting in the wrong direction, forgetting that a density is zero outside its support, and treating density values as probabilities. For \(S=D+X\), the argument is always \(s-d_j\), because the event \(D+X\le s\), conditional on \(D=d_j\), becomes \(X\le s-d_j\).
Check Your Understanding
For each problem, use the support of the continuous variable to identify which mixture components contribute.
- Let \(D\) be independent of \(X\sim\operatorname{Uniform}(0,1)\), with \(P(D=0)=0.7\) and \(P(D=2)=0.3\). Give the density of \(S=D+X\) and find \(P(S<2.4)\). (Answer: \(f_S(s)=0.7\) on \((0,1)\), \(0.3\) on \((2,3)\), and 0 otherwise; \(P(S<2.4)=0.82\).)
- Let \(P(D=0)=0.25\) and \(P(D=1)=0.75\), independently of \(X\sim\operatorname{Uniform}(0,2)\). Find the density of \(S=D+X\) and \(P(0.5<S<2.5)\). (Answer: density \(0.125\) on \((0,1)\), \(0.5\) on \((1,2)\), \(0.375\) on \((2,3)\), and 0 otherwise; probability \(0.75\).)
- Let \(P(D=0)=0.4\) and \(P(D=2)=0.6\), independently of an exponential \(X\) with rate 1. Find \(P(S\le2)\) for \(S=D+X\). (Answer: \(0.4(1-e^{-2})\approx0.3459\).)
- Let \(P(D=-1)=0.2\), \(P(D=0)=0.5\), and \(P(D=2)=0.3\), independently of \(X\sim\operatorname{Uniform}(0,1)\). Find \(f_S(0.75)\) and \(f_S(2.5)\). (Answer: \(f_S(0.75)=0.5\) and \(f_S(2.5)=0.3\).)
- Let \(D\sim\operatorname{Poisson}(1)\), independently of an exponential \(X\) with rate 2, and let \(S=D+X\). Find \(f_S(1)\), expressing the result exactly and then to four decimal places. (Answer: \(2e^{-1}(1+e^{-2})\approx0.8353\).)