You are viewing a single comment's thread. Return to all comments →
from itertools import product from fractions import Fraction P = list(product([1]*4+[0]*3, [1]*5+[0]*4, [1]*4+[0]*4)) N = sum(1 for x in P if sum(x)==2) print(Fraction(N, len(P)))
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: Compound Event Probability
You are viewing a single comment's thread. Return to all comments →