1.3 — Independence and Dependence
1.3 — Independence and Dependence#
Understanding whether events are independent or dependent is crucial in quantitative finance. This lesson explains these concepts and how to identify and work with independent and dependent events.
What is Independence?#
Two events and are independent if the occurrence of one does not affect the probability of the other. Learn more: Independence (Probability Theory)
Mathematical Definition:
Events and are independent if and only if:
Intuitive Meaning: Knowing that occurred doesn’t change the probability of occurring, and vice versa.
What is Dependence?#
Two events and are dependent if they are not independent. The occurrence of one affects the probability of the other.
Mathematical Definition:
Events and are dependent if:
Examples of Independence#
Example 1: Coin Tosses#
Two fair coin tosses are independent:
- = “First toss is heads”:
- = “Second toss is heads”:
- ✓
Interpretation: The outcome of the first toss doesn’t affect the second toss.
Example 2: Die Rolls#
Two fair die rolls are independent:
- = “First die shows 6”:
- = “Second die shows 6”:
- ✓
Example 3: Independent Stock Returns#
If two stocks have independent returns:
- = “Stock 1 goes up”:
- = “Stock 2 goes up”:
- (if independent)
Examples of Dependence#
Example 1: Drawing Cards Without Replacement#
Drawing two cards from a deck without replacement:
- = “First card is an ace”:
- = “Second card is an ace”: (before first draw)
- But (after drawing first ace)
- ✗
Interpretation: Drawing the first ace changes the probability of drawing a second ace.
Example 2: Market Conditions#
Market conditions can create dependence:
- = “Stock A goes up”:
- = “Stock B goes up”:
- If stocks are in the same sector: ✗
Interpretation: When stocks are correlated, they tend to move together.
Example 3: Portfolio Risk#
- = “Asset 1 defaults”:
- = “Asset 2 defaults”:
- If assets are correlated: ✗
Interpretation: Correlated defaults increase the probability of joint defaults.
Conditional Probability and Independence#
Conditional Probability is the probability of event given that event has occurred:
Learn more: Conditional Probability
Key Relationship: Events and are independent if and only if:
Interpretation: If and are independent, knowing occurred doesn’t change the probability of .
Example#
Independent Events:
- = “First coin is heads”:
- = “Second coin is heads”:
- ✓
Dependent Events (Cards):
- = “First card is ace”:
- = “Second card is ace”
- ✗
Independence of Multiple Events#
For three events , , and to be mutually independent, we need:
-
Pairwise Independence:
-
Triple Independence:
Important: Pairwise independence does not imply mutual independence!
Example: Pairwise Independent but Not Mutually Independent#
Consider a fair die with:
- = :
- = :
- = :
Check pairwise:
- ✓
- ✓
- ✗
So they’re not even pairwise independent, but this illustrates the concept.
Financial Applications#
Portfolio Diversification#
Independent Assets:
- If assets are independent, portfolio risk can be reduced through diversification
Dependent Assets:
- Correlated assets increase portfolio risk
Market Regimes#
Example: Market conditions create dependence
- = “Bull market”:
- = “High volatility”:
- If independent:
- In reality: (dependent - bull markets often have low volatility)
Trading Signals#
Example: Independent trading signals
- Signal 1 accuracy:
- Signal 2 accuracy:
- If independent:
- If dependent: (signals may be correlated)
Python Implementation#
def are_independent(p_a, p_b, p_intersection, tolerance=1e-6):
"""
Check if events A and B are independent
Parameters:
p_a: P(A)
p_b: P(B)
p_intersection: P(A ∩ B)
tolerance: Numerical tolerance for comparison
Returns:
True if independent, False otherwise
"""
expected = p_a * p_b
return abs(p_intersection - expected) < tolerance
def conditional_probability(p_intersection, p_given):
"""
Calculate conditional probability P(B | A) = P(A ∩ B) / P(A)
"""
if p_given == 0:
return None # Cannot condition on impossible event
return p_intersection / p_given
# Example 1: Independent coin tosses
p_first_heads = 0.5
p_second_heads = 0.5
p_both_heads = 0.25
print(f"Are coin tosses independent? {are_independent(p_first_heads, p_second_heads, p_both_heads)}")
# Example 2: Dependent events (cards)
p_first_ace = 4/52
p_second_ace_given_first = 3/51
p_both_aces = p_first_ace * p_second_ace_given_first
p_second_ace_unconditional = 4/52
print(f"\nCard example:")
print(f"P(second ace | first ace) = {p_second_ace_given_first:.4f}")
print(f"P(second ace) = {p_second_ace_unconditional:.4f}")
print(f"Are dependent? {not are_independent(p_first_ace, p_second_ace_unconditional, p_both_aces)}")
# Example 3: Financial correlation
p_stock1_up = 0.6
p_stock2_up = 0.5
p_both_up_independent = 0.6 * 0.5 # If independent
p_both_up_correlated = 0.4 # Actual (correlated)
print(f"\nStock example:")
print(f"If independent: P(both up) = {p_both_up_independent:.2f}")
print(f"Actual (correlated): P(both up) = {p_both_up_correlated:.2f}")
print(f"Are independent? {are_independent(p_stock1_up, p_stock2_up, p_both_up_correlated)}")
Common Mistakes#
-
Assuming independence without verification
- In finance, events are often dependent (correlated)
- Always check: ?
-
Confusing independence with mutually exclusive
- Independent: (can both occur)
- Mutually Exclusive: (cannot both occur)
- These are different concepts!
-
Assuming pairwise independence implies mutual independence
- Need to check all combinations for multiple events
Key Takeaways#
- Independence: or equivalently
- Dependence: Events affect each other’s probabilities
- Conditional Probability:
- Financial Context: Assets and events are often dependent (correlated)
- Mutual Independence: Requires both pairwise and joint independence
Next Steps#
In the next chapter, we’ll explore conditional probability in more depth, including Bayes’ Theorem and the Law of Total Probability, which are essential tools for updating probabilities and making decisions under uncertainty.