avri function

Calculate average of variation