Why Zero Requires Special Treatment
A product can equal zero because either factor is zero. This creates a point mass that a density calculation over nonzero values will not capture. A ratio has a different issue: if its denominator is zero, the ratio is not defined. The right approach is to first separate the event where the denominator is nonzero, then describe the ratio on that event.
These distinctions matter whenever a random variable has a mixed distribution, with both point masses and continuous parts. A formula for a density describes probabilities spread over intervals; it does not account for probability concentrated at a single point. In particular, it cannot by itself describe the mass of a product at zero or the mass of a ratio at zero.
Zero Mass in a Product
The formula without independence is the inclusion-exclusion identity applied to the events \(\{X=0\}\) and \(\{Y=0\}\). Independence is needed only to replace their joint probability by \(p_Xp_Y\).
For independent variables with atoms at zero and otherwise absolutely continuous distributions, the product has a point mass at zero and may have a density away from zero. If \(h_X\) and \(h_Y\) are the densities of their continuous components (so their integrals can be less than one), the nonzero product density is
This change-of-variables formula accounts for pairs with nonzero factors. The point mass at zero must still be reported separately using the theorem. The formula assumes the factors have no other atoms; additional atoms can create additional point masses in the product.
Worked Example: Product of Two Variables With Zero Atoms
Let \(X\) and \(Y\) be independent. Suppose \(P(X=0)=0.30\), \(P(Y=0)=0.20\), and, conditional on being nonzero, \(X\) is uniform on \((-1,1)\) and \(Y\) is uniform on \((1,2)\). Find the mass at zero of \(Z=XY\).
The event \(Z=0\) occurs if \(X=0\) or \(Y=0\). Independence gives
Equivalently, both factors are nonzero with probability \((0.70)(0.80)=0.56\), so the remaining probability \(1-0.56=0.44\) is concentrated at zero. This check agrees with the inclusion-exclusion calculation. The continuous product component has total probability \(0.56\), not one.
Ratios When the Denominator Can Be Zero
For random variables \(A\) and \(B\), the expression \(A/B\) is defined only on \(\{B\ne0\}\). Write \(q=P(B\ne0)\). If \(q=0\), there is no ratio defined with positive probability. If \(q>0\), one standard way to describe the ratio is its conditional distribution given that the denominator is nonzero.
If \(A\) and \(B\) are independent, conditioning on \(B\ne0\) leaves the distribution of \(A\) unchanged. Let \(G\) denote the conditional distribution of \(B\) given \(B\ne0\). Then, for each real \(r\),
where \(F_A(t)=P(A\le t)\). For \(b<0\), dividing an inequality by \(b\) reverses its direction, which is why the second integrand is an upper-tail probability rather than \(F_A(rb)\). This form also handles atoms in \(A\), including any boundary probability at \(rb\).
Here a subdensity has integral \(1-p_A\). The theorem permits \(G\) to be discrete, continuous, or mixed, provided it assigns probability one to nonzero values. The denominator may have an atom at zero in its original distribution; that atom is excluded by conditioning. The density formula describes the continuous part, not the atom at zero.
For the continuous component, condition on \(B=b\ne0\). The transformation \(r=a/b\) is one-to-one in \(a\), with inverse \(a=rb\) and absolute derivative \(|da/dr|=|b|\). Thus the conditional subdensity of \(R\) at \(r\), given \(B=b\), is \(|b|h_A(rb)\). Integrating this nonnegative function over \(G(db)\) gives the displayed density. This averaging is valid by Tonelli’s theorem for nonnegative functions. Its total integral is \(\int\!\int |b|h_A(rb)\,dr\,G(db)=\int(1-p_A)\,G(db)=1-p_A\), using the substitution \(a=rb\) for each \(b\ne0\). Together with the atom of mass \(p_A\), the ratio law has total mass one. \(\square\)
Worked Example: A Continuous Ratio With a Zero Denominator Atom
Let \(A\) be uniform on \((0,1)\), and independently let \(B=0\) with probability \(0.40\), while with probability \(0.60\), \(B\) is uniform on \((1,2)\). Find the conditional density of \(R=A/B\) given \(B\ne0\).
Given \(B\ne0\), \(B\) is uniform on \((1,2)\), and \(A\) has density \(h_A(a)=1\) for \(0<a<1\). For a fixed \(b\in(1,2)\), the ratio density is \(b\) when \(0<rb<1\), and zero otherwise. Averaging over the conditional density of \(B\), which is one on \((1,2)\), gives
The density is zero for \(r\le0\). If \(0<r<1/2\), then \(rb<1\) for every \(b\in(1,2)\), so \(f_R(r)=\int_1^2 b\,db=(4-1)/2=3/2\). If \(1/2\le r<1\), the allowed values are \(1<b<1/r\), giving \(f_R(r)=\int_1^{1/r}b\,db=(r^{-2}-1)/2\). For \(r\ge1\), there are no allowed values except possibly a boundary point of probability zero, so the density is zero. Thus
As a check, the first interval contributes \((1/2)(3/2)=3/4\). The second contributes \(\int_{1/2}^1(1/(2r^2)-1/2)\,dr=1/4\). The density integrates to one, as required for a conditional distribution. The original probability \(0.40\) that \(B=0\) is not part of this conditional ratio law.
Worked Example: A Ratio With an Atom at Zero
Suppose \(A=0\) with probability \(1/4\) and \(A=3\) with probability \(3/4\). Independently, \(B=0\) with probability \(0.40\) and \(B=2\) with probability \(0.60\). Describe the ratio law given \(B\ne0\).
Conditioning on \(B\ne0\) forces \(B=2\). The value \(A=0\) produces \(R=0\), while \(A=3\) produces \(R=3/2\). Therefore
There is no continuous density: the conditional ratio distribution consists of two atoms. On the original sample space, the ratio is undefined on the event \(B=0\), which has probability \(0.40\). The conditional law is a probability distribution because it restricts attention to the remaining event and renormalizes there.
Common Pitfalls and Practical Interpretation
- Adding zero probabilities without subtracting overlap. The events \(X=0\) and \(Y=0\) can happen together. Use inclusion-exclusion; under independence the overlap is \(p_Xp_Y\).
- Using a density to account for an atom. A density assigns probability through integration over intervals. Report point masses separately, especially at zero.
- Treating \(A/B\) as defined when \(B=0\). Unless a separate convention is explicitly specified, the ratio has no value there. State that the law is conditional on \(B\ne0\), or report the subprobability measure and its total mass.
- Forgetting the sign of the denominator. When \(b<0\), \(A/b\le r\) is equivalent to \(A\ge rb\), not \(A\le rb\).
- Claiming a zero atom in the ratio comes from the denominator’s zero atom. The denominator’s zero event is excluded. Under independence, a ratio atom at zero instead comes from a zero numerator and a nonzero denominator.
The separation into an exceptional event and a conditional law is broadly useful. For products, zero is an ordinary output of the transformation and its probability is computed directly. For ratios, zero in the denominator prevents the transformation from being defined, so the nonzero-denominator event must be made explicit before calculating a distribution.
Check Your Understanding
Use event identities and conditioning carefully in each case.
- If \(P(X=0)=0.2\), \(P(Y=0)=0.5\), and \(P(X=0,Y=0)=0.1\), find \(P(XY=0)\). Would independence be needed?
- Independent variables \(A\) and \(B\) satisfy \(P(A=0)=0.3\) and \(P(B=0)=0.25\). Find the mass at zero of \(AB\).
- Why must the ratio CDF condition on \(B\ne0\) when \(P(B=0)>0\)? What is the probability mass of the corresponding subprobability measure?
- For a fixed negative \(b\), rewrite the event \(\{A/b\le r\}\) as an event involving \(A\).
- If \(A\) has an atom of mass \(0.15\) at zero and is independent of \(B\), with \(P(B\ne0)>0\), what is the mass at zero in the conditional ratio law?