Tutorials › Pattern-Mixture and Selection Models › Bayes Rule Between Selection And Pattern-Mixture Factors

Factorizations of the Joint Distribution · Tutorial 37 of 499

Bayes Rule Between Selection And Pattern-Mixture Factors

Learn to normalize selection-weighted outcome distributions and check the conversion between selection and pattern-mixture factorizations.

Intermediate 9 min read

What You'll Learn

  • Express the selection and pattern-mixture factorizations of the joint law using a common notation.
  • Derive the normalizing probability associated with each response pattern.
  • Convert selection probabilities into conditional outcome distributions for discrete and continuous outcomes.
  • Check that pattern probabilities and conditional distributions are properly normalized.
  • Recognize support problems and errors caused by treating a continuous density as a point probability.

Why Convert Between the Factorizations?

A selection factorization starts with the marginal distribution of the complete outcome vector and describes how response patterns depend on that vector. A pattern-mixture factorization instead starts with the probability of a response pattern and describes the outcome distribution within that pattern. These are two ways to express the same joint distribution of outcomes and response pattern. Bayes’ rule supplies the conversion, and its denominator is essential: it is the probability of the response pattern under the selection model.

The conversion is an identity for a specified joint law, not a claim that the two factorizations impose the same model restrictions when their component distributions are chosen independently. The task here is to derive the conditional distribution and its normalizing probability, not to estimate either factorization or to infer unobserved outcomes from observed data.

Definition: Let \(Y\) denote the complete outcome vector and let \(R\) take values \(r\) in a finite set \(\mathcal{R}\) of response patterns. Write \(f_Y(y)\) for the marginal density or probability mass function of \(Y\), and write \(\pi_r(y)=P(R=r\mid Y=y)\) for the selection probability of pattern \(r\) at outcome value \(y\). The pattern probability is \(p_r=P(R=r)\). The pattern-mixture factorization is \(p_r f_{Y\mid R}(y\mid r)\); the selection factorization is \(f_Y(y)\pi_r(y)\).

For every possible \(y\), the selection probabilities must satisfy \(0\leq \pi_r(y)\leq 1\) and \(\sum_{r\in\mathcal{R}}\pi_r(y)=1\). These conditions say that the response patterns are mutually exclusive and collectively exhaustive. The marginal outcome law must also be a valid probability distribution. No missing-at-random condition is required for the conversion: \(\pi_r(y)\) may depend on any components of the complete outcome vector.

The formulas apply to discrete, continuous, and mixed outcomes. Use a common dominating measure for the outcome distribution: counting measure for a discrete outcome, Lebesgue measure for a continuous outcome, or an appropriate measure for a mixed outcome. In that notation, \(f_Y\) and \(f_{Y\mid R}\) are densities with respect to the same measure; for a discrete outcome they are probability mass functions.

Bayes’ Rule and the Normalizer

The joint density of \(Y\) and the response-pattern label \(R=r\) factors in two orders. The selection order first gives the marginal outcome density and then the response probability. The pattern-mixture order first gives the pattern probability and then the outcome density conditional on that pattern. Equating these joint densities yields the conversion.

$$ f_{Y,R}(y,r) =f_Y(y)\pi_r(y) =p_r f_{Y\mid R}(y\mid r). $$

Integrating over \(y\) gives the normalizing probability for pattern \(r\). For discrete outcomes, the integral below is a sum.

$$ p_r=P(R=r) =\int f_Y(y)\pi_r(y)\,d\nu(y), \qquad f_{Y\mid R}(y\mid r) =\frac{f_Y(y)\pi_r(y)}{p_r}, \quad p_r>0. $$

Here \(\nu\) is the chosen dominating measure. In particular, for a discrete outcome the joint probability statement is \(P(Y=y,R=r)=P(Y=y)\pi_r(y)=p_rP(Y=y\mid R=r)\). For a continuous outcome, the displayed joint-density equation is the relevant statement; it is not an equation for \(P(Y=y,R=r)\), which is zero at any single point under a continuous distribution.

$$ \begin{aligned} \text{Discrete:}\quad p_r&=\sum_y P(Y=y)\pi_r(y),& P(Y=y\mid R=r)&=\frac{P(Y=y)\pi_r(y)}{p_r}.\\ \text{Continuous:}\quad p_r&=\int f_Y(y)\pi_r(y)\,dy,& f_{Y\mid R}(y\mid r)&=\frac{f_Y(y)\pi_r(y)}{p_r}. \end{aligned} $$

The denominator is not an arbitrary scaling choice. It is the marginal probability of the pattern under the selection factorization, so it ensures that the conditional distribution sums or integrates to one. If \(p_r=0\), conditioning on \(R=r\) is not defined by this formula. If \(p_r>0\), the conditional density is defined wherever the numerator has support; values on sets of zero probability may be immaterial.

Key result: For each response pattern \(r\), multiply the marginal outcome distribution by its selection probability \(\pi_r(y)\), then divide by the marginal probability \(p_r=\int f_Y(y)\pi_r(y)\,d\nu(y)\). The same rule applies pattern by pattern, with a separate normalizer for each pattern.

