expectation calculation