Certainty factors (Stanford / MYCIN)
The Stanford CF algebra — CF = MB − MD, AND = min, OR = max, premise×rule strength, and the multi-rule combination formula — and how it differs from probability.
Why not just use probability?
The expert systems of the late 1970s (MYCIN, diagnosing bacterial blood infections) needed to reason under uncertainty, but full Bayesian inference demanded probability tables nobody could fill in, and human experts don’t *think* in frequentist probabilities. The Stanford certainty-factor (CF) algebra is the engineering compromise: a small set of heuristic combination rules that are cheap to compute and natural for experts to author.
CF = measure of belief − measure of disbelief
For a hypothesis $H$ given evidence $E$, the CF separates two quantities:
- $MB(H\mid E)$ — the measure of belief (how much $E$ supports $H$), - $MD(H\mid E)$ — the measure of disbelief (how much $E$ argues against $H$),
and defines $$CF(H\mid E) = MB(H\mid E) - MD(H\mid E) \in [-1, +1],$$ where $+1$ means certainly true, $-1$ certainly false, and $0$ no net evidence. The key structural difference from probability: in probability $p(H) + p(\lnot H) = 1$, but here $MB + MD$ need *not* sum to 1. That lets the model distinguish genuine ignorance (both near 0) from conflicting evidence (both moderate) — something a single probability cannot express.
The combination rules (this is the examined part)
Three rules cover everything:
- Premises combined with AND → take the minimum CF (the weakest link): $CF(P_1 \land P_2) = \min\big(CF(P_1), CF(P_2)\big)$.
- Premises combined with OR → take the maximum CF (the strongest evidence): $CF(P_1 \lor P_2) = \max\big(CF(P_1), CF(P_2)\big)$.
- The combined premise CF is then multiplied by the rule’s own strength to get the conclusion’s CF.
When *two separate rules* independently support the same conclusion, combine their CFs (the case both positive) as $$CF_{\text{combined}} = CF_1 + CF_2 - CF_1 \cdot CF_2.$$ This produces a value stronger than either alone but still bounded by 1. (For both negative the sign flips to $CF_1 + CF_2 + CF_1\cdot CF_2$; for mixed signs it is $(CF_1 + CF_2)/(1 - \min(|CF_1|,|CF_2|))$.)
Worked example
Rule R1: *IF $P_1$ (CF $0.8$) AND $P_2$ (CF $0.6$) THEN conclusion*, with rule strength $1.0$. The AND-premise CF is $\min(0.8, 0.6) = 0.6$, times the rule strength $1.0$ gives a conclusion CF of $0.6$. Now a second rule R2 independently concludes the same fact with CF $0.6$. Combining the two positive CFs: $0.6 + 0.6 - 0.6 \times 0.6 = 1.2 - 0.36 = 0.84$. So accumulating a second supporting rule raises the belief from $0.6$ to $0.84$ — stronger than either rule alone, yet still below certainty. The code exercise computes exactly this.