Refactoring of expectation.
Adding utilities for variance and autocorrelation.