Why Piecewise Densities Need Careful Normalization
A candidate density may have a different formula on different parts of the real line. The formulas can be simple, but the normalization calculation must account for every part on which the function is nonzero. Missing one interval changes the total integral and therefore changes the probability law.
The basic strategy is to integrate each piece over its own interval, add those integrals, and choose a multiplier that makes the total equal to one. This works only when the candidate function is measurable, nonnegative, and has a finite, strictly positive integral. If its integral is zero or infinite, no finite positive multiplier can turn it into a density.
The integral is taken over the whole real line, with \(g(x)=0\) wherever the candidate is specified to vanish. In practice, it is usually clearer to write the integral only over the regions where the formulas are nonzero. Use the ordinary area calculations from the earlier material on Probability Densities for Continuous Laws, but split the integral wherever the formula changes.
The Normalization Rule
Suppose the candidate is described on disjoint intervals \(A_1,\ldots,A_k\), with formula \(g_j\) on interval \(A_j\), and it is zero elsewhere. For nonnegative measurable pieces, additivity of the integral gives
If this sum is finite and positive, its reciprocal is the required multiplier. This also clarifies the role of the intervals: every region with a nonzero formula contributes to the total, even if the formula changes at a breakpoint.
Proof. If \(0<I<\infty\), set \(c=1/I\). Then \(c>0\), so \(f=cg\) is nonnegative and measurable, and
Conversely, suppose a finite constant \(c\geq0\) makes \(f=cg\) a density. If \(c=0\), then \(\int f=0\), contrary to the required integral of one; thus \(c>0\). Since \(\int f=cI=1\), \(I=1/c\), which is finite and strictly positive, and \(c=1/I\). This equation also shows that no second constant can work. \(\square\)
Worked Piecewise Calculations
Worked Example: A Two-Piece Polynomial Shape
Suppose \(g(x)=1+x\) for \(0\leq x<2\), \(g(x)=5-x\) for \(2\leq x\leq5\), and \(g(x)=0\) elsewhere. Find the normalizing constant \(c\) and the density \(f(x)=c g(x)\).
Both formulas are nonnegative on their specified intervals: \(1+x\geq1\) on \([0,2)\), and \(5-x\geq0\) on \([2,5]\). Integrate each piece:
Thus the total integral is \(I=4+\frac{9}{2}=\frac{17}{2}\), so \(c=2/17\). The normalized density is
Checking the result directly, \(\int_{\mathbb{R}}f(x)\,dx=(2/17)(17/2)=1\). The two pieces have both been included, and each is nonnegative on its stated interval.
Worked Example: A Piecewise Exponential Shape With an Infinite Tail
Let \(g(x)=e^{-x}\) for \(0\leq x<1\), \(g(x)=2e^{-x}\) for \(x\geq1\), and \(g(x)=0\) for \(x<0\). Find its normalizing constant.
The second interval extends to infinity, so its integral must be evaluated as an improper integral. The first contribution is
For the tail, the exponential integral converges:
Therefore \(I=1-e^{-1}+2e^{-1}=1+e^{-1}\), which is finite and positive. The normalizing constant is \(c=1/(1+e^{-1})=e/(e+1)\), and the normalized function is \(f(x)=\frac{e}{e+1}g(x)\). The tail matters: integrating only over \([0,1)\) would give the wrong constant.
Worked Example: Normalization Depending on a Parameter
For \(0\leq\theta\leq1\), define \(g_\theta(x)=1\) on \(0\leq x\leq\theta\), \(g_\theta(x)=2\) on \(\theta<x\leq1\), and \(g_\theta(x)=0\) elsewhere. Find the normalizing constant as a function of \(\theta\).
The first interval contributes its length, \(\theta\), and the second contributes twice its length:
For every allowed value \(0\leq\theta\leq1\), \(1\leq2-\theta\leq2\), so \(I(\theta)\) is finite and strictly positive. Hence
For example, if \(\theta=1/3\), then \(I(1/3)=5/3\) and \(c(1/3)=3/5\). The resulting function has value \(3/5\) on \([0,1/3]\) and \(6/5\) on \((1/3,1]\). Its integral is \((3/5)(1/3)+(6/5)(2/3)=1/5+4/5=1\). The parameter changes the relative sizes of the two pieces, so the normalizing constant changes with it.
Worked Example: When Two Coefficients Are Not Uniquely Determined
Consider a function equal to \(a\) on \([0,1)\), equal to \(b\) on \([1,3]\), and zero elsewhere. Find the condition for this function itself to be a density.
Nonnegativity requires \(a\geq0\) and \(b\geq0\). The integral condition is
This is one equation in two unknown coefficients, so it does not specify a unique pair. For example, \((a,b)=(1,0)\) and \((a,b)=(0,1/2)\) both satisfy the condition and are nonnegative. If instead a fixed shape \(g\) were given and only a common multiplier \(c\) were unknown, the theorem guarantees a unique \(c\) whenever \(0<\int g<\infty\). Do not assume that a normalization equation uniquely determines several free coefficients.
Checks Before Accepting a Normalized Function
A correct calculation should establish more than a numerical value for \(c\). Check that the candidate is nonnegative on every stated interval, that all nonzero regions have been included, and that the total integral is finite and positive. Then verify that multiplying the computed total by \(c\) gives one.
Breakpoints do not require special area terms: in a finite piecewise definition, each formula is integrated on its own interval, and the integral is additive across the pieces. Whether a shared endpoint is assigned to the left or right piece does not change these integrals. The endpoint has zero length, so changing the function at finitely many breakpoints does not change its integral.
Write down every interval where the candidate has a nonzero formula, including any unbounded interval.
Confirm measurability and nonnegativity on the specified regions before treating the function as a density candidate.
Evaluate each integral over its own interval, using an improper-integral limit when an endpoint is infinite.
If the total is finite and positive, take its reciprocal and check that the scaled integrals sum to one.
Common Mistakes and Why Normalization Matters
- Omitting a piece. A calculation over only the first interval is not the integral over the whole region where the candidate is nonzero. Add every piece before taking the reciprocal.
- Ignoring an infinite tail. A tail cannot be dropped simply because its endpoint is infinite. Evaluate it as an improper integral and determine whether it converges.
- Using a reciprocal when the integral is invalid. If \(I=0\), \(1/I\) is undefined; if \(I=\infty\), no finite positive multiplier makes the total integral one. Check \(0<I<\infty\) first.
- Confusing an unknown multiplier with unknown shape coefficients. A single multiplier is uniquely determined by a fixed shape with a finite positive integral. Several unknown coefficients may satisfy the normalization equation in many ways.
- Assigning an extra contribution to a breakpoint. Splitting the integral at a breakpoint accounts for the regions; the breakpoint itself contributes no interval length.
Normalization is the final check that a proposed continuous law assigns total probability one across its entire range. For piecewise models, the bookkeeping is as important as the integration: state each interval, integrate its formula, and combine the results before scaling.
Check Your Understanding
For each question, write the integral over all nonzero pieces before finding or assessing a normalizing constant.
- A candidate is \(g(x)=x\) on \([0,1]\) and \(g(x)=2-x\) on \((1,2]\), and zero elsewhere. What is its total integral, and what multiplier normalizes it?
- A nonnegative candidate has integral \(I=0\). Can any finite constant make it a density? Explain using the normalization condition.
- For \(g(x)=3\) on \([0,\theta]\) and \(1\) on \((\theta,2]\), where \(0\leq\theta\leq2\), write its total integral as a function of \(\theta\).
- Why must a candidate with a nonzero formula on \([1,\infty)\) be checked using an improper integral?
- A piecewise candidate has two unknown nonnegative coefficients but only the requirement that its integral equal one. Is the coefficient pair necessarily unique? Give a reason.