Implement mean calculator.