# Typo in Wasserman explanation of Reweighted Least Squares?

My test (All of Statistics, second edition, Wasserman) contains the following:

Reweighted Least Squares Algorithm (for Logistic Regression)

1. Choose starting values $$\hat{\beta}^0 = (\hat{\beta}_0^0, \ldots, \hat{\beta}_k^0)$$, and compute $$p_i^0$$ using the logistic regression model.

2. Set

$$Z_i = \operatorname{logit}(p_i^s) + \frac{Y_i - p_i^s}{p_i^s(1-p_i^s)}$$

1. Let $$W$$ be a diagonal matrix with $$(i,i)$$ element equal to $$p_i^s(1-p_i^s)$$.

2. Set:

$$\hat{\beta}^s = (X^TWX)^{-1}X^TWY$$

This corresponds to doing a weighted linear regression of $$Z$$ on $$Y$$.

1. Set $$s = s + 1$$ and go back to step 1.

What is curious about this is $$Z_i$$ is defined but then never used. Am I correct in thinking the formula for the coefficients is supposed to instead be:

$$\hat{\beta}^s = (X^TWX)^{-1}X^TWZ$$

and that it should read, "This corresponds to doing a weighted linear regression of $$X$$ on $$Z$$." ? The fact that $$Z$$ is defined with only one index makes me think it's supposed to be a transformed version of $$Y$$ rather than $$X$$.