Worked Conversions

Worked Example: Three Discrete Outcome Values

Suppose a hypothetical complete outcome \(Y\) takes values \(0,1,2\), with probabilities \(0.2,0.5,0.3\), respectively. There are two possible response patterns, \(A\) and \(B\). Suppose the selection probabilities for \(A\) at those outcome values are \(0.1,0.4,0.8\). The probabilities for \(B\) are their complements, \(0.9,0.6,0.2\), so the patterns form a valid partition at every outcome value.

First calculate the normalizing probability for pattern \(A\) by averaging its selection probability over the marginal outcome distribution:

$$ p_A=(0.2)(0.1)+(0.5)(0.4)+(0.3)(0.8) =0.02+0.20+0.24=0.46. $$

The conditional probabilities in pattern \(A\) are the marginal probabilities multiplied by their selection probabilities and divided by \(0.46\):

$$ \begin{aligned} P(Y=0\mid R=A)&=\frac{0.02}{0.46}=0.04348,\\ P(Y=1\mid R=A)&=\frac{0.20}{0.46}=0.4348,\\ P(Y=2\mid R=A)&=\frac{0.24}{0.46}=0.5217. \end{aligned} $$

These conditional probabilities sum to \(1.000\), up to rounding. For pattern \(B\), its normalizer is \(p_B=1-p_A=0.54\), and, for example, \(P(Y=1\mid R=B)=(0.5)(0.6)/0.54=0.5556\). The two pattern probabilities sum to one, as required.

Worked Example: A Continuous Outcome and a Density

Suppose a hypothetical continuous outcome \(Y\) has distribution \(N(0,1)\). There are two response patterns, \(A\) and \(B\). Let \(\pi_A(y)=0.8\) for \(y\leq 0\) and \(\pi_A(y)=0.4\) for \(y>0\), with \(\pi_B(y)=1-\pi_A(y)\). Both selection probabilities are between zero and one and sum to one for every \(y\). By symmetry of the standard normal distribution, \(P(Y\leq 0)=P(Y>0)=0.5\).

The normalizing probability for \(A\) is the integral of the marginal density times its selection probability. Splitting the integral at zero gives:

$$ p_A =0.8P(Y\leq 0)+0.4P(Y>0) =(0.8)(0.5)+(0.4)(0.5)=0.60. $$

Thus, for \(y>0\), the conditional density in pattern \(A\) is \(f_{Y\mid R}(y\mid A)=0.4\phi(y)/0.60\), where \(\phi\) is the standard normal density. At \(y=1\), \(\phi(1)=0.2420\), so the conditional density is \((0.4)(0.2420)/0.60=0.1613\) per outcome unit. This is a density value, not the probability that \(Y\) equals \(1\). For \(y\leq 0\), the corresponding density is \(0.8\phi(y)/0.60\).

The normalizer for \(B\) is \(p_B=1-0.60=0.40\). Each conditional density integrates to one: the numerator for \(A\) integrates to \(0.60\), and the numerator for \(B\) integrates to \(0.40\). This example also shows why a pattern-conditional distribution can differ from the marginal outcome distribution even when the marginal outcome is symmetric.

Worked Example: Normalizers for Several Joint Outcome Profiles

Consider a hypothetical discrete outcome vector \(Y=(Y_1,Y_2)\) with four possible profiles \(u_1=(2,4)\), \(u_2=(2,7)\), \(u_3=(5,4)\), and \(u_4=(5,7)\). Their marginal probabilities are \(0.10,0.20,0.30,0.40\). There are three response patterns, labelled \(A,B,C\). The following table gives the selection probabilities at each profile.

Outcome profile\(P(Y=u_j)\)\(\pi_A(u_j)\)\(\pi_B(u_j)\)\(\pi_C(u_j)\)
\(u_1\)0.100.800.100.10
\(u_2\)0.200.200.500.30
\(u_3\)0.300.100.200.70
\(u_4\)0.400.400.400.20

Each row of selection probabilities sums to one. The pattern normalizers are calculated separately by weighting each column of selection probabilities by the corresponding marginal profile probability:

$$ \begin{aligned} p_A&=(0.10)(0.80)+(0.20)(0.20)+(0.30)(0.10)+(0.40)(0.40)=0.31,\\ p_B&=(0.10)(0.10)+(0.20)(0.50)+(0.30)(0.20)+(0.40)(0.40)=0.33,\\ p_C&=(0.10)(0.10)+(0.20)(0.30)+(0.30)(0.70)+(0.40)(0.20)=0.36. \end{aligned} $$

The values \(0.31,0.33,0.36\) sum to one. For instance, the pattern-\(A\) conditional probability of profile \(u_4\) is \((0.40)(0.40)/0.31=0.5161\), while that of \(u_1\) is \((0.10)(0.80)/0.31=0.2581\). The larger conditional mass on \(u_4\) follows from both its relatively large marginal probability and its selection probability for \(A\). Each profile probability within a pattern is obtained by the same numerator-and-normalizer calculation.

