Premium problem24. Classify the Relationship

Medium Locked

Mutually exclusive is NOT the same as independent. If two non-impossible events cannot co-occur, then one happening makes the other impossible, so they are strongly dependent.

Return one of these strings, checked in this order:

  1. "mutually exclusive" when A∩B=∅A \cap B = \varnothing
  2. "independent" when P(A∩B)=P(A)P(B)P(A \cap B) = P(A)P(B)
  3. "dependent" otherwise

Input

a = {1, 3, 5}
b = {2, 4, 6}
sample_space = {1, 2, 3, 4, 5, 6}

Output

'mutually exclusive'

Premium problem

This one's part of Premium. Unlock the full Probability track plus every other premium problem on the site.

Implement solve(...)