Compute fundamental probabilities: P(A∪B), P(A∩B), conditional probability P(A|B), and apply Bayes' Theorem. The interactive Venn diagram updates in real time, helping you grasp probability rules, independence, and Bayesian reasoning.
Probability theory rests on three axioms formalized by Andrey Kolmogorov in 1933: (1) Non-negativity: P(E) ≥ 0 for any event E; (2) Unity: P(Ω) = 1 for the sample space; (3) Additivity: For mutually exclusive events, P(∪Eᵢ) = ΣP(Eᵢ). Our calculator strictly adheres to these axioms, ensuring every derived probability is mathematically sound. The interactive Venn diagram visually represents the inclusion‑exclusion principle and conditional relationships.
General Addition Rule: P(A ∪ B) = P(A) + P(B) − P(A ∩ B)
Conditional Probability: P(A|B) = P(A ∩ B) / P(B) , provided P(B) > 0.
Bayes' Theorem: P(A|B) = [P(B|A) · P(A)] / P(B)
Derivation of Union (Inclusion‑Exclusion): For any two events, the probability of A or B equals the sum of individual probabilities minus the double‑counted intersection. This is visually clear in the Venn diagram: the overlapping region is added twice if we sum P(A)+P(B), so we subtract once.
Independence Criterion: Two events A and B are independent iff P(A∩B) = P(A)·P(B). If the user leaves the intersection blank, the calculator assumes independence — a common simplifying assumption in many statistical models.
Bayes' Theorem in Practice: Originally formulated by Thomas Bayes (1763), it enables updating prior probabilities after observing evidence. In medical screening, the prior disease prevalence P(D) is updated with test sensitivity P(Pos|D) and false positive rate to compute the posterior P(D|Pos).
The circles in our Venn diagram maintain fixed visual radii for clarity and readability, but the colored regions represent proportional probabilities through numeric annotations. The diagram displays "A only", "B only", and "A∩B" with exact probabilities derived from your inputs. While the geometric overlap is fixed, the annotations provide the precise area relationships — a pedagogically recommended approach that bridges abstract formulas with spatial intuition (consistent with GAISE college guidelines).
| Scenario | P(A) | P(B) | P(A∩B) | P(A∪B) | P(A|B) | Independence? |
|---|---|---|---|---|---|---|
| Independent dice rolls | 0.3 | 0.6 | 0.18 | 0.72 | 0.30 | ✓ Yes |
| Mutually exclusive | 0.2 | 0.3 | 0 | 0.5 | 0 | ✗ No |
| Overlapping events | 0.7 | 0.5 | 0.3 | 0.9 | 0.6 | ✗ No |
| Spam filter (Bayes) | 0.2 | 0.18 | 0.14 | 0.24 | 0.7778 | ✗ No |
Email providers use Bayes' theorem to classify spam. Suppose 20% of emails are spam (P(Spam)=0.2). The word "offer" appears in 70% of spam emails and in 5% of legitimate emails (P(Offer|Spam)=0.7, P(Offer|Legit)=0.05). If an email contains "offer", what's the probability it's spam?
Solution using Bayes: P(Spam|Offer) = (0.7×0.2) / (0.7×0.2 + 0.05×0.8) = 0.14 / 0.18 ≈ 0.7778. Our calculator replicates this: set P(A)=0.2 (spam), P(B)=0.18 (total probability of "offer"), and P(A∩B)=0.14 → yields P(A|B)=0.7778. This principle powers modern anti‑spam engines and content filtering systems.
A company tests two website variants. Historical conversion rate for variant A is 12% (P(Convert|A)=0.12) and for variant B is 15% (P(Convert|B)=0.15). Traffic split: 50% see A, 50% see B. What is the overall conversion rate P(Convert)? Given a conversion, what's the probability the user saw variant B? Using total probability: P(Convert) = 0.5×0.12 + 0.5×0.15 = 0.135. Bayes: P(B|Convert) = (0.5×0.15)/0.135 ≈ 0.556. Our tool helps demystify posterior probabilities in business analytics and optimization.
With a disease prevalence of 1%, a test with 99% sensitivity and 95% specificity yields P(Disease|Positive) ≈ 16.7%. This classic example demonstrates that even highly accurate tests have low positive predictive value for rare conditions — a critical insight for clinicians and patients. The "Medical Test" preset loads these values: P(A)=0.01 (disease), P(B)=0.0594 (total positive rate), P(A∩B)=0.0099, revealing the posterior probability.