Aggregate Probability Computation via Event Partitioning - Coding problem | OneNoughtOne