Why Mixed Laws Need Two Contributions
A random variable can have both point masses and a continuous component. For example, a treatment outcome may be exactly zero for some patients, while positive outcomes among others vary continuously. To calculate the expectation of a function \(g(X)\), one must account for both features: evaluate \(g\) at each point mass, and integrate \(g\) over the continuous component.
The key detail is that the density of the continuous component need not integrate to one. It accounts only for the probability assigned to that component. Treating it as a full probability density, or overlooking an atom that lies within the density's support, can change the answer.
The atoms are distinct, and each listed \(p_j\) is the entire probability at that point. The continuous component assigns probability zero to every single point, even when an atom lies inside the interval where \(h\) is positive. The two contributions therefore remain separate.
The LOTUS Formula for a Mixed Law
Let \(g:\mathbb R\to\mathbb R\) be Borel measurable. The mixed-law rule applies \(g\) directly to \(X\)'s values; it does not require first finding the distribution of \(g(X)\). For nonnegative \(g\), the formula allows an infinite expectation. For a finite real expectation, absolute integrability is required.
Proof. First consider a nonnegative simple function \(s=\sum_{k=1}^m a_k\mathbf 1_{A_k}\), where the \(A_k\) are disjoint Borel sets and each \(a_k\geq0\). By the definition of integration with respect to the law of \(X\),
For a general nonnegative measurable \(g\), choose nonnegative simple functions \(s_n\) increasing pointwise to \(g\). The Monotone Convergence Theorem gives \(E[s_n(X)]\to E[g(X)]\). It also gives convergence of the atomic sums, by monotone convergence for a countable sum, and of the integrals against \(h(x)\,dx\). Taking limits in the simple-function identity proves the formula for \(g\).
For signed \(g\), define \(g^+(x)=\max(g(x),0)\) and \(g^-(x)=\max(-g(x),0)\), so \(g=g^+-g^-\) and \(|g|=g^++g^-\). Under the stated absolute-integrability condition, the formula just proved applies to both nonnegative functions, and both expectations are finite. Subtracting their identities gives the formula for \(g\). \(\square\)
Justification. Apply the nonnegative formula to \(|g|\). Its right-hand side is exactly the displayed quantity, so it is finite exactly when \(E[|g(X)|]<\infty\). This is the condition for a finite signed expectation. Under that condition, the theorem gives the signed formula. \(\square\)
Worked Calculations
Worked Example: A Point Mass and an Exponential Component
Suppose \(X\) has probability \(0.3\) at zero and, with probability \(0.7\), has an exponential distribution with rate \(2\). Find \(E[X]\) and \(E[X^2]\).
The atom is \(x_1=0\), with \(p_1=0.3\). The exponential component's conditional density is \(2e^{-2x}\) for \(x>0\), so its subdensity is \(h(x)=1.4e^{-2x}\) for \(x>0\). This integrates to \(1.4/2=0.7\), as required. For \(g(x)=x\),
For \(g(x)=x^2\), the atom again contributes zero. Using \(\int_0^\infty x^2e^{-2x}\,dx=2!/2^3=1/4\),
The exponential moments in these calculations are conditional moments; multiplying by \(0.7\) weights them by the probability of belonging to the continuous component.
Worked Example: An Atom Inside the Continuous Support
Let \(X\) have probability \(0.4\) at \(1\), and with probability \(0.6\) be uniform on \((0,2)\). Calculate \(E[X^2]\).
The atom contributes \(0.4(1^2)=0.4\). The uniform conditional density is \(1/2\) on \((0,2)\), so the continuous subdensity is \(h(x)=0.6(1/2)=0.3\) there. Thus
The value \(1\) lies in the continuous component's support, but its point probability from that component is zero. The total probability \(P(X=1)\) is \(0.4\), not \(0.4\) plus a density value.
Worked Example: A Signed Function with a Finite Expectation
Suppose \(X\) has probability \(0.5\) at \(-1\), and its remaining probability \(0.5\) is uniform on \((0,2)\). Find \(E[X]\) and verify that it is finite.
The continuous subdensity is \(0.5(1/2)=0.25\) on \((0,2)\). Using \(g(x)=x\),
This is a finite expectation, not merely a cancellation of infinite quantities. Indeed,
The absolute-integrability check confirms that the signed expectation is well-defined.
Component Weights and Common Errors
When the continuous component has positive probability \(q\) and conditional density \(f_c\), its subdensity is \(h=qf_c\). Consequently, whenever the relevant expectation is defined, its contribution can also be written as
This identity is just substitution of \(h=qf_c\) into the integral. It explains a useful alternative calculation: find the conditional expectation within the continuous component, then multiply by that component's probability. The same weighting principle applies to each atom through its probability \(p_j\).
A frequent mistake is to use the conditional continuous density \(f_c\) as though it were the mixed law's density, then add the atoms. In the second example, integrating \(x^2\) against the conditional uniform density would give \(4/3\); adding the atomic contribution gives \(1.733\ldots\), not \(1.2\). The continuous contribution must be weighted by \(0.6\), or calculated using its subdensity \(0.3\).
Another mistake is to assume that positive and negative contributions cancel whenever an integral or sum appears symmetric. For a signed function, the positive and negative parts must not both have infinite expectation. For instance, if a mixed law assigns positive probability to a continuous Cauchy component and \(g(x)=x\), the positive and negative tail integrals are both infinite. A symmetric principal-value calculation of zero does not make \(E[X]\) exist as a finite expectation.
Check Your Understanding
Use the mixed-law formula and distinguish component probabilities from conditional densities.
- A variable has mass \(0.2\) at zero and a continuous component with subdensity \(0.8e^{-x}\) for \(x>0\). Write the LOTUS expression for \(E[X^2]\).
- A mixed law has mass \(0.3\) at \(2\) and continuous subdensity \(0.7/3\) on \((0,3)\). What is the total probability in its continuous component?
- Why must the atom at \(1\) still be included if the continuous density is positive on an interval containing \(1\)?
- State the condition that ensures a signed \(g(X)\) has a finite real expectation under a mixed law.
- Explain why a symmetric principal-value integral of a signed function is not, by itself, proof that its expectation exists.