Course contentsShow
← Computer Science
Lesson 116 of 2,8723. Probability for Computer ScienceFree lesson

Independent Events

Identify independence between events and simplify probability calculations accordingly.

Independent Events

What you'll learn: You'll discover how to recognize when events don't influence each other and use that fact to simplify probability calculations.

The Core Idea

Two events are independent if knowing that one occurred doesn't change the probability of the other occurring. In other words, they don't affect each other at all.

Think of it like this: flipping a coin and rolling a die are independent. Whether your coin lands heads or tails tells you absolutely nothing about what number the die will show. They're separate actions with no connection.

Mathematically, events A and B are independent if:

P(A ∩ B) = P(A) × P(B)

Or equivalently, if:

P(A | B) = P(A)

This second form says "the probability of A given B occurred is just the regular probability of A" — meaning B didn't change anything.

Why This Matters in Computer Science

When events are independent, you can multiply their individual probabilities instead of tracking complex conditional relationships. This simplifies:

  • Network reliability: If two servers fail independently, the probability both fail is the product of their individual failure rates
  • Random testing: Multiple independent test cases give you straightforward combined probabilities
  • Hash collisions: Independent hash operations have multiplicative collision probabilities

Quick Example

A program has two independent modules. Module A crashes with probability 0.1, and Module B crashes with probability 0.2. What's the probability both crash?

Since they're independent:

P(Both crash) = P(A crashes) × P(B crashes) = 0.1 × 0.2 = 0.02

If they weren't independent, you'd need conditional probabilities — much more complex!

Key Takeaway: Events are independent when one happening doesn't affect the probability of the other; you can then multiply their probabilities directly using P(A ∩ B) = P(A) × P(B).