Skip to content
DeepForgeby svx
All problems
EasyProbabilitypr-338

No Event Occurs Probability

Problem

For independent events with probabilities p_i, the probability that none occurs is prod_i (1 - p_i).

Given the probability list, return P(none).

Hint

Independence turns the intersection into a product.

Test cases

case 1
in: [[0.1,0.2]]
expected: 0.7200000000000001
case 2
in: [[0.5,0.5]]
expected: 0.25
case 3
in: [[0,0.9]]
expected: 0.09999999999999998
Starter codePython
def no_event_occurs_probability(probs):
    # Your code here
    pass

3 test cases · run your code against them in the editor