Two-Event Probability Calculator

Produced by statistical-calculators.site

(PDF export requires internet connection)

How to Use This Calculator

A step-by-step guide to calculating probabilities for two events

Step 1: Enter Basic Probabilities

Start by entering the individual probabilities for your two events:

💡 Example: If you're rolling a die, P(rolling a 6) = 0.1667 or P(flipping heads on a coin) = 0.5

Step 2: Select What You Know

Choose which combined probability you already know:

Option 1: P(A or B)

The probability that at least one of the events occurs. This includes cases where A happens, B happens, or both happen together.

Option 2: P(A and B)

The probability that both events occur simultaneously. This is also called the joint probability or intersection.

Step 3: Enter Your Value

Based on your selection in Step 2, enter the corresponding probability value (between 0 and 1).

⚠️ Important: The calculator will validate your inputs to ensure they're logically consistent. For example:

  • P(A and B) cannot be greater than P(A) or P(B)
  • P(A or B) cannot be less than P(A) or P(B)
  • All probabilities must be between 0 and 1

Step 4: Calculate and Interpret

Click the "Calculate" button to compute all related probabilities. The calculator will display:

Basic Probabilities

  • P(A and B)
  • P(A or B)
  • P(not A and B)
  • P(A and not B)

Conditional Probabilities

  • P(A|B) - A given B
  • P(B|A) - B given A
  • P(not A|B)
  • And more...

Each result includes a Venn diagram showing the shaded region representing that specific probability.

Understanding the Venn Diagrams

Each result includes a visual Venn diagram where:

The diagrams automatically adjust for special cases like mutually exclusive events (no overlap) or when one event is a subset of another.

Common Use Cases

📊 Statistics Students

Verify homework answers, understand probability relationships, and visualize complex probability concepts.

🔬 Data Analysts

Calculate joint and conditional probabilities for data analysis, A/B testing, and statistical modeling.

🎲 Probability Problems

Solve real-world problems involving dice, cards, weather predictions, medical testing, and more.

Exporting Your Results

After calculating, you can export a comprehensive PDF report that includes:

Note: PDF export requires an active internet connection to load the jsPDF library.

💡 Tips and Best Practices

Background: The Math Behind This Calculator

Key Formulas

  • Addition Rule: P(A or B) = P(A) + P(B) − P(A and B)
  • Conditional Probability: P(A|B) = P(A and B) / P(B)
  • Independence: A and B are independent if P(A and B) = P(A) × P(B), which is equivalent to P(A|B) = P(A)
  • Bayes' Theorem: P(A|B) = [P(B|A) × P(A)] / P(B)

📊 Worked Example:

Suppose P(A) = 0.5 (a customer visits your site) and P(B) = 0.4 (a customer makes a purchase), with P(A and B) = 0.25. Then P(A or B) = 0.5 + 0.4 − 0.25 = 0.65, and P(B|A) = 0.25 / 0.5 = 0.5. Since P(B|A) = 0.5 ≠ P(B) = 0.4, the events are not independent — visiting the site is associated with a higher chance of purchasing than the baseline.

How to Do This in R

pA <- 0.5
pB <- 0.4
pAandB <- 0.25

pAorB <- pA + pB - pAandB
pB_given_A <- pAandB / pA

cat("P(A or B) =", pAorB, "\n")
cat("P(B|A) =", pB_given_A, "\n")

How to Do This in SPSS

SPSS doesn't compute abstract joint/conditional probabilities directly from stated values (it works from data). If you have raw observations for events A and B as binary variables, use Analyze → Descriptive Statistics → Crosstabs, add both variables, and request row/column percentages — the cell percentages correspond directly to the joint and conditional probabilities.

How to Do This in JASP

Similarly, JASP works from datasets rather than stated probabilities. With raw binary data for A and B, use Descriptives → Frequency Tables (crosstab), or Regression → Correlation Matrix if you want to test the strength of association between the two events.

Related Statistical Calculators