Tutorials › Statistical Theory I - Probability and Distribution Theory › Building Mixed Laws from Random Selection Rules

Discrete, Continuous, and Mixed Laws · Tutorial 72 of 994

Building Mixed Laws from Random Selection Rules

Learn to express a rule that selects a fixed value or draws from a continuous distribution as a complete mixed law, including its probabilities and moments.

Beginner 10 min read

What You'll Learn

  • Represent a fixed-outcome-versus-continuous-draw rule using a Bernoulli selection variable.
  • Derive the resulting probabilities of Borel sets and the CDF.
  • Identify the atom and the density contribution without treating the whole law as having a density.
  • Handle selection probabilities zero and one without undefined expressions.
  • Compute event probabilities, expectations, and variances from the two branches.
  • Recognize when a branch-specific distribution changes the resulting mixture law.

From a Selection Rule to a Probability Law

A random mechanism can be described operationally before it is written as a distribution. For example: first decide whether to report a fixed value; if not, draw a value from a continuous distribution. Translating this instruction into a law means recording exactly how much probability is assigned to the fixed value and how the remaining probability is spread continuously.

The selection step is part of the model. It is not the same as adding a fixed number to a continuous random variable: on one branch the output is fixed, and on the other branch it is a draw. The resulting law generally has both an atom and a continuous component.

Definition: Let \(0\le p\le 1\), let \(a\in\mathbb R\), and let \(Y\) have a density \(g\) with respect to Lebesgue measure. Let \(B\) be independent of \(Y\), with \(P(B=1)=p\) and \(P(B=0)=1-p\). Define \(X=a\) when \(B=1\), and \(X=Y\) when \(B=0\); equivalently, \(X=Ba+(1-B)Y\). The law of \(X\) is the mixed law generated by this selection rule. Independence ensures that the draw \(Y\) retains density \(g\) on the branch where it is used.

The endpoint choices \(p=0\) and \(p=1\) are allowed. At \(p=0\), the mechanism always draws \(Y\); at \(p=1\), it always returns \(a\). There is no need to define a conditional distribution for a branch that has probability zero.

The Complete Mixed-Law Representation

For any Borel set \(A\subseteq\mathbb R\), the event that \(X\) lies in \(A\) can occur on either of two disjoint branches: the fixed branch contributes if \(a\in A\), and the draw branch contributes when \(Y\in A\). Independence gives the full probability law.

Theorem: For every Borel set \(A\subseteq\mathbb R\),
$$ P(X\in A)=p\,\mathbf 1_{\{a\in A\}}+(1-p)\int_A g(y)\,dy. $$
Here \(\mathbf 1_{\{a\in A\}}\) is 1 if \(a\in A\) and 0 otherwise. The measure \(p\,\delta_a\) is the point-mass component, and the measure with density \((1-p)g\) is the absolutely continuous component. The latter integrates to \(1-p\), so it is a sub-probability measure unless \(p=0\).

To prove the formula, split the event according to the value of \(B\). The two pieces are disjoint, so \(P(X\in A)=P(B=1,\ a\in A)+P(B=0,\ Y\in A)\). The first term is \(p\,\mathbf 1_{\{a\in A\}}\). By independence, the second is \(P(B=0)P(Y\in A)=(1-p)\int_A g(y)\,dy\). Adding the terms proves the result, including when \(p=0\) or \(p=1\). \(\square\)

Taking \(A=(-\infty,x]\) gives the cumulative distribution function. If \(G(x)=\int_{-\infty}^x g(y)\,dy\) is the CDF of \(Y\), then

$$ F_X(x)=P(X\le x)=p\,\mathbf 1_{\{x\ge a\}}+(1-p)G(x). $$

Because a variable with a density has zero probability at every single point, \(P(Y=a)=0\). Therefore the probability at the selected point is exactly \(P(X=a)=p\). When \(p>0\), the CDF jumps by \(p\) at \(a\); when \(p=0\), it has no jump there. Away from the point mass, the absolutely continuous component contributes density \((1-p)g(x)\). If \(p>0\), this is not a density for the entire law: its integral is only \(1-p\), and the missing probability is the atom.

