expectedValueI function

Calculates the expected value for local I