isn't this just `(resid**2).sum()`    
instead of the nobs_i, nobs_i outer product