Bayesian Network (Interactive)
Build a simple Bayesian network in the browser: create nodes, set parent relationships, define conditional probability tables (CPTs), and run exact inference with evidence.
Nodes & structure
Inference
Inference summary
—
Query
—
Evidence variables
0
Nodes in DAG
0
Denominator
—
Define your network and click Calculate to run exact inference.
How to Use This Tool
Create nodes, wire parents, define CPTs, and add evidence to observe how probability flows through the graph. Hit Calculate to see the exact probability of your query conditioned on the evidence you set.
This demo is educational: keep networks small (5–6 variables) and treat the answers as illustrations of enumeration. For production-grade modeling, export the structure to a dedicated engine.
Methodology
The engine enumerates every assignment of the DAG, multiplying the CPT rows for each node and summing across hidden variables. We normalize by dividing the joint probability that matches the query and evidence by the total probability of the evidence alone.
- Each CPT entry stores P(Node = True | parents). False probability is inferred as 1 minus that value.
- Evidence selects restrict variables to True/False. Leave them blank to marginalize over that variable.
- Results are deterministic for the current nodes and CPTs; edit any number or probability and recalculate.
Probability statements are shown with four decimal places and a percent summary so you can compare intuition with exact math.
Related Modeling Tools
Why Bayesian networks?
They let you mix expert knowledge (structure) with data (parameters) and still answer probabilistic queries. Use this page to experiment with small DAGs and understand conditional independence.