Causal Bayes Net #
@cite{grusdt-lassiter-franke-2022}
Two-node causal Bayesian network infrastructure: directed causal structure over two binary variables, noisy-OR parameterization, and probability distributions with conditional probability, independence, and correlation.
- CausalRelation: A→C, C→A, or A⊥C causal structure
- NoisyOR: Noisy-OR parameterization for probabilistic causal links
- WorldState: Joint distribution over two binary variables A and C
Causal relations between two binary variables A and C. Used by @cite{grusdt-lassiter-franke-2022} for conditional semantics.
- ACausesC : CausalRelation
- CCausesA : CausalRelation
- Independent : CausalRelation
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Core.Causal.BayesNet.instDecidableEqCausalRelation x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
Equations
- One or more equations did not get rendered due to their size.
Noisy-OR parameterization for a causal link.
background(b): P(C | ¬A) — background ratepower(Δ): P(C | A) - P(C | ¬A) — causal power
- background : ℚ
Background rate: P(C | ¬A)
- power : ℚ
Causal power: P(C | A) - P(C | ¬A)
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Check if parameters are valid.
Equations
- n.isValid = (0 ≤ n.background ∧ n.background ≤ 1 ∧ 0 ≤ n.background + n.power ∧ n.background + n.power ≤ 1)
Instances For
Deterministic cause: P(C|A) = 1, P(C|¬A) = 0.
Equations
- Core.Causal.BayesNet.NoisyOR.deterministic = { background := 0, power := 1 }
Instances For
No effect: P(C|A) = P(C|¬A) = 0.
Equations
- Core.Causal.BayesNet.NoisyOR.noEffect = { background := 0, power := 0 }
Instances For
Always-on: P(C|A) = P(C|¬A) = 1.
Equations
- Core.Causal.BayesNet.NoisyOR.alwaysOn = { background := 1, power := 0 }
Instances For
A probability distribution over two binary variables A and C.
Used by @cite{grusdt-lassiter-franke-2022}: a "world" is a probability distribution because conditionals make claims about probabilities (P(C|A) > θ).
- pA : ℚ
Marginal probability P(A)
- pC : ℚ
Marginal probability P(C)
- pAC : ℚ
Joint probability P(A ∧ C)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
P(A ∧ ¬C)
Instances For
P(¬A ∧ C)
Instances For
P(¬A ∧ ¬C)
Instances For
P(¬A)
Instances For
P(¬C)
Instances For
P(C | A), or 0 if P(A) = 0.
Instances For
P(C | ¬A), or 0 if P(¬A) = 0.
Equations
- w.pCGivenNotA = if 1 - w.pA > 0 then w.pNotAC / (1 - w.pA) else 0
Instances For
P(A | C), or 0 if P(C) = 0.
Instances For
P(A | ¬C), or 0 if P(¬C) = 0.
Equations
- w.pAGivenNotC = if 1 - w.pC > 0 then w.pANotC / (1 - w.pC) else 0
Instances For
WorldState from marginals assuming independence.
Equations
- Core.Causal.BayesNet.WorldState.independent pA pC = { pA := pA, pC := pC, pAC := pA * pC }
Instances For
WorldState with perfect correlation (A ↔ C).
Equations
- Core.Causal.BayesNet.WorldState.perfectCorrelation p = { pA := p, pC := p, pAC := p }
Instances For
WorldState where A ∧ C never happens.
Equations
- Core.Causal.BayesNet.WorldState.mutuallyExclusive pA pC = { pA := pA, pC := pC, pAC := 0 }
Instances For
Validity implies 0 ≤ P(C|A) ≤ 1.
Validity implies 0 ≤ P(C|¬A) ≤ 1.
Law of Total Probability: P(C) = P(C|A)·P(A) + P(C|¬A)·P(¬A).