extract average into Statistics lib