Moved statistics computation function.