The probability of a union is not simply the sum, because the overlap would be counted twice:
Return P(A∪B)P(A \cup B)P(A∪B).
solve(0.5, 0.5, 1/3) -> 0.6666666666666667
Sign in to write and run your own code.
solve(...)