Conditional Probability and Independence Calculator

Analyze event overlap, dependence, and updated likelihoods. Switch between direct probabilities and frequency inputs easily. See results, charts, examples, formulas, and export options instantly.

Enter Inputs

Use direct probabilities, full frequency counts, or a mix that includes one conditional probability. Frequency fields override direct probability fields when all count inputs are present.

Example Data Table

Scenario P(A) P(B) P(A ∩ B) P(A ∪ B) P(A|B) Independence
Students passing Algebra and Geometry 0.60 0.50 0.30 0.80 0.60 Yes, because 0.30 = 0.60 × 0.50
Visitors clicking email and buying 0.40 0.25 0.16 0.49 0.64 No, because 0.16 ≠ 0.10
Frequency mode with 100 trials 0.60 0.50 0.30 0.80 0.60 Yes, using counts 60, 50, and 30

Formula Used

  • Conditional probability: P(A|B) = P(A ∩ B) / P(B), when P(B) > 0.
  • Reverse conditional: P(B|A) = P(A ∩ B) / P(A), when P(A) > 0.
  • Union rule: P(A ∪ B) = P(A) + P(B) - P(A ∩ B).
  • Independence rule: A and B are independent when P(A ∩ B) = P(A) × P(B).
  • Only A: P(A only) = P(A) - P(A ∩ B).
  • Only B: P(B only) = P(B) - P(A ∩ B).
  • Neither: P(neither) = 1 - P(A ∪ B).
  • From counts: probability = event count / total sample size.

How to Use This Calculator

  1. Enter P(A) and P(B), or enter all four count fields.
  2. Add P(A ∩ B), P(A ∪ B), or one conditional probability.
  3. Set the tolerance to control how strictly independence is tested.
  4. Click Calculate Now to show the result block above the form.
  5. Review derived probabilities, independence difference, lift, and optional count diagnostics.
  6. Use the CSV or PDF buttons to save the output.

Conditional Probability and Independence Examples

Suppose 50% of customers open an email, 20% buy a product, and 15% both open and buy. Then P(Buy|Open) = 0.15 / 0.50 = 0.30. Independence fails because 0.15 is greater than 0.50 × 0.20 = 0.10.

Now suppose 60% of students practice daily, 40% solve a challenge, and 24% do both. Since 0.24 equals 0.60 × 0.40, the events are independent. The conditional probability P(Challenge|Practice) also equals 0.40.

Frequently Asked Questions

1. What is conditional probability?

Conditional probability measures the chance of event A happening after event B has already occurred. It updates uncertainty using new information and is written as P(A|B).

2. What does independence mean in probability?

Two events are independent when one event does not change the chance of the other. In symbols, independence holds when P(A ∩ B) equals P(A) × P(B).

3. How does this calculator test independence?

It compares the actual intersection P(A ∩ B) with the product P(A) × P(B). If the gap is within your tolerance, it reports approximate independence.

4. Can I use counts instead of probabilities?

Yes. Enter total sample size, count of A, count of B, and count of both events. The calculator converts them into probabilities and computes the rest automatically.

5. What if I know only a conditional probability?

You can still compute the intersection when one marginal probability is known. For example, P(A ∩ B) = P(A|B) × P(B).

6. What is the union of two events?

The union represents the chance that A happens, B happens, or both happen. It avoids double counting by subtracting the overlap once.

7. Conditional probability and independence examples?

If P(A)=0.6, P(B)=0.4, and P(A ∩ B)=0.24, the events are independent. If P(A ∩ B)=0.30 instead, then P(A|B)=0.75 and independence fails.

8. Why is tolerance useful?

Real inputs often contain rounding. Tolerance lets you decide how much difference between P(A ∩ B) and P(A) × P(B) is still acceptable.

Related Calculators

chi squared probability calculatorCovariance and Correlation Calculatorsimple random sample probability calculatorbeta probability distribution

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.