reduce_xs_avg works as expected (see matlab graphs)