Tutorials › Pattern-Mixture and Selection Models › Chain-Rule Factorization of Longitudinal Outcomes

Factorizations of the Joint Distribution · Tutorial 28 of 499

Chain-Rule Factorization of Longitudinal Outcomes

Learn to express and interpret a longitudinal outcome law as a product of visit-specific conditional distributions, and distinguish this exact decomposition from additional modeling assumptions.

Intermediate 11 min read

What You'll Learn

  • Write the joint distribution of an outcome vector as a product of sequential conditional distributions.
  • Interpret each factor using baseline covariates and the outcomes from all preceding visits.
  • Derive the factorization from the definition of conditional probability.
  • Calculate a joint probability or density from visit-specific factors.
  • Distinguish the chain rule from independence and first-order Markov assumptions.
  • Identify common factorization errors and understand what the decomposition does not establish.

Why Factor a Longitudinal Outcome Distribution?

For a person followed over \(T\) visits, the full outcome vector contains the outcomes at all visits, not merely one measurement at a time. Describing its joint distribution directly can be difficult. A sequential factorization gives another exact way to express that same distribution: start with the first outcome, then describe each later outcome conditional on baseline information and the outcomes already in the sequence.

This representation is useful because a conditional distribution at visit \(t\) has a clear interpretation: it describes the outcome at that visit among individuals with specified baseline covariates and a specified earlier outcome history. The factorization itself is a probability identity. It does not assert that outcomes at different visits are independent, that only the immediately preceding outcome matters, or that any conditional distribution has a particular parametric form.

Definition: Let \(Y=(Y_1,\ldots,Y_T)\) be a longitudinal outcome vector, where \(Y_t\) is the outcome at visit \(t\), and let \(Z\) denote baseline covariates, including treatment assignment when relevant. For \(t\geq 2\), write \(Y_{1:t-1}=(Y_1,\ldots,Y_{t-1})\); for \(t=1\), this history is empty. The chain-rule factorization of the conditional outcome distribution is $$ f(y_1,\ldots,y_T\mid z) = \prod_{t=1}^{T} f_t(y_t\mid y_{1:t-1},z), $$ where the first factor is \(f_1(y_1\mid z)\). Each \(f_t\) is the visit-specific conditional mass function or density, using the appropriate form for the outcome.

The notation \(f\) represents the joint mass function or density of the outcome vector conditional on \(Z=z\), while \(f_t\) represents the corresponding conditional mass function or density for visit \(t\). For discrete outcomes these are probabilities of values; for continuous outcomes they are densities. In the continuous case the equality is understood for values where the relevant densities and conditional distributions are defined, and densities are not themselves probabilities at individual points.

The factorization conditions on all outcomes before visit \(t\), not just the outcome at visit \(t-1\). For example, the third factor is \(f_3(y_3\mid y_1,y_2,z)\). Replacing it with \(f_3(y_3\mid y_2,z)\) is an additional restriction unless that conditional distribution happens not to depend on \(y_1\).

Why the Product Is Exact

For two outcomes, the definition of conditional probability gives \(f(y_1,y_2\mid z)=f_1(y_1\mid z)f_2(y_2\mid y_1,z)\). Applying the same identity to the first \(T-1\) outcomes and then conditioning the final outcome on their history yields the general expression. Thus the factorization follows from the joint law; it is not a modeling assumption about temporal independence.

$$ \begin{aligned} f(y_1,\ldots,y_T\mid z) &= f(y_T\mid y_1,\ldots,y_{T-1},z) f(y_1,\ldots,y_{T-1}\mid z)\\ &= f_T(y_T\mid y_{1:T-1},z) \prod_{t=1}^{T-1} f_t(y_t\mid y_{1:t-1},z)\\ &= \prod_{t=1}^{T} f_t(y_t\mid y_{1:t-1},z). \end{aligned} $$

This argument uses the usual conditional-probability or conditional-density identity. In settings with continuous variables, conditional distributions are understood in their standard measure-theoretic sense; for ordinary longitudinal applications, the displayed density notation is conventional. No independence assumption is needed. Conversely, a set of specified conditional distributions that are valid and normalized can be multiplied sequentially to define a joint distribution.

The conditioning covariates \(Z\) are held fixed throughout the product. If treatment and other baseline variables are included in \(Z\), every factor is interpreted conditional on those same baseline values. The factorization is a representation of the outcome law conditional on baseline information, not a statement that the baseline variables have any particular distribution.

Worked Example: A Joint Probability for Three Binary Visits