Worked Example: A Point Mass at Zero and an Exponential Draw

Suppose the mechanism returns \(0\) with probability \(0.3\), and otherwise draws \(Y\sim\operatorname{Exponential}(2)\), where the rate is 2. Thus \(g(y)=2e^{-2y}\) for \(y\ge0\), and \(g(y)=0\) for \(y<0\).

For \(x<0\), neither branch can produce a value at most \(x\), so \(F_X(x)=0\). For \(x\ge0\), the point-mass branch is included, and the exponential CDF is \(G(x)=1-e^{-2x}\). Hence

$$ F_X(x)= \begin{cases} 0, & x<0,\\ 0.3+0.7(1-e^{-2x}), & x\ge0. \end{cases} $$

At zero the CDF is \(F_X(0)=0.3\), so \(P(X=0)=0.3\). For \(x>0\), differentiating the continuous part gives density contribution \(0.7(2e^{-2x})=1.4e^{-2x}\). Its integral over \((0,\infty)\) is \(0.7\), as required.

The mean of an exponential variable with rate 2 is \(1/2\), and its second moment is \(2/2^2=1/2\). The fixed branch contributes zero to both moments, so \(E[X]=0.3(0)+0.7(1/2)=0.35\) and \(E[X^2]=0.3(0^2)+0.7(1/2)=0.35\). Thus \(\operatorname{Var}(X)=E[X^2]-(E[X])^2=0.35-0.35^2=0.2275\).

Events and Moments Follow the Branches

The set-probability formula gives event probabilities directly. For an interval, include the point-mass contribution precisely when the interval contains \(a\), then add the continuous probability weighted by \(1-p\). Endpoints matter for the atom: an interval that includes \(a\) gets the full point mass, while one that excludes \(a\) does not.

Expectations obey the same branch structure, but they require care when \(p\) is 0 or 1. In particular, a zero branch weight must not be multiplied by an infinite or undefined quantity.

Theorem: If \(h:\mathbb R\to[0,\infty]\) is Borel measurable, then
$$ E[h(X)]=p\,h(a)+(1-p)\int_{\mathbb R}h(y)g(y)\,dy, $$
where a term with zero weight is omitted, and any active term is allowed to be infinite. If \(h:\mathbb R\to\mathbb R\) is Borel measurable and
$$ p|h(a)|+(1-p)\int_{\mathbb R}|h(y)|g(y)\,dy<\infty, $$
again omitting zero-weight terms, the same expectation identity holds with finite, well-defined terms.

For the nonnegative case, split \(h(X)\) over the disjoint events \(B=1\) and \(B=0\). The contribution from the first event is \(p\,h(a)\) if \(p>0\), and is zero if \(p=0\). On the second event, independence and integration with respect to the density of \(Y\) give \((1-p)\int h(y)g(y)\,dy\) if \(1-p>0\), and zero otherwise. Additivity of expectation for nonnegative random variables proves the identity, even if an active contribution is infinite. For real-valued \(h\), the stated condition gives finite absolute expectation on each branch with positive probability. Applying the nonnegative identity to the positive and negative parts of \(h\), then subtracting their finite expectations, proves the real-valued formula. \(\square\)

In particular, if the relevant moments are finite, the mean and second moment are \(E[X]=pa+(1-p)E[Y]\) and \(E[X^2]=pa^2+(1-p)E[Y^2]\). The variance then follows from \(\operatorname{Var}(X)=E[X^2]-(E[X])^2\). These formulas apply at the endpoints as well: terms from a branch of probability zero are simply absent.

Worked Example: A Fixed Value Inside a Uniform Distribution

Return \(2\) with probability \(0.4\); otherwise draw \(Y\sim\operatorname{Uniform}(-1,1)\). The continuous branch has weight \(0.6\), and its density on \((-1,1)\) is \(1/2\). Therefore the density contribution to the mixed law is \(0.6(1/2)=0.3\) on that interval. The atom at \(2\) has probability \(0.4\).

The CDF of the uniform draw is 0 below \(-1\), \((x+1)/2\) for \(-1\le x<1\), and 1 for \(x\ge1\). Adding the point-mass contribution gives

