Calculating expected value or calculating loss