Premium problem114. Majority Vote With Different Accuracies

Hard Locked

Independent classifiers have individual accuracies probs. Return the accuracy of their majority vote.

The counts are no longer binomial because the models differ, so build the distribution of "number correct" one model at a time: with each model added, a given count either stays or advances by one. Then sum the mass strictly above half.

Input

[0.6, 0.6, 0.6]

Output

0.6479999999999999

Premium problem

This one's part of Premium. Unlock the full Probability track plus every other premium problem on the site.

Implement solve(...)