Calculate expectation for games of chance (#761)