Active trail

Within the context of a Probabilistic graphical model, an active trail is one where the random variable $$X_1$$ can influence another random variable $$X_k$$ through possible intermediate random variables $$X_2, \dots, X_{k-1}$$. The conditions for having an active trail will be given below for two separate cases: When some variables are and aren't observed.

Directed Bayesian Networks
As an example, in the graph on the right $$A$$ influences $$B$$ which in turn infleunces $$C$$.



This can also be seen in the conditional probability distribution:

$$P(A,B,C) = P(A)P(B|A)P(C|B)$$

However, things become interesting and counterintuitive when we observe a set of variables $$Z$$, which is equivalent to conditioning the probability distribution $$P$$ on the variables $$Z$$. The following sections will describe under which conditions a path of graphs is and isn't active.

Active trails without observed variables
A variable $$X$$ can influence $$Y$$ in the following types of path connections (see figure below for examples to each): $$X$$ can not influence $$Y$$ only in the a V-structure:
 * $$X \to Y $$ (e.g. $$A, C$$ in the figure below)
 * $$X \leftarrow Y$$ (e.g. $$C, A$$)
 * $$X \to W \to Y$$ (e.g. $$A,C,E$$)
 * $$X \leftarrow W \leftarrow Y$$ (e.g. $$E, C, A$$)
 * $$X \leftarrow W \to Y$$ (e.g. $$C, B, D$$)
 * $$X \to W \leftarrow Y$$ (e.g. A, C, B)

[[File:general_pgm.png]

All those cases are fairly intuitive. The only exception (i.e, V-structure) certainly makes sense: think of the example where $$A, B, C$$ are respectively class difficulty, student intelligence and student's grade.

Condition for active trail
A sequence of RVs $$X_1, \dots, X_{k}$$ form an active path if there is a path among them and this path contains no v-structures.

Active trails with observed variables
Assume that we have observed a set of RVs, $$Z$$ and that $$W \in Z$$. Then, a variable $$X$$ can influence $$Y$$ in the following types of path connections (see figure below for examples to each): Note that the pictured changed for V-structure: it does form an active trail now (see also V-structure). The following cases do not form an active trail; that is, $$X$$ can not influence Y:
 * $$X \to Y $$ (they are directly connected, $$Z$$ is irrelevant)
 * $$X \leftarrow Y$$ (ditto)
 * $$X \to W \leftarrow Y$$ (e.g. A, C, B)
 * $$X \to W \to Y$$ (e.g. $$A,C,E$$)
 * $$X \leftarrow W \leftarrow Y$$ (e.g. $$E, C, A$$)
 * $$X \leftarrow W \to Y$$ (e.g. $$C, B, D$$)

For example to $$X\to W \to Y$$, see figure on the right. The shaded node $$B$$ is observed. If it weren't observed, $$A$$ would influence $$C$$ through $$B$$. But when we observe $$B$$, we get all the possible information about the influence that $$A$$ can have on $$C$$ through $$B$$, therefore seeing $$A$$ can not provide any further information about $$C$$.

Conditions for active trail
When we have a set of observed RVs $$Z$$, the conditions for $$X_1,\dots,X_k$$ a being an active trail are that:
 * For any v-structure in the trail $$X_{i-1}\to X_i \leftarrow X_{i+1}$$, we have that $$X_i$$ or one of its descendants is in $$Z$$
 * No other $$X_i$$ is in $$Z$$ (otherwise $$X_i$$ would block the path see figure on right with shaded B).

Undirected Graphs
Active trails are very easy to identify in an undirected graph (i.e., a Markov network): Given that we observed RVs $$Z$$, a trail $$X_1 - ... - X_{k}$$ is active if no $$X_i$$ is in $$Z$$.