Test running average using stateful apply