Math and algorithms will give precise answers. And therein lies the problem.
Take the probability of loss times the amount of possible loss from the probability of gain times the amount of possible gain.
Prices in the stock market are never a reliable guide to the fair value of a stock.
It is all very good to recommend caution, but decisions must be made. In truth, many policies must be established and decisions made with imperfect understanding of the facts and of the risks.