Probability Theory Visualization
Interactive Exploration of Conditional Probability, Independence & Total Probability
Select Demo Mode
Parameter Controls
Probability Data
📌 Observation: Adjust the sliders to change P(A), P(B), and P(A∩B). When independent events is enabled, P(A∩B) is automatically calculated as P(A)×P(B). The blue circle represents B, the red circle represents A, and the purple overlapping area represents A∩B. Conditional probability P(A|B) is the proportion of the purple area within the blue circle.
📌 Observation: This is a probability decision tree. B₁ and B₂ are mutually exclusive and exhaustive events (causes), and A is the result. The probability of each path is the product of conditional probability and prior probability. P(A) is the sum of probabilities of all paths that lead to A.
Total Probability Formula Derivation
Step 1: Understand the Premise
设事件组 B₁, B₂, ..., Bₙ 是样本空间 Ω 的一个划分(即 Bᵢ 互不相容且 ∪Bᵢ = Ω)
对于任意事件 A,我们有:
Step 2: Decompose Event A
A = A ∩ Ω = A ∩ (∪Bᵢ) = ∪(A ∩ Bᵢ)
由于 Bᵢ 互不相容,则 A ∩ Bᵢ 也互不相容
Step 3: Apply Countable Additivity
P(A) = P(∪(A ∩ Bᵢ)) = ∑P(A ∩ Bᵢ)
Step 4: Apply Multiplication Rule
对每一项使用乘法公式:P(A ∩ Bᵢ) = P(A|Bᵢ)P(Bᵢ)
最终公式:
P(A) = ∑ P(A|Bᵢ)P(Bᵢ)
其中 i = 1, 2, ..., n