From a Longitudinal Graph to a Probability Model
A longitudinal directed acyclic graph (DAG) does more than display arrows. Under a suitable Markov assumption, it specifies which variables are needed to condition each factor in the joint distribution. The factorization is useful for writing down an observed-data model and seeing precisely what conditional-independence claims a graph entails. It is not, by itself, a causal effect estimate or a distribution under an intervention.
Use the temporal ordering \(L_0,A_1,L_1,A_2,L_2,\ldots,A_K,L_K,Y\), where \(L_0\) is baseline, \(A_t\) is treatment at time \(t\), \(L_t\) is a time-varying covariate measured after \(A_t\) and before \(A_{t+1}\), and \(Y\) is the final outcome. A bar denotes the history through the indicated time: for example, \(\bar A_t=(A_1,\ldots,A_t)\) and \(\bar L_t=(L_0,\ldots,L_t)\). An empty history contributes no conditioning variables.
For a finite discrete distribution, write its joint mass function as \(p\). For continuous variables, use a joint density and corresponding conditional densities with respect to appropriate dominating measures. More generally, the statements below apply to standard Borel variables with regular conditional distributions. Conditional distributions on events of probability zero need not be uniquely defined; factorization statements concern values on the support, up to null sets.
The Chain Rule and the Longitudinal Ordering
Before using any arrows to reduce a conditioning set, the probability chain rule gives a factorization in temporal order. No conditional-independence assumption is required for this version:
Each factor conditions on all preceding variables in the ordering. This is the saturated history factorization: it is a consequence of the chain rule for any joint distribution, not evidence that every earlier variable causally affects every later one. It provides a useful reference against which a sparser DAG can be checked.
To obtain a DAG factorization, replace each full preceding history with the parent set specified by the graph. That replacement needs a conditional-independence assumption. In particular, an earlier variable omitted from the parents of a node must be a non-descendant of that node, and the local Markov property requires the node to be conditionally independent of its non-descendants other than its parents, given its parents.
Proof. The chain rule in the topological ordering is \(p(v_1,\ldots,v_m)=\prod_{i=1}^{m}p(v_i\mid v_1,\ldots,v_{i-1})\). Every earlier node \(V_j\), with \(j<i\), cannot be a descendant of \(V_i\): a directed path from \(V_i\) to \(V_j\) would contradict the topological ordering. The earlier nodes therefore consist of parents of \(V_i\) and non-descendants other than parents. By the local Markov property, conditioning additionally on those non-descendants does not change the conditional distribution of \(V_i\), almost everywhere. Thus \(p(v_i\mid v_1,\ldots,v_{i-1})=p(v_i\mid\operatorname{pa}(V_i))\) for each \(i\). Substitution into the chain rule gives the stated product. \(\square\)
For example, if the graph has arrows into \(A_t\) only from \(\bar L_{t-1}\) and \(\bar A_{t-1}\), those variables are its parents; a factor for \(A_t\) is \(p(a_t\mid\bar l_{t-1},\bar a_{t-1})\). If the graph gives \(L_t\) only the parents \(L_{t-1}\) and \(A_t\), its factor is \(p(l_t\mid l_{t-1},a_t)\), not the full-history factor. This shorter conditioning set is an assertion of conditional independence from the omitted history given \(L_{t-1},A_t\). The arrows should not be removed merely to make the expression shorter.
Worked Example: Calculating One Joint Probability
Suppose \(L_0,A_1,L_1,Y\) are binary and the graph has parent sets \(\operatorname{pa}(L_0)=\varnothing\), \(\operatorname{pa}(A_1)=\{L_0\}\), \(\operatorname{pa}(L_1)=\{L_0,A_1\}\), and \(\operatorname{pa}(Y)=\{L_0,A_1,L_1\}\). Its factorization is
Let \(P(L_0=1)=0.4\), \(P(A_1=1\mid L_0=1)=0.75\), \(P(L_1=1\mid L_0=1,A_1=1)=0.70\), and \(P(Y=1\mid L_0=1,A_1=1,L_1=1)=0.70\). The probability of the joint event \((L_0,A_1,L_1,Y)=(1,1,1,1)\) is the product of those four probabilities:
Each factor conditions on the parents of that node in the stated graph. In particular, the outcome factor conditions on \(L_0\) as well as \(A_1,L_1\); dropping \(L_0\) would require an additional independence claim not supplied by this graph.
Marginalizing a Factorized Longitudinal Distribution
The product representation describes the joint distribution; probabilities for fewer variables are obtained by summing or integrating out the variables not of interest. For discrete data, the calculation is a sum over all compatible histories. For continuous variables, replace the sums by integrals with respect to the relevant measures.
Derivation. By definition, the marginal mass \(p(y)\) is the sum of the joint mass over every possible value of \(L_0,\bar A_K,\bar L_K\). Substitute the chain-rule product for that joint mass inside the sum. This gives exactly the displayed expression. If variables are continuous, the same marginalization identity is an iterated integral; for nonnegative densities, Tonelli’s theorem permits the iterated integrations without requiring absolute integrability. This derivation does not say that the outcome conditional probability is constant across histories: the factor \(p(y\mid\bar l_K,\bar a_K)\) may vary with every component of the history.
Worked Example: Computing an Outcome Probability Without Dropping History
Continue with binary \(L_0,A_1,L_1,Y\), and use the factorization from the first example. Suppose \(P(L_0=1)=0.4\); \(P(A_1=1\mid L_0=0)=0.25\) and \(P(A_1=1\mid L_0=1)=0.75\). The probabilities \(P(L_1=1\mid L_0,A_1)\), listed in the order \((L_0,A_1)=(0,0),(0,1),(1,0),(1,1)\), are \(0.10,0.40,0.30,0.70\).
Specify the outcome probabilities for every \((L_0,A_1,L_1)\) stratum:
The four \((L_0,A_1)\) stratum probabilities are \(0.6(0.75)=0.45\), \(0.6(0.25)=0.15\), \(0.4(0.25)=0.10\), and \(0.4(0.75)=0.30\). Within each stratum, split its mass by \(L_1\), then multiply each resulting history mass by the corresponding full-history outcome probability.
For \((L_0,A_1)=(0,0)\), the two history masses are \(0.45(0.90)=0.405\) and \(0.45(0.10)=0.045\). Their outcome contributions are \(0.405(0.05)=0.02025\) and \(0.045(0.20)=0.009\), totaling \(0.02925\).
For \((0,1)\), the history masses are \(0.15(0.60)=0.09\) and \(0.15(0.40)=0.06\). The contributions are \(0.09(0.10)=0.009\) and \(0.06(0.35)=0.021\), totaling \(0.03000\).
For \((1,0)\), the masses are \(0.10(0.70)=0.07\) for \(L_1=0\) and \(0.10(0.30)=0.03\) for \(L_1=1\). The outcome contributions are \(0.07(0.15)=0.0105\) and \(0.03(0.45)=0.0135\), totaling \(0.02400\).
For \((1,1)\), the masses are \(0.30(0.30)=0.09\) and \(0.30(0.70)=0.21\). The contributions are \(0.09(0.25)=0.0225\) and \(0.21(0.70)=0.147\), totaling \(0.16950\). Adding all four stratum totals gives
This calculation uses \(P(Y=1\mid L_0,A_1,L_1)\) in every history. A table of probabilities conditional only on \((A_1,L_1)\) would not justify these stratum-specific contributions unless the further assumption \(Y\perp L_0\mid A_1,L_1\) were stated.
Worked Example: An Omitted Parent Changes the Factorization
Let \(L_0,A_1,L_1\) be independent Bernoulli variables, each with probability \(0.5\) of being 1. Let \(Y\) satisfy \(P(Y=1\mid L_0=1)=0.8\) and \(P(Y=1\mid L_0=0)=0.2\), independently of \(A_1,L_1\) given \(L_0\). A valid factorization is
Consider instead the proposed sparse factorization \(p(l_0)p(a_1)p(l_1)p(y\mid a_1,l_1)\), which omits \(L_0\) as an outcome parent. In the actual distribution, \(P(Y=1\mid A_1=a,L_1=l)=0.5\), because averaging over the independent \(L_0\) gives \(0.5(0.8)+0.5(0.2)=0.5\). But the actual conditional probability given \(L_0=1,A_1=a,L_1=l\) is \(0.8\), not \(0.5\). Thus \(Y\not\!\perp L_0\mid A_1,L_1\), and the proposed factorization is false.
The discrepancy is visible in a joint cell. The actual probability of \((L_0,A_1,L_1,Y)=(1,1,0,1)\) is \(0.5(0.5)(0.5)(0.8)=0.10\). The proposed product, using its actual marginal conditional \(P(Y=1\mid A_1=1,L_1=0)=0.5\), gives \(0.5(0.5)(0.5)(0.5)=0.0625\). The mismatch demonstrates why each omitted parent must be supported by the graph’s independence assumptions.
Checking a Factorization and Avoiding Misinterpretation
A useful algebraic check is that each conditional factor is normalized over its own response variable for every parent value in the support. A product of such kernels on a DAG is itself normalized: integrate or sum out a sink node first, then repeat on the remaining graph. A sink has no children, so its value appears only in its own conditional factor at that stage.
Proof of normalization. In a finite DAG there is at least one sink. In the product \(\prod_i p(v_i\mid\operatorname{pa}(V_i))\), a sink \(V_j\) appears in its own factor but cannot appear in another node’s factor, since that would make it a parent and hence have an outgoing arrow. Summing over \(v_j\) replaces its normalized conditional factor by 1. The remaining product corresponds to the graph with that sink removed. Repeating this finite procedure reduces the total sum to 1. For continuous variables, replace each sum by an integral; nonnegativity allows the successive integrations by Tonelli’s theorem. \(\square\)
This normalization check is necessary but not sufficient to show that a proposed factorization describes the observed distribution. The factors must also be the correct conditional distributions, and every reduced conditioning set must be justified by the DAG’s assumptions. In practice, inspect the graph and the formula node by node:
- Confirm that the factor for each node conditions on its direct parents, not on its children or an accidentally shifted time index.
- Check that the graph respects measurement order. A variable measured after a treatment cannot be inserted as a parent of that earlier treatment in a longitudinal DAG.
- For each earlier variable omitted from a factor, ask whether the graph asserts conditional independence from that variable given the listed parents.
- Check that the factorization and data description refer to the same observed variables, including whether censoring or selection has been represented as a node when relevant.
The saturated chain rule is the main alternative when no conditional independences are being imposed: it conditions on the entire past and is always valid under the stated ordering. A sparse DAG factorization is more parsimonious, but it encodes assumptions that may be wrong. Comparing these approaches clarifies the role of the graph: sparsity is not a purely algebraic convenience. Conditional-independence implications can sometimes be examined against observed data, but a failure to detect a discrepancy does not establish the graph, especially with limited data or sparse histories.
Finally, the factorization is for the observed joint distribution. Replacing a treatment factor by a fixed treatment value, or otherwise changing the treatment assignment mechanism, is a different operation and requires a causal estimand and assumptions. The product formula alone does not license that operation, establish identification, or imply that an observed conditional association is a causal effect.
Check Your Understanding
Answer each question, then compare with the solutions below.
- Write the saturated chain-rule factorization for \(L_0,A_1,L_1,A_2,Y\).
- Suppose the parents of \(Y\) are \(A_1,L_1\), while \(L_0\) is an earlier non-parent. What conditional-independence statement is required to replace \(p(y\mid l_0,a_1,l_1)\) by \(p(y\mid a_1,l_1)\)?
- If \(P(L_0=1)=0.3\), \(P(A_1=1\mid L_0=1)=0.6\), \(P(L_1=1\mid L_0=1,A_1=1)=0.5\), and \(P(Y=1\mid L_0=1,A_1=1,L_1=1)=0.4\), calculate the joint probability of \((1,1,1,1)\).
- Does a factorization into normalized conditional distributions prove that the factors correctly represent the observed distribution? Explain.
Solutions. (1) The chain rule gives \(p(l_0)p(a_1\mid l_0)p(l_1\mid l_0,a_1)p(a_2\mid l_0,a_1,l_1)p(y\mid l_0,a_1,l_1,a_2)\). (2) The required statement is \(Y\perp L_0\mid A_1,L_1\), on the support. (3) Multiply the four supplied factors: \(0.3(0.6)(0.5)(0.4)=0.036\). (4) No. Normalization ensures the product sums or integrates to one, but the conditional factors must still match the observed conditionals, and every omitted variable must be justified by the graph’s conditional-independence assumptions.