19. Conditional Probability Formula

Easy

From probabilities rather than counts:

P(AB)=P(AB)P(B),P(B)>0P(A \mid B) = \frac{P(A \cap B)}{P(B)}, \qquad P(B) > 0

Return P(AB)P(A \mid B).

solve(1/3, 0.5)  ->  0.6666666666666666

Sign in to write and run your own code.

Implement solve(...)