Why the Conversion Is Correct

The identity follows directly from the two conditional factorizations of one joint law. To verify that the resulting pattern-conditional density is normalized, substitute its definition and integrate:

$$ \int f_{Y\mid R}(y\mid r)\,d\nu(y) =\int \frac{f_Y(y)\pi_r(y)}{p_r}\,d\nu(y) =\frac{1}{p_r}\int f_Y(y)\pi_r(y)\,d\nu(y) =\frac{p_r}{p_r}=1, \qquad p_r>0. $$

Likewise, summing or integrating the joint selection factors over outcomes and patterns recovers total probability one:

$$ \sum_{r\in\mathcal{R}}p_r =\int f_Y(y)\sum_{r\in\mathcal{R}}\pi_r(y)\,d\nu(y) =\int f_Y(y)\,d\nu(y)=1. $$

These checks are useful diagnostics. A computed \(p_r\) outside \([0,1]\), pattern probabilities that do not sum to one, or a pattern-conditional distribution that does not normalize indicates an error in the marginal distribution, the selection probabilities, the integration or summation, or the arithmetic. A pattern with very small \(p_r\) is possible, but it means that the conditional distribution divides by a small number and should be checked carefully for numerical stability.

Interpretation, Alternatives, and Limitations

The selection factorization \(f_Y(y)\pi_r(y)\) makes explicit how the chance of a response pattern varies over complete outcome values. The pattern-mixture factorization \(p_r f_{Y\mid R}(y\mid r)\) makes explicit the prevalence of each pattern and the outcome distribution among units in that pattern. For a specified joint law, Bayes’ rule converts exactly between these representations. The normalizers \(p_r\) are necessary for that conversion; they are not optional constants.

A pattern-conditional distribution here concerns the complete outcome vector given a response pattern, including components that may be unobserved for units in that pattern. It is a component of a joint-law factorization, not automatically a distribution that can be estimated directly from the observed outcomes. The conversion alone does not supply information about unobserved components or justify an assumption about how missingness depends on outcomes.

The main limitation is that the identity does not resolve how to specify or identify the full joint law from incomplete observations. It only shows how two factorizations relate once that law is specified. In particular, a selection model and a pattern-mixture model chosen separately need not represent the same joint law; their components must satisfy the conversion equations to do so.

Common Mistakes

  • Treating a continuous density as a point probability. For continuous \(Y\), \(P(Y=y,R=r)=0\) at an individual point. Use the joint density equation \(f_{Y,R}(y,r)=f_Y(y)\pi_r(y)=p_r f_{Y\mid R}(y\mid r)\); use point-probability equations for discrete outcomes.
  • Forgetting to average over the marginal outcome distribution. The normalizer is \(p_r=\int f_Y(y)\pi_r(y)\,d\nu(y)\), not the selection probability at one selected outcome value.
  • Using the same denominator for every pattern. Each pattern has its own \(p_r\), calculated from its own selection probability function.
  • Assuming a conditional distribution is already normalized. The product \(f_Y(y)\pi_r(y)\) integrates to \(p_r\), not generally to one. Divide by \(p_r\) when forming \(f_{Y\mid R}(y\mid r)\).

Check Your Understanding

Answer each question using the conversion and normalization rules above. Solutions follow the questions.

  1. A discrete outcome has \(P(Y=0)=0.6\) and \(P(Y=1)=0.4\), with \(\pi_A(0)=0.25\) and \(\pi_A(1)=0.75\). Find \(p_A\) and \(P(Y=1\mid R=A)\).
  2. Why is \(P(Y=y,R=r)=f_Y(y)\pi_r(y)\) not the appropriate statement for a continuous outcome at a single value \(y\)?
  3. If \(p_A=0.3\) and \(p_B=0.7\), what must be true of the two pattern-conditional distributions for the corresponding joint law to be normalized?
  4. For a continuous outcome, \(f_Y(y)=0.2\) and \(\pi_r(y)=0.5\) at a particular value \(y\), while \(p_r=0.4\). What is \(f_{Y\mid R}(y\mid r)\), and what does that number represent?

Solutions. (1) \(p_A=(0.6)(0.25)+(0.4)(0.75)=0.15+0.30=0.45\). Thus \(P(Y=1\mid R=A)=(0.4)(0.75)/0.45=0.6667\). (2) A continuous variable has zero probability at any single point; the valid equality is for joint densities, \(f_{Y,R}(y,r)=f_Y(y)\pi_r(y)\). (3) Each conditional distribution must be a valid probability distribution, summing or integrating to one; then the joint distribution has total mass \((0.3)(1)+(0.7)(1)=1\). (4) \(f_{Y\mid R}(y\mid r)=(0.2)(0.5)/0.4=0.25\) per outcome unit. It is a conditional density value at \(y\), not the probability that \(Y\) equals \(y\).

Clinical Biostats