minor memory usage reduction (update weighted-z numerator and squared denominator in-place, instead of saving all values)