Why Mixed Joint Laws Need Their Own Bookkeeping
A pair of measurements need not have the same type. For example, a hypothetical monitoring system might record a device’s operating mode as a discrete label and its temperature as a continuous measurement. A joint model must keep the probability of each mode while also describing how temperature varies within that mode.
The key distinction is that a discrete value has a probability mass, whereas a continuous value is described by a density. For a mixed pair, each discrete value has an associated density slice. The integral of that slice is the probability of the discrete value; the slice itself is not generally a probability.
The sum ranges over all possible discrete values; it is finite if \(D\) has finite support. A slice \(q_i\) can be zero outside the values of \(y\) that are possible when \(D=d_i\). Its total integral is the discrete marginal probability \(P(D=d_i)\). The continuous marginal density is found by adding the slices at each \(y\).
This representation assumes that, for each discrete atom, the continuous component has a density with respect to ordinary length. A continuous random variable can still have a joint law with unusual singular features for which such slice densities are unavailable; the formulas below apply to the stated mixed density model.
Marginals and Event Probabilities
Integrating a slice over all continuous values removes \(Y\) and leaves the probability at a discrete atom. Conversely, adding all the slices at a fixed continuous value removes the discrete label and gives the marginal density of \(Y\). For a countable set of atoms, the sums below are well-defined because the slices are nonnegative.
To find the probability of an event involving both variables, identify which discrete atoms are allowed and which continuous values are allowed for each atom. Then integrate the relevant slice over those continuous values and sum the results. If the permitted range of \(Y\) depends on the value of \(D\), the integration limits must be chosen separately for each atom.
The joint cumulative distribution function also follows from the slices. Its first coordinate includes every discrete atom at or below the given cutoff, while its second coordinate integrates up to the continuous cutoff.
A mixed law does not usually have an ordinary joint probability density with respect to area in the \((d,y)\)-plane. The discrete coordinate places positive probability on vertical lines \(D=d_i\), while a continuous coordinate assigns probability zero to any single \(Y\)-value. The slice notation respects both facts.
Worked Example: Marginals and a Tail Event
Worked Example: Marginals and a Tail Event
A hypothetical sensor has operating state \(D\in\{0,1\}\) and a continuous reading \(Y\), measured in standardized units. Its joint density slices are \(q_0(y)=0.8y\) and \(q_1(y)=1.2(1-y)\) for \(0<y<1\), and zero otherwise. Find the marginal probabilities of the states, the marginal density of \(Y\), \(P(D=1,Y>0.5)\), and \(P(Y>0.5)\).
Method. Integrate each slice to get the state probability, add the slices to get the density of \(Y\), and integrate over the stated tail for each requested event.
For state \(0\), the marginal probability is $$ P(D=0)=\int_0^1 0.8y\,dy =0.8\left[\frac{y^2}{2}\right]_0^1 =0.4. $$ For state \(1\), $$ P(D=1)=\int_0^1 1.2(1-y)\,dy =1.2\left[y-\frac{y^2}{2}\right]_0^1 =1.2(0.5)=0.6. $$ The two probabilities add to \(0.4+0.6=1\), so the joint law is normalized.
For \(0<y<1\), add the slices: $$ f_Y(y)=0.8y+1.2(1-y)=1.2-0.4y. $$ It is zero outside \((0,1)\). As a check, $$ \int_0^1(1.2-0.4y)\,dy =1.2-0.2=1. $$
The requested probability in state \(1\) is $$ P(D=1,Y>0.5) =\int_{0.5}^1 1.2(1-y)\,dy =1.2\left[y-\frac{y^2}{2}\right]_{0.5}^1 =1.2(0.5-0.375)=0.15. $$ Summing both slices gives the full tail probability: $$ P(Y>0.5) =\int_{0.5}^1(1.2-0.4y)\,dy =\left[1.2y-0.2y^2\right]_{0.5}^1 =1-0.55=0.45. $$ The result checks by splitting on the two states: the state \(0\) contribution is \(\int_{0.5}^1 0.8y\,dy=0.30\), and the state \(1\) contribution is \(0.15\), for a total of \(0.45\).
Common mistake avoided: The functions \(q_0\) and \(q_1\) are joint density slices, not densities that each must integrate to one. Their integrals are \(0.4\) and \(0.6\), the actual probabilities of the two states.
Why the Marginal Formulas Hold
The marginal formulas follow by partitioning an event according to the discrete value. The events \(\{D=d_i,\;Y\in A\}\) are disjoint for distinct \(i\), and their union is \(\{Y\in A\}\). Additivity of probability and the definition of each slice therefore give
Thus the function \(f_Y(y)=\sum_iq_i(y)\) integrates to the probability of every set \(A\), which is exactly the defining property of a marginal density. Taking \(A\) to be the entire real line also verifies its normalization. For the discrete marginal, take \(A\) to be the entire real line within a single slice:
The same reasoning justifies event calculations: first separate the event into disjoint pieces for each value \(d_i\), then integrate the corresponding slice over the allowed \(y\)-values. Because the slices are nonnegative, summing and integrating in this way does not create cancellation or ambiguity.
Worked Example: A Support That Depends on the Discrete Value
Worked Example: A Support That Depends on the Discrete Value
A hypothetical inspection records a category \(K\in\{0,1,2\}\) and a continuous measurement \(Y\). The slices are \(q_0(y)=0.20\) for \(0<y<1\), \(q_1(y)=0.25\) for \(0<y<2\), and \(q_2(y)=0.30\) for \(0<y<1\), with each slice zero elsewhere. Find the marginal law of \(K\), the marginal density of \(Y\), \(P(K=1,Y>1)\), and \(P(Y\le0.5)\).
Method. Integrate each slice over its own support. For an event involving both variables, retain only the slice or slices meeting the discrete condition, and use the intersection of the event’s continuous range with that slice’s support.
The marginal probabilities are $$ P(K=0)=0.20(1-0)=0.20, \qquad P(K=1)=0.25(2-0)=0.50, \qquad P(K=2)=0.30(1-0)=0.30. $$ They sum to \(0.20+0.50+0.30=1\).
For \(0<y<1\), all three slices are present, so $$ f_Y(y)=0.20+0.25+0.30=0.75. $$ For \(1<y<2\), only the \(K=1\) slice is present, so \(f_Y(y)=0.25\). The density is zero elsewhere. Its integral checks: $$ \int_0^1 0.75\,dy+\int_1^2 0.25\,dy =0.75+0.25=1. $$
For \(K=1\) and \(Y>1\), the relevant interval is \(1<Y<2\): $$ P(K=1,Y>1)=\int_1^2 0.25\,dy=0.25. $$ For \(Y\le0.5\), all three slices contribute over \(0<y\le0.5\): $$ P(Y\le0.5) =\int_0^{0.5}(0.20+0.25+0.30)\,dy =0.75(0.5)=0.375. $$ This also follows from summing the three separate contributions, \(0.10+0.125+0.15=0.375\).
Common mistake avoided: The \(K=0\) and \(K=2\) slices stop at \(y=1\), so they must not be included in the marginal density on \(1<y<2\). Density slices are added only where their supports overlap the value of \(y\) being considered.
Worked Example: Finding an Unknown Normalizing Constant
Worked Example: Finding an Unknown Normalizing Constant
A hypothetical instrument produces a category \(D\in\{0,1,2\}\) and a continuous reading \(Y\). Its slices are \(q_0(y)=c\) on \(0<y<1\), \(q_1(y)=2c\) on \(0<y<1\), and \(q_2(y)=c\) on \(1<y<3\), with zero values elsewhere. Determine \(c\), the marginal law of \(D\), the marginal density of \(Y\), and \(P(D=2,Y\le2.5)\).
Method. Normalize by summing the areas under all slices. Then integrate each slice for the discrete marginal, add slices over their overlapping supports for the continuous marginal, and integrate the specified event.
The total probability is $$ \int_0^1c\,dy+\int_0^1 2c\,dy+\int_1^3c\,dy =c+2c+2c=5c. $$ Setting \(5c=1\) gives \(c=0.20\).
The discrete marginal probabilities are $$ P(D=0)=0.20(1)=0.20,\qquad P(D=1)=0.40(1)=0.40,\qquad P(D=2)=0.20(2)=0.40. $$ They sum to one. The continuous marginal density is \(0.20+0.40=0.60\) on \(0<y<1\), where the \(D=0\) and \(D=1\) slices overlap. It is \(0.20\) on \(1<y<3\), where only the \(D=2\) slice is present. Its total integral is $$ 0.60(1)+0.20(2)=0.60+0.40=1. $$
For the event \(D=2,Y\le2.5\), the \(D=2\) slice is supported on \(1<y<3\). Intersecting that support with \(Y\le2.5\) gives \(1<y\le2.5\), so $$ P(D=2,Y\le2.5)=\int_1^{2.5}0.20\,dy =0.20(1.5)=0.30. $$ The event probability is no greater than \(P(D=2)=0.40\), as required.
Common mistake avoided: Normalizing each slice separately would incorrectly force each discrete category to have probability one. The normalization condition applies to the sum of all slice integrals.
Common Errors to Avoid
- Treating a slice as a marginal density. A slice describes the joint contribution from one discrete atom. To get the density of the continuous variable, sum every slice that is nonzero at that value.
- Forgetting the discrete marginal is an integral. The probability of \(D=d_i\) is the area under \(q_i\), not the value \(q_i(y)\) at a selected point.
- Using the wrong support. Check the support separately for every discrete value before setting event limits or forming the marginal density.
- Assigning positive probability to a single continuous value. In this model, \(P(D=d_i,Y=y)=0\) for a single \(y\), since it is an integral over a set of length zero. The discrete atom can have positive probability, but the exact continuous value does not.
Check Your Understanding
For each problem, check that the slices have total integral one before using them to calculate event probabilities.
- A pair \((D,Y)\) has \(D\in\{0,1\}\), with \(q_0(y)=0.3\) and \(q_1(y)=0.2\) for \(0<y<2\), and zero otherwise. Find the two marginal probabilities of \(D\), \(f_Y(y)\), \(P(D=1,Y>1.5)\), and \(P(Y\le0.8)\). (Answer: \(P(D=0)=0.6\), \(P(D=1)=0.4\); \(f_Y(y)=0.5\) on \((0,2)\); the two event probabilities are \(0.1\) and \(0.4\).)
- Let \(N\in\{1,2,3\}\). The slices are \(q_1(y)=0.1\) on \((0,1)\), \(q_2(y)=0.2\) on \((0,1.5)\), and \(q_3(y)=0.1\) on \((0,6)\), all zero elsewhere. Find \(P(N=2)\), \(P(Y<1)\), and \(P(N=3,Y>3)\). (Answer: \(0.3,\;0.4,\;0.3\).)
- For \(D\in\{0,1\}\), let \(q_0(y)=c\) and \(q_1(y)=2c\) on \((0,1)\), with both zero elsewhere. Find \(c\), the marginal density of \(Y\), and \(P(D=1,Y>0.25)\). (Answer: \(c=\frac13\); \(f_Y(y)=1\) on \((0,1)\); the event probability is \(0.5\).)
- Let \(D\in\{0,1,2\}\) have slices \(q_0(y)=0.25\) on \((0,2)\), \(q_1(y)=0.25\) on \((0,1)\), and \(q_2(y)=0.125\) on \((0,2)\), all zero elsewhere. Find the marginal density on \((0,1)\) and \((1,2)\), then find \(P(0.5<Y<1.5)\) and \(P(Y>D)\). (Answer: the densities are \(0.625\) and \(0.375\); the two probabilities are \(0.5\) and \(0.5\).)
- A pair has \(D\in\{-1,2\}\), with \(q_{-1}(y)=0.2\) on \((0,1)\) and \(q_2(y)=0.4\) on \((0,2)\), zero elsewhere. Find \(F_{D,Y}(0,0.5)\) and \(P(D=2,Y=2)\). (Answer: \(F_{D,Y}(0,0.5)=0.1\); \(P(D=2,Y=2)=0\).)