- Introduced by
- Judea Pearl
- Year
- 1988
- Type
- Probabilistic graphical model
What does it do?
A Bayesian network is a probabilistic graphical model, introduced by Judea Pearl in 1988, that represents a set of variables and their conditional dependencies as a directed acyclic graph (DAG).
Each node is a variable, and each directed edge expresses a direct probabilistic influence of one variable on another. Combined with Bayes' rule, the graph's conditional independence structure lets the model compute the probability of any variable given evidence about others.
The intuition behind the method
Think of a map of cause-and-effect relationships in which arrows show which variables directly influence which others. Once the links are specified, evidence can be propagated through the network: observing a positive test result changes the probability of the underlying condition, which in turn changes the expected probabilities of symptoms not yet observed. The graph also states which variables are conditionally independent given others, so far fewer probabilities need to be stored and estimated than in an unstructured table over all variables.
History
Judea Pearl introduced and named Bayesian networks in his 1988 book Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference, which combined graph theory, probability and Bayes' rule into a framework for reasoning under uncertainty. The attribution rests on this book reference. The framework has since been extended in several directions, including learning network structure from data.
When to use it
Choose a Bayesian network when a problem involves several interacting variables and you need probabilities for different queries, such as predicting effects from causes or inferring causes from observed effects. It is suited to cases where the dependency structure can be justified from domain knowledge or from data. Categorical and binary variables fit directly into conditional probability tables; continuous variables need discretisation or an explicitly specified distributional form. The number of parameters to estimate grows with the number of states of each node and with the number of states of its parents, so each conditional probability table needs enough observations for every parent configuration. Where some configurations are rarely or never observed, expert priors or smoothing are needed. Do not use the method when the dependency structure cannot be determined from theory or data, because a misspecified DAG gives misleading inference. A single outcome predicted from several predictors is usually better handled by a regression model. Key assumptions are the Markov condition (each node is independent of its non-descendants given its parents), faithfulness (the independences observed in the data arise from the graph structure rather than from cancelling parameter values) and, for a causal reading of the edges, the absence of unmeasured common causes of the variables in the graph. Check these against domain knowledge before relying on the results.
Limitations and considerations
- Each conditional probability table needs observations for every combination of parent values. With small samples many cells are estimated from little or no data, and their estimates are unreliable. The sample required grows with the number of CPT cells, which is set by the number of states of each node and of its parents.
- Exact inference is generally hard for large, densely connected networks, so approximate methods are needed and add their own error.
- Structure learning from data can produce spurious edges, particularly between variables that are correlated without a direct link.
- Inferences depend on the DAG: a missing, extra or wrongly oriented edge changes which conditional independences are assumed and therefore the results.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- The DAG makes the assumed conditional independences visible, so domain experts can inspect and challenge them.
- Each node is stored as a conditional probability table over its parents, so the parameter count depends on how many parents each node has rather than on the full joint table.
- The same fitted network supports predictive inference (from causes to effects) and diagnostic inference (from effects to causes).
- Expert knowledge can enter through the graph structure or through the CPT values where data are scarce.
Applications
- Decision-making under uncertainty, where a network combines several interacting factors and quantifies the different uncertainties involved.
- Aggregating inconsistent information from several sources into a single probabilistic model.
- Predictive and diagnostic analysis: once new evidence is obtained, the network can be updated to answer both forward (effect) and backward (cause) queries.
- Use in several fields as a reasoning tool, particularly in combination with fuzzy and other methods for handling uncertain expert judgements.
How it works
How it works
The formula is Bayes' rule: the posterior is proportional to the likelihood multiplied by the prior. As written, it refers to a parameter θ given data y. The same updating logic applies to the variables in a network, where evidence about observed variables revises beliefs about unobserved ones. In a network, that revision passes along the graph's links, so evidence about one variable changes beliefs about the variables connected to it.
Formula
p(\theta\mid y) \propto p(y\mid\theta)\,p(\theta)
Despite its label, this step is the factorisation of the joint distribution, not a likelihood. The joint probability of all variables is the product, over all nodes, of each variable's probability conditioned only on its direct parents in the DAG. Each node stores this conditional distribution as a conditional probability table (CPT). Because the graph omits dependencies that are not direct, the joint distribution over n variables needs far fewer parameters than an unstructured table, which would require 2^n − 1 free probabilities.
Formula
p(X_1, X_2, \ldots, X_n) = \prod_{i=1}^{n} p(X_i \mid \mathrm{Pa}(X_i))Inference computes the posterior distribution of a query variable given observed evidence. The joint probability of the query variable and the evidence, p(X_i, e), is obtained by summing the joint distribution over all variables that are neither queried nor observed. The probability of the evidence, p(e), is then the sum of p(X_i, e) over the states of X_i, and dividing one by the other gives the posterior. Variable elimination and belief propagation perform this exactly on small networks. Exact inference is generally hard for large networks with many interconnections, so approximate methods such as MCMC or variational inference are often used in those cases.
Formula
p(X_i \mid \mathbf{e}) = \frac{p(X_i, \mathbf{e})}{p(\mathbf{e})}Common pitfalls
- Reading learned edges as causal arrows without causal assumptions; observational data alone often cannot establish the direction of an edge.
- Running structure learning on very small samples, where many CPT cells are estimated from few observations, and trusting the resulting edges.
- Assuming the Markov and faithfulness conditions hold without checking whether they are plausible for the domain.
- Evaluating the network on the same data used to fit its structure and CPTs; predictions should be checked on data not used in fitting.
Frequently asked questions
What is a DAG and why must it be acyclic?
A directed acyclic graph is a graph whose edges have a direction and which contains no directed cycles, so you cannot start at a node and follow edges back to the same node. The acyclicity requirement ensures that the joint probability factorises consistently: each node's probability is conditioned on its parents without circular dependencies. Feedback loops cannot be represented directly in this framework. They are usually handled by other formalisms or by unrolling the system over time, which produces an acyclic graph with separate nodes for each time point.
What is a conditional probability table?
A conditional probability table (CPT) for a node lists the probability of each of that node's values for every possible combination of its parents' values. Each row of the table is a probability distribution and must sum to one. A root node (no parents) has a simple marginal probability table. CPTs are either estimated from data using maximum likelihood or Bayesian estimation, or elicited from domain experts when data are scarce.
How is the graph structure determined?
Structure can come from domain theory (expert elicitation), from data using score-based algorithms (for example hill-climbing with a BIC score) or constraint-based algorithms (for example the PC algorithm using conditional independence tests), or from a combination of both. Data-driven structure learning needs enough observations for the CPT cells of the candidate structures, and sparse data can produce unreliable edge orientations.
What is the difference between a Bayesian network and a Bayesian regression model?
Bayesian regression is a single-equation model that places priors on regression coefficients and uses the posterior to predict one outcome from several predictors. A Bayesian network is a multivariate system: it models the joint distribution of all variables simultaneously through a graph, supporting inference in any direction, such as predicting downstream effects, diagnosing upstream causes, or computing any conditional distribution the graph supports.
Related methods
Sources
Pearl, J. (1988). Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann.
ISBN: 978-1558604797BOOK-linguistic-methods-under-fuzzy-information-in-system-safety-and--2022, p. 183