Skip to content
Knowledge

/knowledge/probabilistic-graphical-models

Probabilistic Graphical Models

When many uncertain variables interact, the full joint distribution is impossibly large. A graphical model draws the dependencies as a network — and that picture is exactly what makes reasoning under uncertainty tractable, and explainable.

Studied
Probabilistic Graphical ModelsAdvanced · reasoning under uncertainty
When
Probabilistic ML
Applied in
Structured uncertain reasoning
Read / Refreshed
~14 min read2026-06-26

Reasoning under uncertainty about one variable is the Bayesian story. But real problems involve many interrelated uncertain variables — symptoms and diseases, causes and effects, signals and states — and the full joint distribution over all of them is astronomically large. Probabilistic graphical models (PGMs) make this tractable with a beautiful insight: draw the dependencies between variables as a graph, and that graph both compresses the distribution into manageable pieces and tells you how to reason with it. It's where probability theory meets graph theory, and it underlies a great deal of modern probabilistic AI.

It ties together threads you've already met — it's Bayesian, its graphs are the same DAGs from causal inference, and learning its structure is causal discovery. This page is the core idea (independence as a graph), Bayesian networks, how the graph factorises the joint, and how you reason with evidence.

01

Taming the impossible joint

Everything you'd want to know about a set of variables is, in principle, in their joint distribution — the probability of every combination of values. The problem is size: for just 30 yes/no variables, the joint has over a billion entries. You can't store it, let alone estimate it from data or compute with it. Some structure has to be exploited, and the structure that saves us is independence — most variables don't directly depend on most others.

02

Conditional independence as a graph

The central idea: a graph encodes which variables are (conditionally) independent of which. Each variable is a node; an edge between two nodes means a direct dependency; a missing edge asserts a conditional independence ("once I know its parents, this variable tells me nothing more about that one"). The graph is a compact, human-readable map of the dependency structure — and crucially, those independence assumptions are exactly what shrink the impossible joint into something small and computable.

03

Bayesian networks

The most common PGM is the Bayesian network (or belief network): a directed acyclic graph (DAG, the same structure as a causal diagram) where each node depends only on its parents. Each node carries a small table — its probability given its parents — and that local information, plus the graph, fully specifies the entire joint distribution.

RainSprinklerGrasswet
A classic Bayesian network. Rain and Sprinkler each independently can make the Grass wet; Rain also influences whether the Sprinkler runs. The graph says Grass depends only on Rain and Sprinkler — so the huge joint factorises into three small local pieces.

The classic toy example: Rain and a Sprinkler can each make the Grass wet, and rain also affects whether the sprinkler runs. Three nodes, a few small tables — and you've captured a full joint distribution you can reason about.

04

The factorisation: why it's tractable

The mathematical payoff is the factorisation. A Bayesian network says the full joint distribution is just the product of each variable's probability given its parents:

P(X1,,Xn)=i=1nP(Xiparents(Xi))P(X_1, \dots, X_n) = \prod_{i=1}^{n} P\big(X_i \mid \text{parents}(X_i)\big)

This is the whole magic in one line. Instead of one gigantic table over all variables, you store many small tables (one per node, sized only by its few parents). The billion-entry joint for 30 variables collapses to a handful of small tables — storable, learnable, and computable. The graph's missing edges are precisely the independence assumptions that license this factorisation: structure buys tractability.

05

Reasoning with evidence: inference

The point of building the model is inference — answering questions of the form P(queryevidence)P(\text{query} \mid \text{evidence}): "given the grass is wet and it's cloudy, what's the probability it rained?" You clamp the observed variables to their values and compute the updated distribution over the ones you care about — Bayesian belief-updating, propagated through the network.

06

Learning the model

A PGM has two things to learn: the parameters (the probability tables, given the graph — usually straightforward from data) and the structure (the graph itself — which edges exist). Learning the structure from observational data is exactly causal discovery, with all its difficulty (you often recover only an equivalence class). In practice the structure frequently comes from domain knowledge — an expert draws the dependency graph — and only the parameters are learned, which is a real strength: PGMs let you encode what you know and learn the rest.

07

Where it shows up in my work

08

Refresh in 60 seconds

The independence-as-graph idea, the Bayesian-network factorisation, and the exact-vs-approximate inference framing reflect current probabilistic-graphical-model references alongside coursework.