The expected value of an act is the sum of the value of each of its possible outcomes multiplied by their probability of occurring.
Consider a person choosing between two medical interventions. The first intervention is a drug that succeeds in 60% of cases, and that gives an extra year of healthy life when it succeeds, and has no impact if it fails.
In the case of this drug, there are only two outcomes: success and failure. So the expected value is:
(1 year of life × 60%) + (0 years of life ×40%) = 0.6 expected years of life
Consider another drug that succeeds with a 40% probability, and gives two years of healthy life when it succeeds, but causes harm equal to half a year of healthy life lost when it fails.
Then the expected benefit of this intervention is:
(2 years of life × 40%)−(0.5 years of life × 60%) = 0.5 expected years of life
Over many cases, the first drug will likely provide more years of healthy life than the second. So if they cost the same, funding the first drug would add more healthy years of life on average....