Change sum to average in sequential test