Skip to Content
BayesiaLabKey ConceptsConditional Probability Table (CPT)

Conditional Probability Table (CPT)

Context

Bayesian networks are models that consist of two parts:

  1. A qualitative part to represent the dependencies using a Directed Acyclic Graph (DAG).
  2. A quantitative part, using local probability distributions, for specifying the probabilistic relationships.

A Directed Acyclic Graph (DAG) consists of nodes and directed links. Nodes represent variables of interest (e.g., the temperature of a device, the gender of a patient, a feature of an object, or the occurrence of an event), and they can correspond to symbolic/categorical variables, numerical variables with discrete values, or discretized continuous variables. Directed arcs represent statistical (informational) or causal dependencies among the variables, with the directions defining kinship relations, i.e., parent-child relationships. For example, in a Bayesian network with an arc from XX to YY, XX is the parent node of YY, and YY is the child node.

The local probability distributions can be either marginal for nodes without parents (Root Nodes) or conditional for nodes with parents. In the latter case, the dependencies are quantified by Conditional Probability Tables (CPT) for each node given its parents in the Directed Acyclic Graph (DAG). Multiplying the entries for a particular combination of states gives its joint probability through the network’s factorization. Once fully specified, a Bayesian network compactly represents the Joint Probability Distribution (JPD) and can be used for computing the posterior probabilities of any subset of nodes given evidence set on any other subset.

Example

The following illustration shows a simple Bayesian network, which consists of only two nodes and one directed arc.

Loading SVG...

This Bayesian network represents the Joint Probability Distribution (JPD) of the variables Eye Color\mathit{Eye\ Color} and Hair Color\mathit{Hair\ Color} in a population of students (Snee, 1974 ).

Eye Color\mathit{Eye\ Color} is a root node with no parents. Its probability table gives its marginal distribution. The Conditional Probability Table (CPT) for Hair Color\mathit{Hair\ Color} gives its distribution for each state of its parent node, Eye Color\mathit{Eye\ Color}.

Loading SVG...

Fix the parent state to blue eyes. Of the 215 students in this group, 94 have blond hair. The conditional probability is 43.7%, compared with 15.88% for the same pair of traits in the full group.

It is important to point out that this Bayesian network does not imply any causal relationships, even though the arc direction may suggest that to a casual observer. The arc direction merely defines the parent-child relationship of the nodes for purposes of representing the Joint Probability Distribution (JPD).