Compute the expected gain