Solution 1. Here the rows of \(X\) are \((1, -1)\) for the three patients in the group coded \(-1\) and \((1, 1)\) for the three treated patients, and \(\mathord{\smash[b]{\underset{\raise.3ex\hbox{$\scriptstyle\sim$}}{y}}\vphantom{y}}= {(0, 0, 1, 0, 1, 1)}^{\top}\).
1. At \(\mathord{\smash[b]{\underset{\raise.3ex\hbox{$\scriptstyle\sim$}}{\beta}}\vphantom{\beta}}^* = \mathord{\smash[b]{\underset{\raise.3ex\hbox{$\scriptstyle\sim$}}{0}}\vphantom{0}}\) every fitted probability is \({\operatorname{expit}\mathopen{}\left(0\right)\mathclose{}} = 1/2\), so every weight is \(w_{i} = (1/2)(1/2) = 1/4\). The working responses are \(z_{i} = 0 + \mathopen{}\left(y_{i} - 1/2\right)\mathclose{} / (1/4) = 4 y_{i} - 2\):
\[
\mathord{\smash[b]{\underset{\raise.3ex\hbox{$\scriptstyle\sim$}}{z}}\vphantom{z}} = {(-2, -2, 2, -2, 2, 2)}^{\top}.
\]
2. With \(W = \tfrac{1}{4} \mathbf{I}_6\),
\[
{X}^{\top} W X
= \tfrac{1}{4}
\begin{bmatrix} 6 & 0 \\ 0 & 6 \end{bmatrix}
= \begin{bmatrix} 3/2 & 0 \\ 0 & 3/2 \end{bmatrix},
\]
because the entries of the first column of \(X\) sum to \(6\), the squares in the second column sum to \(6\), and the two columns multiply to a sum of \(-3 + 3 = 0\). The first entry of \({X}^{\top} W \mathord{\smash[b]{\underset{\raise.3ex\hbox{$\scriptstyle\sim$}}{z}}\vphantom{z}}\) is \(\tfrac{1}{4}(-2 - 2 + 2 - 2 + 2 + 2) = 0\), and the second is \(\tfrac{1}{4}\mathopen{}\left((-1)(-2 - 2 + 2) + (1)(-2 + 2 + 2)\right)\mathclose{} = \tfrac{1}{4}(2 + 2) = 1\), so \({X}^{\top} W \mathord{\smash[b]{\underset{\raise.3ex\hbox{$\scriptstyle\sim$}}{z}}\vphantom{z}} = {(0, 1)}^{\top}\).
3. The updated coefficients are
\[
\begin{bmatrix} 2/3 & 0 \\ 0 & 2/3 \end{bmatrix}
\begin{bmatrix} 0 \\ 1 \end{bmatrix}
= \begin{bmatrix} 0 \\ 2/3 \end{bmatrix}.
\]
The intercept stays at \(0\) and the slope moves from \(0\) to \(2/3\).