Calculate The Expected Value Of A Random Variable