Consider a hypothetical study with binary outcomes \(Y_1,Y_2,Y_3\), where 1 denotes a symptom present and 0 denotes absent. Suppose the baseline covariates are fixed at \(Z=z\), and the following conditional probabilities apply:

  • \(P(Y_1=1\mid z)=0.60\).
  • \(P(Y_2=1\mid Y_1=1,z)=0.75\).
  • \(P(Y_3=1\mid Y_1=1,Y_2=0,z)=0.40\).

Find the probability of the sequence \((Y_1,Y_2,Y_3)=(1,0,1)\), conditional on \(Z=z\). The chain rule requires the probability of the observed value at each visit given its preceding history:

$$ \begin{aligned} P(Y_1=1,Y_2=0,Y_3=1\mid z) &=P(Y_1=1\mid z) P(Y_2=0\mid Y_1=1,z) P(Y_3=1\mid Y_1=1,Y_2=0,z)\\ &=0.60(1-0.75)(0.40)\\ &=0.60(0.25)(0.40)\\ &=0.0600. \end{aligned} $$

The sequence therefore has probability 0.0600, or 6.00%, under the stated conditional probabilities. The second factor is the probability of \(Y_2=0\), not \(Y_2=1\), because the target sequence specifies absence at visit 2. The third factor conditions on both earlier outcomes. This calculation does not require visits to be independent.

Conditional Densities for Continuous Outcomes

The same rule applies when outcomes are continuous. In that setting, each factor is a density, and the product gives the joint density at a vector of outcome values. The product is not the probability of observing exactly that vector; probabilities are obtained by integrating the joint density over a region.

Worked Example: A Two-Visit Normal Outcome Model

Suppose, hypothetically, that conditional on baseline covariates \(Z=z\), \(Y_1\sim N(10,4)\), and that \(Y_2\mid Y_1=y_1,z\sim N(2+0.5y_1,9)\). The second arguments are variances, so the standard deviations are 2 and 3, respectively. Calculate the joint density at \(y_1=10,y_2=8\).

The conditional mean for \(Y_2\) at \(y_1=10\) is \(2+0.5(10)=7\). By the chain rule, the joint density is the first-visit density times the second-visit conditional density:

$$ \begin{aligned} f(10,8\mid z) &=f_1(10\mid z)f_2(8\mid 10,z)\\ &=\frac{1}{2\sqrt{2\pi}} \exp\left(-\frac{(10-10)^2}{2(2^2)}\right) \frac{1}{3\sqrt{2\pi}} \exp\left(-\frac{(8-7)^2}{2(3^2)}\right)\\ &\approx 0.1995(0.1258)\\ &\approx 0.02509. \end{aligned} $$

The joint density is approximately \(0.02509\) in the inverse product of the units of \(Y_1\) and \(Y_2\). It is not a probability of 2.509% at the single point \((10,8)\). For example, the probability that the outcomes fall within specified intervals would require integrating this density over those intervals.

The assumptions used here are the stated conditional normal distributions with the specified means and variances. The chain rule does not require normality; normality is part of this hypothetical model, not part of the factorization identity.

Conditioning on the Full History Matters

The full preceding history appears in the chain rule even when a simpler model may later be considered. It is possible that a particular process has a conditional distribution for \(Y_t\) that depends on only a summary of earlier outcomes, or only on \(Y_{t-1}\). But that simplification must be justified or imposed; it does not follow from sequential notation.

Worked Example: Why the Immediately Previous Outcome May Not Suffice

Suppose a hypothetical binary-outcome process has \(P(Y_1=1\mid z)=0.50\), with \(P(Y_2=1\mid Y_1=1,z)=0.70\) and \(P(Y_2=1\mid Y_1=0,z)=0.20\). Suppose the conditional probability of \(Y_3=1\) is 0.60 for history \((Y_1,Y_2)=(1,0)\), but 0.10 for history \((0,0)\). Find the probability of the sequence \((1,0,1)\).

For this sequence, the probability of \(Y_2=0\) given \(Y_1=1\) is \(1-0.70=0.30\). The third-visit factor uses the complete history \((1,0)\):

$$ \begin{aligned} P(Y_1=1,Y_2=0,Y_3=1\mid z) &=0.50(0.30)(0.60)\\ &=0.0900. \end{aligned} $$

Now consider why the third-visit factor cannot automatically be replaced by \(P(Y_3=1\mid Y_2=0,z)\). In this example, \(P(Y_2=0\mid Y_1=1,z)=0.30\) and \(P(Y_2=0\mid Y_1=0,z)=0.80\). Therefore, \(P(Y_2=0\mid z)=0.50(0.30)+0.50(0.80)=0.55\), and \(P(Y_1=1\mid Y_2=0,z)=0.15/0.55\approx0.2727\). Averaging across the two possible values of \(Y_1\) gives:

