observationally_equivalent
Signature/Parameters
Test whether two DAGs are observationally equivalent. See details.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
G
|
DAG
|
Graph to compare with the current instance. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
|
Details
The method checks if two DAGs are observationally equivalent by comparing their Markov equivalent classes. The method considers only the DAG structure, that is, CBN or SCM when no functional form for the latter is selected. Observational equivalence is related to Markov equivalence.
Two DAGs are Markov equivalent if and only if
- They have the same skeleton (same set of adjacencies, i.e., same undirected edges)
- They have the same set of v-structures (triples where X and Y are not adjacent).
An equivalence class of a DAG is a graph that replaces directional edges with undirected edges except in v-structures. Therefore, all Markov equivalent DAGs will have the same equivalence class.
For CBN:
- Two CBNs are observationally equivalent if and only if they are Markov equivalent.
For SCM:
SCM without functional form assumptions, for observational equivalence to hold:
-
Necessary condition: both SCMs have the same set of conditional independencies.
-
Sufficient condition: both SCMs are in the same Markov equivalence class (Pearl, 2009).
Basically, two SCMs without imposing any functional form assumptions to either are observationally equivalent if and only if their causal graphs belong to the same Markov equivalence class — i.e., they share the same skeleton and v-structures.
SCM with functional form assumptions:
- Once you impose functional form restrictions on SCMs, such as linearity, Gaussian disturbance, or additive error, observational equivalence can be strictly finer. That is, Markov equivalence is not a sufficient condition.
Examples:
-
Linear Gaussian SEMs assumption: All DAGs in the same equivalence class remain indistinguishable. Markov equivalence implies observational equivalence and vice-versa. Reason: any covariance matrix that one DAG can generate can also be generated by another DAG in its equivalence class, via suitable parameter choice.
-
Linear non-Gaussian models (LiNGAM): Orientations become testable because independent non-Gaussian noise ‘pins down’ which variable must be the parent, breaking Markov equivalence. Example: \(X \rightarrow Y\) and \(X \leftarrow Y\): In the Gaussian case: indistinguishable. In non-Gaussian: distinguishable.
-
Additive Noise Models (ANMs): - If the true relation is with independent noise , then typically the ‘wrong’ orientation cannot hold with independent noise. So direction becomes identifiable.
In summary, generally, for SCMs with no distributional restrictions, Markov equivalence imply observational equivalence. But once you impose restrictions via functional forms or noise properties to the SCMs (linear, Gaussian, additive, etc.), observational equivalence can be strictly finer than Markov equivalence, and one may be able to distinguish empirically two DAGs inside the same Markov equivalence class. Some Markov-equivalent DAGs become distinguishable. Therefore, as the observational equivalence between Markov equivalent DAGs depends on the functional form assumption adopted, the evaluation is case-by-case.
Examples:
>>> G1 = DAG(graph="X -> Y")
>>> G2 = DAG(graph="X <- Y")
>>> G1.observationally_equivalent(G2)
True
References
- Pearl, J. (2009). Causality: Models, Reasoning and Inference. Cambridge University Press.
Source code in causalinf/gcm.py
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 | |