Refactor statistical functions from the BaseObjectExtensions into Statistics