liveBook · Manning

Conditional probability table

As explained in Causal AI

A conditional probability table is a tabular representation of the probability distribution of a variable for combinations of values of its parent variables.

A conditional probability table (CPT) maps each combination of parent-variable values to a probability distribution over a categorical variable. In a causal graphical model, it implements a causal Markov kernel such as P(T|O,R): each lookup returns a probability mass, and the outcomes for a fixed parent combination sum to 1. A variable without parents uses an ordinary probability table instead. section 3.1.8

Use a CPT to represent either learned uncertainty or deterministic assignment logic:

  • Learn its entries from categorical data; pgmpy’s fit method estimates parameters from class proportions and exposes them as TabularCPD objects. section 3.1.8
  • Encode a deterministic rule with 0 and 1 entries, so every parent configuration assigns exactly one outcome probability 1. section 6.3.3
  • Treat impossible parent combinations carefully: lookup tables may leave them blank, but TabularCPD requires assigned values for those cells. section 6.3.3

Transportation choice

For transportation T with occupation O and residence R as parents, a table entry gives a probability such as P(T=car|O=emp,R=big)=0.7034. The car, other, and train probabilities in that parent column sum to 1. The table is learned from survey data and used as one kernel in a Bayesian network. section 3.1.8

How Causal AI covers it

How deep it goes
Defines table semantics and pgmpy construction, then demonstrates learned probabilities, deterministic rules, and impossible configurations.
Examples
Uses transportation survey data and deterministic Monty Hall rules for host-door selection and player-second-choice variables.
What it assumes
Assumes categorical variables and parent-state combinations, while supplying the table structure and pgmpy arguments needed for implementation.
What you can do after
Apply it via pgmpy to learn parameters, encode assignment functions, assemble causal models, and support probabilistic inference.
How it connects
Links conditional probability tables to causal Markov kernels, causal DAGs, Bayesian networks, and structural causal models.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal AI. The section links point to the parts of the book it draws on.