$$ \begin{aligned} P(Y_3=1\mid Y_2=0,z) &=0.60\left(\frac{0.15}{0.55}\right) +0.10\left(\frac{0.40}{0.55}\right)\\ &\approx 0.2364, \end{aligned} $$

which differs from \(P(Y_3=1\mid Y_1=1,Y_2=0,z)=0.60\). Conditioning only on \(Y_2\) averages over the earlier \(Y_1\) values that can occur when \(Y_2=0\). The full-history factor and the factor conditioned only on the most recent outcome answer different questions.

Interpreting and Using the Factors

Each factor has a visit-specific interpretation. The first describes the distribution of the initial outcome for individuals with baseline covariates \(z\). A later factor describes the distribution of the current outcome among individuals with those same baseline covariates and the specified previous outcomes. Across all possible histories and values, the factors together specify the conditional joint law of the entire outcome vector.

A useful check is that each conditional mass function sums to one over the possible values of its outcome, or each conditional density integrates to one, for the conditioning histories where it is defined. If a conditional model assigns invalid probabilities or fails to normalize, its product cannot serve as the intended joint distribution. In empirical work, sparse histories can also make some visit-specific conditionals difficult to estimate reliably; that is a data and model-support problem, not a failure of the chain rule.

This decomposition is distinct from a direct model for the joint distribution. A direct joint model specifies the law of the whole vector at once; the chain-rule representation organizes it through successive conditional laws. Either can describe the same joint distribution if specified correctly. A more parsimonious model might impose conditional independence or a first-order Markov restriction, but those are added assumptions that change which histories a factor may depend on.

In longitudinal studies with incomplete outcomes, it is important to distinguish the full outcome-vector law from the data actually recorded. The factors here describe outcomes at all scheduled visits conditional on baseline covariates. They do not by themselves describe which outcomes are observed, nor do they imply that every factor can be estimated directly from the observed records. The response process and the consequences of incomplete observation require separate treatment.

Common Errors and Limitations

  • Dropping earlier outcomes without justification. Writing \(f_t(y_t\mid y_{t-1},z)\) instead of \(f_t(y_t\mid y_{1:t-1},z)\) imposes a restriction. The chain rule includes the full preceding history.
  • Reading the product as independence. The product contains conditional distributions, so dependence over time is allowed. Independence would require additional conditions on those factors.
  • Confusing density with probability. For continuous outcomes, a joint density at one point is not the probability of that exact outcome vector.
  • Mixing conditioning sets. Each factor must refer to its own visit outcome and the appropriate history, with the baseline covariates consistently included.
  • Treating the identity as an estimation guarantee. The factorization is exact, but it does not ensure that a chosen parametric model is adequate or that the required conditional distributions are estimable from available data.
Key takeaway: The longitudinal chain rule expresses the outcome-vector law as a product of visit-specific conditional laws, each given baseline covariates and the complete history before that visit. This is an exact re-expression of the joint law; independence, Markov structure, and parametric form are separate assumptions.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. For four visits, write the chain-rule factorization of \(f(y_1,y_2,y_3,y_4\mid z)\).
  2. Suppose \(P(Y_1=1\mid z)=0.40\), \(P(Y_2=0\mid Y_1=1,z)=0.70\), and \(P(Y_3=1\mid Y_1=1,Y_2=0,z)=0.50\). What is \(P(Y_1=1,Y_2=0,Y_3=1\mid z)\)?
  3. Does the chain-rule factorization imply that \(Y_3\) is conditionally independent of \(Y_1\) given \(Y_2,Z\)? Explain.
  4. For continuous outcomes, what does the product of the sequential conditional densities represent, and what additional operation gives probabilities for intervals?

Solutions. (1) \(f_1(y_1\mid z)f_2(y_2\mid y_1,z)f_3(y_3\mid y_1,y_2,z)f_4(y_4\mid y_1,y_2,y_3,z)\). (2) The missing middle factor is already given as \(P(Y_2=0\mid Y_1=1,z)=0.70\), so the product is \(0.40(0.70)(0.50)=0.140\). (3) No. The chain rule conditions on the full history; conditional independence would be an additional restriction requiring the \(Y_3\) distribution not to depend on \(Y_1\) after conditioning on \(Y_2,Z\). (4) The product is the joint density at the specified outcome vector, not its point probability. Integrate the joint density over the region of interest to obtain the probability that the vector lies in that region.

Clinical Biostats