compute average in comparison column