Premium problem55. Expected Value of Dice Bets

Medium Locked

events is a list of probabilities, one per available bet, and payouts is the matching profit if that bet wins. Each bet costs 1 unit to place. Return the list of expected profits, one per bet.

E=p⋅payout−(1−p)⋅1E = p \cdot \text{payout} - (1 - p) \cdot 1

A positive number means the bet is worth taking; a house edge shows up as every entry being negative.

Input

events = [0.16666666666666666, 0.5, 0.027777777777777776]
payouts = [5.0, 1.0, 35.0]

Output

[-1.1102230246251565e-16, 0.0, 0.0]

Premium problem

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

Implement solve(...)