{
  "id": "conditional-independence",
  "title": "Conditional Independence",
  "lang": "en",
  "source_lang": "en",
  "summary": "Conditional independence means that, given specified information, learning one random variable provides no additional information about another.",
  "category": "mathematics",
  "subcategory": "probability-statistics",
  "type": "concept",
  "aliases": [
    "Conditional statistical independence",
    "CI"
  ],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/conditional-independence/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/conditional-independence/",
      "json": "https://aiwiki.page/zh/conditional-independence.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Conditional independence is a relation in probability theory and statistics describing variables whose dependence disappears once specified information is known. Two random variables \\(X\\) and \\(Y\\) are conditionally independent given \\(Z\\) when their conditional joint distribution factors into their conditional marginal distributions. Written \\(X\\perp\\!\\!\\!\\perp Y\\mid Z\\), this means that, after accounting for \\(Z\\), observing \\(Y\\) does not change the conditional distribution of \\(X\\), and conversely. Unlike ordinary statistical independence, the relation explicitly depends on the information being conditioned on. (stats.ox.ac.uk)"
    },
    {
      "heading": "Mathematical definition",
      "text": "For discrete variables, conditional independence requires\n\n\\[P(X=x,Y=y\\mid Z=z) = P(X=x\\mid Z=z)P(Y=y\\mid Z=z)\\]\n\nfor every \\(x,y\\) and every \\(z\\) with \\(P(Z=z)>0\\). Equivalently,\n\n\\[P(X=x\\mid Y=y,Z=z)=P(X=x\\mid Z=z)\\]\n\nwhenever the conditioning event has positive probability. Thus, the conditional joint distribution is a product distribution within each relevant stratum of \\(Z\\). For variables with suitable densities, the analogous factorization uses a conditional probability density:\n\n\\[f_{X,Y\\mid Z}(x,y\\mid z) =f_{X\\mid Z}(x\\mid z)f_{Y\\mid Z}(y\\mid z).\\]\n\nThese identities need hold only almost everywhere, rather than at arbitrarily chosen points where conditional distributions may be undefined. (stats.ox.ac.uk)\n\nA formulation using conditional expectation avoids requiring densities. For all bounded measurable functions \\(u,v\\),\n\n\\[E[u(X)v(Y)\\mid Z] = E[u(X)\\mid Z]E[v(Y)\\mid Z] \\quad\\text{almost surely}.\\]\n\nIn measure theory, conditioning on \\(Z\\) means conditioning on the sigma-algebra generated by \\(Z\\). The same definition extends to independence conditional on a general information sigma-algebra. (stats.ox.ac.uk)"
    },
    {
      "heading": "Conditioning can remove or create dependence",
      "text": "Marginal independence and conditional independence do not imply one another. A shared underlying variable can make two observations dependent before conditioning, even when they are independent given that variable. Conversely, conditioning on information jointly determined by two independent variables can make them dependent. These patterns correspond to common-cause and common-effect structures in graphical models. (cs.cmu.edu)\n\nAs an explicit illustration, let \\(X,Y\\) be independent fair binary variables and set \\(Z=X+Y\\). Conditional on \\(Z=1\\), only \\((X,Y)=(0,1)\\) and \\((1,0)\\) are possible, each with probability \\(1/2\\). Consequently,\n\n\\[P(X=1,Y=1\\mid Z=1)=0,\\]\n\nwhereas the product of the two conditional marginal probabilities is \\(1/4\\). Knowing the sum therefore destroys their independence.\n\nConditional independence is also stronger than zero conditional covariance or absence of conditional linear correlation. When the necessary moments exist, it implies\n\n\\[E[XY\\mid Z]=E[X\\mid Z]E[Y\\mid Z],\\]\n\nbut this single moment identity does not generally establish independence of the full conditional distributions. (arxiv.org)"
    },
    {
      "heading": "Logical properties",
      "text": "Conditional independence obeys four fundamental inference rules, often called the semigraphoid properties. Here \\(X,Y,W,Z\\) may represent collections of variables:\n\n- Symmetry: \\(X\\perp Y\\mid Z\\) implies \\(Y\\perp X\\mid Z\\).\n- Decomposition: \\(X\\perp(Y,W)\\mid Z\\) implies \\(X\\perp Y\\mid Z\\) and \\(X\\perp W\\mid Z\\).\n- Weak union: \\(X\\perp(Y,W)\\mid Z\\) implies \\(X\\perp Y\\mid(Z,W)\\).\n- Contraction: \\(X\\perp Y\\mid Z\\) together with \\(X\\perp W\\mid(Y,Z)\\) implies \\(X\\perp(Y,W)\\mid Z\\). (stats.ox.ac.uk)\n\nA further rule, intersection, holds under suitable strict-positivity assumptions:\n\n\\[X\\perp Y\\mid(Z,W),\\qquad X\\perp W\\mid(Z,Y) \\quad\\Longrightarrow\\quad X\\perp(Y,W)\\mid Z.\\]\n\nWithout those assumptions it can fail. Weak union does not license adding arbitrary conditioning variables: its premise requires independence from the entire pair \\((Y,W)\\). (stats.ox.ac.uk)"
    },
    {
      "heading": "Graphical representation",
      "text": "A probabilistic graphical model encodes conditional independence through graph structure. In a Bayesian network, a directed acyclic graph supports the factorization\n\n\\[p(x_1,\\ldots,x_n) =\\prod_{i=1}^{n}p(x_i\\mid x_{\\operatorname{pa}(i)}),\\]\n\nwhere \\(\\operatorname{pa}(i)\\) denotes the parents of node \\(i\\). Each variable is conditionally independent of its nondescendants given its parents. (cs.cmu.edu)\n\nThe d-separation criterion identifies further independences implied by this factorization. Conditioning on the middle node blocks a simple chain \\(X\\to Z\\to Y\\) or fork \\(X\\leftarrow Z\\to Y\\). In a collider \\(X\\to Z\\leftarrow Y\\), however, conditioning on \\(Z\\), or a descendant of \\(Z\\), can open a previously blocked path. (cs.cmu.edu)\n\nD-separation guarantees independence for distributions that factorize according to the graph; failure of d-separation does not guarantee dependence in every particular distribution. Special parameter choices may produce additional independences. Graphical dependence also does not by itself establish causation: causal inference requires additional assumptions about causal structure. (cs.cmu.edu)"
    },
    {
      "heading": "Statistical applications and testing",
      "text": "In machine learning, the naive Bayes classifier assumes mutual conditional independence of features given a class variable \\(C\\):\n\n\\[p(x_1,\\ldots,x_n\\mid C) =\\prod_i p(x_i\\mid C).\\]\n\nCombined with Bayes’ theorem, this yields a compact classification model. The assumption concerns independence within classes, not independence across the pooled population. (cs.cmu.edu)\n\nConditional independence also expresses the role of a sufficient statistic: under an appropriate Bayesian interpretation with random parameter \\(\\Theta\\), sufficiency can be expressed as \\(X\\perp\\Theta\\mid T(X)\\). It formalizes the idea that the statistic retains the sample’s information about the parameter. (stats.ox.ac.uk)\n\nEmpirically assessing the relation is a problem in statistical hypothesis testing. Categorical variables permit contingency-table approaches, while continuously valued conditioning variables make distribution-free testing substantially harder. General impossibility results show that useful tests require restrictions on the distributional class or other assumptions; a test of conditional covariance alone cannot generally certify conditional independence. (stat.cmu.edu)"
    }
  ],
  "links": [
    "probability",
    "statistics",
    "random-variable",
    "statistical-independence",
    "joint-probability-distribution",
    "probability-density-function",
    "conditional-expectation",
    "measure-theory",
    "sigma-algebra",
    "covariance",
    "correlation",
    "probabilistic-graphical-model",
    "bayesian-network",
    "directed-acyclic-graph",
    "d-separation",
    "causation",
    "causal-inference",
    "machine-learning",
    "naive-bayes-classifier",
    "bayes-theorem",
    "sufficient-statistic",
    "bayesian-inference",
    "statistical-hypothesis-testing"
  ],
  "sources": [
    {
      "title": "stats.ox.ac.uk/~evans/APTS/ci.html",
      "url": "https://www.stats.ox.ac.uk/~evans/APTS/ci.html"
    },
    {
      "title": "stats.ox.ac.uk/~evans/gms/lecturenotes_17.pdf",
      "url": "https://www.stats.ox.ac.uk/~evans/gms/lecturenotes_17.pdf"
    },
    {
      "title": "cs.cmu.edu/~15281-f23/coursenotes/bayesnets/index.html",
      "url": "https://www.cs.cmu.edu/~15281-f23/coursenotes/bayesnets/index.html"
    },
    {
      "title": "arxiv.org/abs/1707.04802",
      "url": "https://arxiv.org/abs/1707.04802"
    },
    {
      "title": "cs.cmu.edu/~epxing/Class/10708-19/notes/lecture-02/",
      "url": "https://www.cs.cmu.edu/~epxing/Class/10708-19/notes/lecture-02/"
    },
    {
      "title": "stat.cmu.edu/~cshalizi/dst/20/lectures/27/lecture-27.html",
      "url": "https://stat.cmu.edu/~cshalizi/dst/20/lectures/27/lecture-27.html"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}