Definition of Independence for Random Variables
What You'll Learn
You'll learn the precise mathematical definition that formalizes when two random variables behave completely independently of one another.
The Core Idea
Two random variables X and Y are independent when knowing something about one tells you nothing about the other. Mathematically, we formalize this by requiring that the probability of both events happening equals the product of their individual probabilities.
Formal Definition: Random variables X and Y are independent if and only if:
P(X ∈ A, Y ∈ B) = P(X ∈ A) · P(Y ∈ B)
for all sets A and B.
This must hold for every possible pair of sets you could choose.
What This Means
Think of flipping a coin and rolling a die. The coin result doesn't affect the die, and vice versa. If A = {Heads} and B = {getting a 6}, then:
- P(Heads AND Six) = P(Heads) × P(Six) = (1/2) × (1/6) = 1/12
The joint probability factors into the product of marginal probabilities.
In contrast, if you draw two cards without replacement, the first card affects the second. These would not be independent because knowing the first card changes probabilities for the second.
Why It Matters
This definition works for both discrete and continuous random variables. For discrete variables, the sets A and B could be individual outcomes. For continuous variables, they could be intervals. The key is that the factorization P(both) = P(first) × P(second) must hold universally, not just for some convenient cases.
Key Takeaway: X and Y are independent when P(X∈A, Y∈B) = P(X∈A)P(Y∈B) holds for all sets A and B—the joint probability always factors into the product of marginals.