$$ F_X(x)= \begin{cases} 0, & x<-1,\\ 0.3(x+1), & -1\le x<1,\\ 0.6, & 1\le x<2,\\ 1, & x\ge2. \end{cases} $$

The continuous component has mean 0 and second moment \(1/3\). Thus \(E[X]=0.4(2)+0.6(0)=0.8\), and \(E[X^2]=0.4(4)+0.6(1/3)=1.6+0.2=1.8\). Consequently, \(\operatorname{Var}(X)=1.8-0.8^2=1.16\). The jump at 2 is \(1-0.6=0.4\), matching the point-mass probability.

Worked Example: A Fixed Value Outside the Draw's Range

Suppose the mechanism returns \(3\) with probability \(0.25\), and otherwise draws \(Y\sim\operatorname{Uniform}(0,2)\). Since the continuous draw cannot equal 3, the law has an atom of size \(0.25\) at 3 and a density contribution of \(0.75(1/2)=0.375\) on \((0,2)\).

For \(0\le x<2\), the continuous CDF is \(x/2\), and the point mass has not yet entered. For \(2\le x<3\), the continuous branch is fully included, giving probability \(0.75\). At and above 3, both branches are included. Thus

$$ F_X(x)= \begin{cases} 0, & x<0,\\ 3x/8, & 0\le x<2,\\ 0.75, & 2\le x<3,\\ 1, & x\ge3. \end{cases} $$

For the interval \([1,3]\), the continuous draw contributes \(0.75P(1\le Y\le2)=0.75(1/2)=0.375\), and the fixed branch contributes \(0.25\). Therefore \(P(1\le X\le3)=0.625\). In contrast, \(P(X=2)=0\), because 2 is not the fixed value and a continuous draw has zero probability at a singleton.

Why the Selection Rule Matters

The same component distributions can produce different mixed laws if the selection mechanism changes. The formula above assumes that the continuous draw has density \(g\) independently of the selection. If selection is associated with a covariate that also changes the draw distribution, the density to use is the distribution of the draw on the branch where it is selected, not an unconditional density chosen without regard to that branch.

A related point is that the continuous component need not have positive weight. When \(p=0\), \(X=Y\) and the law has density \(g\) alone. When \(p=1\), \(X=a\) with probability one. The formulas for Borel sets and the CDF handle these cases directly. For expectations, however, the branchwise convention in the theorem is essential: never write a zero weight times an infinite expectation as though that product were defined.

Common Mistake

A frequent error is to call \((1-p)g\) the density of the entire mixed law. If \(p>0\), this function integrates to \(1-p\), not 1. For example, in the exponential example it integrates to \(0.7\); the remaining \(0.3\) is concentrated at zero and cannot be represented by an ordinary density with respect to length. The correction is to state both parts: an atom of mass \(p\) at \(a\), and an absolutely continuous component with density contribution \((1-p)g\). Another error is to omit the atom from a CDF at \(x=a\): the step term is \(p\mathbf 1_{\{x\ge a\}}\), so the mass is included at the point itself.

Key takeaway: A fixed-outcome-versus-draw rule gives the law \(p\,\delta_a+(1-p)G\), with the continuous component understood as a weighted probability measure. Derive event probabilities by checking which branch can produce the event, and treat zero-probability branches as absent.

Check Your Understanding

Use the branch probabilities explicitly in each answer.

  1. A mechanism returns \(a\) with probability \(p\), otherwise drawing from a density \(g\). Write \(P(X\in A)\) for a Borel set \(A\).
  2. If \(p=0.2\) and the draw has a continuous distribution, what is \(P(X=a)\)? Explain why the continuous branch adds no probability at \(a\).
  3. For \(p=0.4\) and \(Y\sim\operatorname{Uniform}(0,1)\), find the density contribution on \((0,1)\) and the total probability assigned to that continuous component.
  4. When \(p=1\), how should the expectation formula for a nonnegative function \(h\) be read?
  5. Why is \((1-p)g\) not a density for the whole law when \(p>0\)?