Probability models
Introduced
Vocabulary
| English | Meaning |
|---|---|
| Bayesian network | A DAG of variables with conditional probability tables; inference multiplies along the graph and normalises. |
The network and the numbers
- A Bayesian network is a DAG of variables with conditional probability tables; inference multiplies along the graph and normalises. Course net: Storm → Delay → {Late, Complaint}.

{exercise:uni-cs1303-net}
Practice
A Bayesian network factorises —
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Each node keeps a CPT given its parents; the joint is their product.
Bayes, in the small
- $P(S) = 0.3$, $P(D \mid S) = 0.8$, $P(D \mid \neg S) = 0.1$, $P(C \mid D) = 0.6$, $P(C \mid \neg D) = 0.05$: marginalising D, $P(C \mid S) = 0.49$; $P(C \mid \neg S) = 0.105$; $P(C) = 0.2205$; $P(S \mid C) = \mathbf{0.667}$.
- The 4-node joint has 16 rows; the suite enumerates every one and confirms 0.667 — exact inference on small nets is bookkeeping, and the bookkeeping is the derivation.
{exercise:uni-cs1303-bayes}
Practice
With the course numbers, P(Storm | Complaint) = —
Difficulty 1/5 · 100 coins + a small bonus on first completion today
0.49 x 0.3 / 0.2205 = 0.667 - marginalise D both ways first.
The base rate is not a footnote
- With $P(S) = 0.03$ (rare storms): $P(C) = 0.11655$ and $P(S \mid C) = \mathbf{0.126}$ — same evidence, belief collapsing to one-eighth. Rare causes need strong evidence.
- Watch the two fallacies: dropping the normaliser $P(C)$, and swapping $P(C \mid S)$ for $P(S \mid C)$ (the prosecutor's fallacy). D-separation, not missing edges, decides dependence.
{exercise:uni-cs1303-base}
Practice
Halving the storm prior to 0.03 moves the posterior to —
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Rare causes need strong evidence: 0.667 falls to 0.126.