Chapter 12 Exercises

Casella & Berger, Statistical Inference (2nd ed.) §12.5

Solutions keyed to the textbook numbers and worked independently; for readers who have Chapter 11’s normal linear model

Notes

  • Textbook: George Casella & Roger L. Berger, Statistical Inference, Second Edition.
  • Scope: Chapter 12 §12.5 Exercises 12.1–12.31.
  • Pages: printed 487–492, PDF 518–523 (about PDF page = printed page + 31).
  • Policy: solutions are independent; Challenger MLE, Potoroo LS/LAD, and the orthogonal slope in Table 11.3.1 given in the text are recomputed.
  • Companion: ch12-notes.qmd. In §12.2.2 the text mislabels the orthogonal least-squares extremum problem as “Exercise 12.20”; it is this Exercise 12.2.

Exercise 12.1

NoteStem (abridged)

Verify the foot-of-the-perpendicular formula (12.2.7).

TipSolution

The line \(y=a+bx\) has direction vector \((1,b)\) and normal \((-b,1)\). The foot \((\hat x,\hat y)\) lies on the line, and \((x'-\hat x,y'-\hat y)\parallel(-b,1)\). Hence \(\hat y=a+b\hat x\), and there is a \(t\) with

\[ x'-\hat x=-bt,\qquad y'-(a+b\hat x)=t. \]

The first equation gives \(\hat x=x'+bt\). Substitute into the second: \(y'-a-b x'-b^2 t=t\), so \(t=(y'-a-bx')/(1+b^2)\). Thus

\[ \hat x=\frac{x'+b(y'-a)}{1+b^2}=\frac{by'+x'-ab}{1+b^2}, \]

and \(\hat y=a+b\hat x\) is (12.2.7). (Pythagoras: \(\text{orthogonal distance}^2=\text{vertical distance}^2/(1+b^2)\), matching (12.2.8).)

Exercise 12.2

NoteStem (abridged)

Extrema of \(f(b)=(S_{yy}-2b S_{xy}+b^2 S_{xx})/(1+b^2)\); prove that the “\(+\)” root is the minimum.

TipSolution

\(f'(b)=0\) when the numerator \((-2S_{xy}+2b S_{xx})(1+b^2)-2b(S_{yy}-2b S_{xy}+b^2 S_{xx})=0\), which rearranges to

\[ S_{xy}\,b^2+(S_{xx}-S_{yy})b-S_{xy}=0. \]

The roots are \(b=\bigl[-(S_{xx}-S_{yy})\pm\sqrt{(S_{xx}-S_{yy})^2+4S_{xy}^2}\bigr]/(2S_{xy})\).

As \(b\to\pm\infty\), \(f(b)\to S_{xx}\). The two roots have opposite signs (if \(S_{xy}\neq 0\)) and product \(-1\). The smaller \(f\) is the orthogonal regression; the “\(+\)” root has the same sign as \(S_{xy}\), lies between the two ordinary regressions, and is the minimum (the “\(-\)” root is the maximum, geometrically the other principal axis of distances to the line).

Exercise 12.3

NoteStem (abridged)

The functional-likelihood minimizer in \(\xi_i\); verify that \(D_\lambda\) is a metric.

TipSolution

(a) For each \(i\), \(q(\xi)=(x_i-\xi)^2+\lambda(y_i-\alpha-\beta\xi)^2\). \(q'(\xi)=-2(x_i-\xi)-2\lambda\beta(y_i-\alpha-\beta\xi)=0\) gives \(\xi_i^*=\bigl(x_i+\lambda\beta(y_i-\alpha)\bigr)/(1+\lambda\beta^2)\). \(q''>0\), so this is a minimum.

(b) \(D_\lambda((x,y),(\xi,\alpha+\beta\xi))=(x-\xi)^2+\lambda(y-\alpha-\beta\xi)^2\). (i) Zero when \(A=A\). (ii) For \(\lambda>0\), a nonzero pair gives a positive value. (iii) Symmetry is immediate. (iv) This is the Euclidean distance on \(\mathbb{R}^2\) induced by the inner product \(\langle(u,v),(u',v')\rangle=uu'+\lambda vv'\), hence satisfies the triangle inequality.

Exercise 12.4

NoteStem (abridged)

Limits, monotonicity, and sandwiching of \(\hat\beta(\lambda)\); brain-weight–body-weight data.

TipSolution

Write \(\Delta=S_{xx}-\lambda S_{yy}\), \(D=\sqrt{\Delta^2+4\lambda S_{xy}^2}\), \(\hat\beta(\lambda)=(-\Delta+D)/(2\lambda S_{xy})\) (\(\lambda>0\)).

(a) \(\lambda\to 0\): \(\Delta\sim S_{xx}\), \(D=S_{xx}\sqrt{1+O(\lambda)}=S_{xx}+2\lambda S_{xy}^2/S_{xx}+O(\lambda^2)\), so \(-\Delta+D\sim 2\lambda S_{xy}^2/S_{xx}\) and \(\hat\beta\to S_{xy}/S_{xx}\).

(b) \(\lambda\to\infty\): divide numerator and denominator by \(\lambda\), or use symmetry (swap \(x,y\) and invert) to get \(S_{yy}/S_{xy}\).

(c) Differentiating in \(\lambda\) (or inspecting the sign of \(\partial/\partial\lambda\)): \(\mathrm{sign}(\hat\beta'(\lambda))=\mathrm{sign}(S_{xy})\). Thus \(\hat\beta\) increases with \(\lambda\) when \(S_{xy}>0\) and decreases when \(S_{xy}<0\).

(d) From (a)(b)(c), the value at \(\lambda=1\) lies between the endpoints \(S_{xy}/S_{xx}\) and \(S_{yy}/S_{xy}\).

(e) \(n=8\), \(\bar x=1.1005\), \(\bar y=12.075\), \(S_{xx}=9.095\), \(S_{yy}=1358.26\), \(S_{xy}=96.150\).

\[ \hat\beta_{y\mid x}=10.571,\qquad \hat\beta_{x\mid y}^{-1}=14.126. \]

The problem does not specify \(\lambda\). Taking \(\lambda=1\) (orthogonal / equal-error): \(\hat\beta=14.103\), which does lie in \((10.571,14.126)\), and \(\hat\alpha=-3.445\). (If the error-variance ratio of brain weight to body weight is not \(1\), the numerical value slides along that interval.)

Exercise 12.5

NoteStem (abridged)

Derive \(\hat\sigma_\delta^2\) (12.2.18) in the functional model.

TipSolution

After maximizing in \((\alpha,\beta,\xi)\), the likelihood as a function of \(\sigma_\delta^2\) has the form \((\sigma_\delta^2)^{-n}\exp\bigl(-A/(2\sigma_\delta^2)\bigr)\), where \(A=\frac{\lambda}{1+\lambda\hat\beta^2}\sum(y_i-\hat\alpha-\hat\beta x_i)^2\). The log derivative \(-n/\sigma_\delta^2+A/(2(\sigma_\delta^2)^2)=0\) gives \(\hat\sigma_\delta^2=A/(2n)\), which is (12.2.18).

Exercise 12.6

NoteStem (abridged)

Integrate out the \(\xi_i\) to obtain (12.2.19).

TipSolution

Given \(\xi_i\), \(X_i\sim n(\xi_i,\sigma_\delta^2)\) and \(Y_i\sim n(\alpha+\beta\xi_i,\sigma_\varepsilon^2)\) independently, with \(\xi_i\sim n(\xi,\sigma_\xi^2)\). \(EX_i=\xi\), \(EY_i=\alpha+\beta\xi\). \(\mathrm{Var}\,X_i=\sigma_\delta^2+\sigma_\xi^2\), \(\mathrm{Var}\,Y_i=\sigma_\varepsilon^2+\beta^2\sigma_\xi^2\), \(\mathrm{Cov}(X_i,Y_i)=\beta\sigma_\xi^2\). A normal mixture of normals is still normal, which is (12.2.19).

Exercise 12.7

NoteStem (abridged)

The function obtained after integrating out \(\xi_i\) under the improper prior \(\mathrm{uniform}(-\infty,\infty)\); why it cannot be read as ordinary regression.

TipSolution

(a) Completing the square in \(\xi\) in the exponent: the quadratic coefficient is \(1/(2\sigma_\delta^2)+\lambda\beta^2/(2\sigma_\delta^2)\) (cleaner when \(\sigma_\varepsilon^2=\sigma_\delta^2/\lambda\); in general \(1/(2\sigma_\delta^2)+\beta^2/(2\sigma_\varepsilon^2)\)). The Gaussian integral yields the right-hand side of the problem — a normal kernel in \(y-\alpha-\beta x\) with variance \(\beta^2\sigma_\delta^2+\sigma_\varepsilon^2\).

(b) The integral of the integrand over \(\xi\) diverges (Lebesgue measure is infinite), so strictly speaking this is not a marginal density. As a function of \((x,y)\), the right-hand side also diverges when integrated in \(x\), and cannot be treated as the conditional density of \(Y\mid X\). The conditional law of ordinary regression comes from a proper joint law of \((X,Y)\) (e.g. the structural model, or fixed design \(x\)), not from this improper integral.

Exercise 12.8

NoteStem (abridged)

Nonidentifiability of the structural EIV model: two parameter vectors, two solutions of (12.2.20).

TipSolution

(a) The margin is determined by the five quantities \((\xi,\alpha+\beta\xi,\sigma_\delta^2+\sigma_\xi^2,\sigma_\varepsilon^2+\beta^2\sigma_\xi^2,\beta\sigma_\xi^2)\). Take \((\alpha,\beta,\xi,\sigma_\varepsilon^2,\sigma_\delta^2,\sigma_\xi^2)=(0,1,0,1,1,1)\) (\((\mathrm{Var}\,X,\mathrm{Var}\,Y,\mathrm{Cov})=(2,2,1)\)) and \((0,1.5,0,1/2,4/3,2/3)\) (same five moments: \(\mathrm{Var}\,X=4/3+2/3=2\), \(\mathrm{Var}\,Y=1/2+(9/4)(2/3)=2\), \(\mathrm{Cov}=(3/2)(2/3)=1\)). The pair \((0,2,0,1-3c,1+c,c)\) at \(c=1/4\) does not match.

(b) (12.2.20) is five equations in six unknowns. Fixing different \(\hat\beta\) can still yield a set of nonnegative variances (provided they lie within the bounds of Exercise 12.9), e.g. \(\hat\beta=S_{xy}/S_{xx}\) with \(\hat\sigma_\delta^2=0\), or \(\hat\beta=S_{yy}/S_{xy}\) with \(\hat\sigma_\varepsilon^2=0\).

Exercise 12.9

NoteStem (abridged)

Deduce \(|S_{xy}|/S_{xx}\le|\hat\beta|\le S_{yy}/|S_{xy}|\) from (12.2.20).

TipSolution

(a) \(\hat\sigma_\delta^2=S_{xx}/n-\hat\sigma_\xi^2\ge 0\) and \(\hat\sigma_\xi^2=S_{xy}/(n\hat\beta)\), so \(S_{xx}\ge S_{xy}/\hat\beta\) (when \(\hat\beta\) and \(S_{xy}\) have the same sign). Likewise \(S_{yy}\ge\hat\beta S_{xy}\).

(b) Combining the two (and taking absolute values to handle signs) gives the stated bounds. This is the same sandwich as in the functional case of Exercise 12.4.

Exercise 12.10

NoteStem (abridged)

Structural MLE; compute it for the 12.4 data; functional / structural variance estimates differ by a factor of \(2\).

TipSolution

(a) Substitute \(\sigma_\delta^2=\lambda\sigma_\varepsilon^2\) into (12.2.20); after eliminating \(\sigma_\xi^2\) the equation in \(\beta\) is the same as (12.2.16). Back-substitution gives (12.2.21).

(b) Continuing 12.4, \(\lambda=1\), \(\hat\beta=14.103\), \(\hat\alpha=-3.445\), \(n=8\).

\[ \hat\sigma_\delta^2=\hat\sigma_\varepsilon^2=0.285,\qquad \hat\sigma_\xi^2=0.852. \]

(\(\hat\sigma_\delta^2/\hat\sigma_\varepsilon^2=1\), consistent with the assumption.)

(c)(d) From (12.2.16) and the orthogonality algebra, \(S_{xx}-S_{xy}/\hat\beta=\lambda(S_{yy}-\hat\beta S_{xy})\), and the right-hand side equals \(\frac{\lambda}{1+\lambda\hat\beta^2}\sum(y_i-\hat\alpha-\hat\beta x_i)^2\). The structural model uses \(1/n\), the functional (12.2.18) uses \(1/(2n)\), so \(\widehat{\mathrm{Var}}X_i(\text{structural})=2\,\widehat{\mathrm{Var}}X_i(\text{functional})\).

Exercise 12.11

NoteStem (abridged)

Bilinear covariance; orthogonality and exact coverage of Creasy–Williams.

TipSolution

(a) The bilinear expansion is \(ac\,\mathrm{Var}Y+(ad+bc)\mathrm{Cov}(X,Y)+bd\,\mathrm{Var}X\).

(b) Under the structural margin, \(\mathrm{Var}X=\sigma_\delta^2+\sigma_\xi^2\), \(\mathrm{Var}Y=\sigma_\varepsilon^2+\beta^2\sigma_\xi^2\), \(\mathrm{Cov}=\beta\sigma_\xi^2\), and \(\sigma_\delta^2=\lambda\sigma_\varepsilon^2\). Substitute \(a=\beta\lambda\), \(b=1\), \(c=1\), \(d=-\beta\):

\[ \beta\lambda(\sigma_\varepsilon^2+\beta^2\sigma_\xi^2)+(1-\beta^2\lambda)\beta\sigma_\xi^2-\beta(\sigma_\delta^2+\sigma_\xi^2)=0. \]

(c) At the true \(\beta\), \((\beta\lambda Y+X,\ Y-\beta X)\) is bivariate normal and uncorrelated, hence independent. The usual \(t\) transform of the sample correlation (Exercise 11.33) gives \(t_{n-2}\), or \(F_{1,n-2}\) after squaring. The pivot contains no unknown parameters, so coverage is identically \(1-\alpha\).

Exercise 12.12

NoteStem (abridged)

\(\hat\beta\) and \(-1/(\lambda\hat\beta)\) are the two roots of the likelihood derivative; antisymmetry of \(r_\lambda\); the confidence set admits both.

TipSolution

(a) The zeros of the numerator of the \(\beta\)-derivative of (12.2.14) satisfy a quadratic of the same type as Exercise 12.2, and the product of the roots is \(-1/\lambda\). The MLE is the root with the same sign as \(S_{xy}\); the other is \(-1/(\lambda\hat\beta)\).

(b) Replacing \(\beta\) by \(-1/(\lambda\beta)\) flips the sign of the numerator of (12.2.23) and swaps the two denominator terms, so \(r_\lambda\) changes sign.

(c) \(r_\lambda^2\) is the same, so membership in (12.2.24) holds for both at once.

Exercise 12.13

NoteStem (abridged)

Algebraic connection between the Gleser interval and Creasy–Williams.

TipSolution

(a) Squaring (12.2.22) gives \((\beta-\hat\beta)^2\le F_{1,n-2,\alpha}\cdot\hat\sigma_\beta^2/(n-2)\).

(b) Using that \(\hat\beta\) and \(-1/(\lambda\hat\beta)\) are the roots of the numerator of \(r_\lambda\), factor

\[ \frac{r_\lambda^2(\beta)}{1-r_\lambda^2(\beta)} =\frac{\lambda^2 S_{xy}^2(\beta-\hat\beta)^2\bigl(\beta+1/(\lambda\hat\beta)\bigr)^2}{(1+\lambda\beta^2)^2(S_{xx}S_{yy}-S_{xy}^2)}. \]

Compared with the definition of \(\hat\sigma_\beta^2\), an extra factor \((1+\lambda\beta\hat\beta)^2/(1+\lambda\beta^2)^2\) appears. Near \(\beta=\hat\beta\) this factor is \(1\); as \(\hat\beta\to_p\beta\) it \(\to_p 1\). Replacing it by \(1\) yields \(C_G\).

Exercise 12.14

NoteStem (abridged)

Sketch the three logistic curves for \(\alpha=\beta=1,2,3\).

TipSolution

\(\pi(x)=e^{c+cx}/(1+e^{c+cx})\), \(c=1,2,3\). All three pass through \(1/2\) at \(x=-1\) and are centrally symmetric about \((-1,1/2)\). Larger \(c\) makes the curve steeper near \(-1\), rising from \(0\) to \(1\) more quickly. \(c=1\) is the gentlest; \(c=3\) is nearly a step.

Exercise 12.15

NoteStem (abridged)

Verify the logistic symmetries, derivative, odds ratio, score equations, and canonical simplification.

TipSolution

(a) \(\alpha+\beta(-\alpha/\beta)=0\), \(\pi=e^0/(1+e^0)=1/2\).

(b) \(\alpha+\beta(-\alpha/\beta+c)=\beta c\), and the other side \(=-\beta c\), while \(e^{u}/(1+e^{u})+e^{-u}/(1+e^{-u})=1\).

(c) \(\pi=e^\eta/(1+e^\eta)\), \(\eta=\alpha+\beta x\), \(\mathrm{d}\pi/\mathrm{d}\eta=\pi(1-\pi)\), so \(\pi'=\beta\pi(1-\pi)\).

(d)(e) \(\mathrm{logit}\,\pi(x+1)-\mathrm{logit}\,\pi(x)=\beta\), and the exponential \(e^\beta\) is the odds ratio, i.e. the multiplicative factor for the odds.

(f) From \(\partial\log(1-F)/\partial\alpha=-f/(1-F)\) and \(\partial\mathrm{logit}F/\partial\alpha=f/(F(1-F))\), combining the coefficient of \(y\) yields (12.3.6)–(12.3.8). For \(\beta\), multiply by \(x_i\) as well.

(g) Logistic: \(f=\pi(1-\pi)=F(1-F)\), so \(f/(F(1-F))=1\).

Exercise 12.16

NoteStem (abridged)

\(x=0\) ten times all successes, \(x=1\) ten times five successes: the logistic regression MLE does not exist.

TipSolution

(a) Two-point Bernoulli / binomial; the unrestricted MLE is the frequency: \(\hat\pi(0)=1\), \(\hat\pi(1)=1/2\).

(b) The log-likelihood is finite at the unrestricted maximum, but logistic regression requires \(0<\pi(x)<1\) for every finite \((\alpha,\beta)\). To have \(\pi(0)\to 1\) and \(\pi(1)=1/2\) one needs \(\alpha\to+\infty\) and \(\alpha+\beta\to 0\), i.e. \(\beta=-\alpha\to-\infty\). Along this ray the likelihood approaches the unrestricted maximum, and any finite \((\alpha,\beta)\) is strictly smaller. The MLE does not exist.

Exercise 12.17

NoteStem (abridged)

Probit: likelihood and MLE; fit Challenger and compare with logistic regression.

TipSolution

(a) \(\pi_i=\Phi(\alpha+\beta x_i)\), \(L=\prod\Phi(\eta_i)^{y_i}[1-\Phi(\eta_i)]^{1-y_i}\). The score is (12.3.7)–(12.3.8) with \(f=\phi\), \(F=\Phi\). Solve by Newton–Raphson / IRLS.

(b) Challenger, \(23\) points: \(\hat\alpha_{\mathrm{probit}}=9.205\), \(\hat\beta_{\mathrm{probit}}=-0.141\). Both give a strictly decreasing failure probability. At \(31^\circ\mathrm{F}\), probit has \(\hat\pi\approx 1\) (more extreme than the logistic \(0.9997\)), because the normal tail is lighter than the logistic. Slope magnitudes are not comparable (different link scales); the sign and qualitative conclusion agree.

Exercise 12.18

NoteStem (abridged)

Quadratic logistic regression: scores, LRT of \(H_0:\gamma=0\); sparrowhawk data.

TipSolution

(a) \(\mathrm{logit}\,\pi_i=\alpha+\beta x_i+\gamma x_i^2\). The score adds \(\sum(y_j^*-n_j F_j)x_j^2=0\) to (12.3.7)–(12.3.8) (logistic canonical). Solve by three-dimensional Newton.

(b) \(-2\log\lambda=2\bigl[\ell(\hat\alpha,\hat\beta,\hat\gamma)-\ell(\hat\alpha_L,\hat\beta_L,0)\bigr]\), approximately \(\chi^2_1\) under \(H_0\). Reject when it exceeds \(\chi^2_{1,\alpha}\).

(c)(d) Ages \(1\)–\(9\), survivals \(35/77,\ldots,1/4\). Linear fit \(\hat\alpha=0.480\), \(\hat\beta=0.0074\), nearly flat; LRT for \(\beta=0\) is only \(0.026\) (\(p\approx 0.87\)). Quadratic: \(\hat\alpha=-0.845\), \(\hat\beta=0.837\), \(\hat\gamma=-0.103\). LRT for \(\gamma=0\) is \(23.36\) (\(p\approx 1.3\times 10^{-6}\)). Adopt the quadratic: survival first rises then falls, declining in the oldest groups.

Exercise 12.19

NoteStem (abridged)

Sufficient statistics for logistic regression; verify the information matrix (12.3.10).

TipSolution

(a) \(\log L=\sum_j\bigl[y_j^*(\alpha+\beta x_j)-n_j\log(1+e^{\alpha+\beta x_j})\bigr]\), exponential family with natural statistics \((\sum y_j^*,\sum y_j^* x_j)\).

(b) Differentiate the score again: \(\partial F_j/\partial\alpha=F_j(1-F_j)\) etc.; the expected negative Hessian is (12.3.10). Because the weights do not involve \(Y\), observed information equals expected information.

Exercise 12.20

NoteStem (abridged)

MLE when \(\beta=0\); the LRT remains defined when all \(0\)s or all \(1\)s occur.

TipSolution

(a) If \(\beta=0\) then \(\pi\) is constant. The binomial / Bernoulli MLE is \(\hat\pi=\sum y_i/n\), which lies in \((0,1)\) when \(0<\sum y_i<n\).

(b) \(\hat\alpha_0=\log\bigl(\hat\pi/(1-\hat\pi)\bigr)\).

(c) When \(\sum y_i=0\) or \(n\), \(\hat\pi\) is on the boundary and \(\hat\alpha_0\) is \(\pm\infty\), but \(\ell(\hat\alpha_0,0)=0\) (the log-likelihood of all successes or all failures is \(0\) at \(\pi=0\) or \(1\); more precisely, \(n\) zeros contribute something \(\to 0\) as \(\pi\to 0\)). The unrestricted \(\ell(\hat\alpha,\hat\beta)\le 0\), so the difference is still defined. Under complete separation the unrestricted MLE may also be at infinity; write the LRT using the supremum of the likelihood.

Exercise 12.21

NoteStem (abridged)

Delta-method variance of the sample logit.

TipSolution

\(W=g(\hat\pi)\), \(g(\pi)=\log(\pi/(1-\pi))\), \(g'(\pi)=1/(\pi(1-\pi))\). \(\mathrm{Var}\,\hat\pi=\pi(1-\pi)/n\), so \(\mathrm{Var}\,W\approx [g'(\pi)]^2\mathrm{Var}\,\hat\pi=1/(n\pi(1-\pi))\). Plug in \(\hat\pi\) to get \(1/(n\hat\pi(1-\hat\pi))\).

Exercise 12.22

NoteStem (abridged)

Effect of a small contamination on the least squares intercept.

TipSolution

\(a=\sum c_i Y_i\), \(c_i=1/n-(x_i-\bar x)\bar x/S_{xx}\), \(\sum c_i^2=\sum x_i^2/(n S_{xx})\). When \(\mathrm{Var}\,\varepsilon_i=(1-\delta)\sigma^2+\delta\tau^2\), \(\mathrm{Var}\,a=[(1-\delta)\sigma^2+\delta\tau^2]\sum x_i^2/(n S_{xx})\), so as for the slope only the scale is replaced by \((1-\delta)\sigma^2+\delta\tau^2\); small \(\delta\) remains controllable.

Exercise 12.23

NoteStem (abridged)

When the error mean is \(\mu\) with probability \(\delta\), the least squares slope stays unbiased and the intercept shifts by \(\delta\mu\).

TipSolution

\(E\varepsilon_i=\delta\mu\). \(b=\sum d_i Y_i\), \(\sum d_i=0\), so \(Eb=\beta+\delta\mu\sum d_i=\beta\). \(a=\bar Y-b\bar x\), \(E\bar Y=\alpha+\beta\bar x+\delta\mu\), so \(Ea=\alpha+\delta\mu\). The model may be rewritten \(Y_i=(\alpha+\delta\mu)+\beta x_i+\varepsilon_i^*\) with \(E\varepsilon_i^*=0\).

Exercise 12.24

NoteStem (abridged)

Through-the-origin LAD is a weighted median: order the \(t_i=y_i/x_i\) with weights \(|x_i|\).

TipSolution

\(\sum_i|y_i-\beta x_i|=\sum_i|x_i|\,|t_i-\beta|\). This is a weighted \(L^1\) problem for \(\beta\) with weights \(|x_i|\); the solution is a weighted median: there is a \(k^*\) such that

\[ \sum_{i=1}^{k^*}|x_{(i)}|\le\sum_{i=k^*+1}^n|x_{(i)}| \quad\text{and}\quad \sum_{i=1}^{k^*+1}|x_{(i)}|>\sum_{i=k^*+2}^n|x_{(i)}|, \]

and then \(\hat\beta=t_{(k^*+1)}\). (If a single point’s weight exactly balances the two sides, a whole interval is a solution.)

Exercise 12.25

NoteStem (abridged)

LAD is nonunique for three points (two sharing an \(x\)); heart-rate–oxygen-consumption data.

TipSolution

(a) The objective is \(\lvert y_1-(a+b x_1)\rvert+\lvert y_2-(a+b x_1)\rvert+\lvert y_3-(a+b x_3)\rvert\). For any line that zeros the third residual, the sum of the first two terms equals \(|y_1-y_2|\) (a constant), provided \(a+b x_1\) lies between \(y_1\) and \(y_2\). Any line through \((x_3,y_3)\) whose height at \(x_1\) lies between the two \(y\) values is an LAD fit.

(b) Points \((127,14.4)\), \((127,11.9)\), \((136,17.9)\). LS: \(S_{xx}=54\), \(S_{xy}=28.5\), \(\hat\beta=0.528\), \(\hat\alpha=-53.88\). LAD: through \((136,17.9)\), with \(y\in[11.9,14.4]\) at \(x=127\), so the slope

\[ b\in\Bigl[\frac{17.9-14.4}{9},\frac{17.9-11.9}{9}\Bigr]=[0.389,\ 0.667], \]

and the intercept \(a=17.9-136b\) slides over \([-72.8,-35.0]\).

Exercise 12.26

NoteStem (abridged)

Example 12.4.3, \(\frac1n\sum x_i^2\to\sigma_x^2\); the average score \(\to_p 0\).

TipSolution

(a) (i) If \(x_i=1\) then the average \(=1\). (ii) If \(|x_i|\le 1\) then the Cesàro average lies in \([0,1]\), so subsequence limits are finite; the problem assumes the limit exists, hence \(\sigma_x^2\le 1\).

(b) \(\frac1n\sum\psi(y_i-\hat\beta_L x_i)\) is the LAD score. As an \(L^1\) minimizer, \(\hat\beta_L\) makes this sum \(O(1/n)\) (or exactly \(0\) at differentiability points); after dividing by \(n\) it \(\to_p 0\). With ties the subgradient contains \(0\).

Exercise 12.27

NoteStem (abridged)

Verify the numerator CLT and denominator limit in Example 12.4.3.

TipSolution

(a) \(\psi(Y_i-\beta x_i)=x_i(2I(Y_i>\beta x_i)-1)\) (under a continuous law \(P(=)=0\)). Mean \(0\), variance \(x_i^2\). Lindeberg (bounded \(x\), or \(\frac1n\sum x_i^2\to\sigma_x^2\)) gives \(n^{-1/2}\sum\psi\to n(0,\sigma_x^2)\).

(b) \(E_\beta\psi(Y_i-\beta_0 x_i)=x_i\bigl(1-2F_\varepsilon((\beta_0-\beta)x_i)\bigr)\). Differentiating in \(\beta_0\) yields \(-2x_i^2 f((\beta_0-\beta)x_i)\); at \(\beta_0=\beta\) this is \(-2f(0)x_i^2\). The average \(\to -2f(0)\sigma_x^2\). Dividing (a) by this (watch the sign in (12.4.2)) gives \(\sqrt{n}(\hat\beta_L-\beta)\to n\bigl(0,1/(4f(0)^2\sigma_x^2)\bigr)\).

Exercise 12.28

NoteStem (abridged)

Through-the-origin least squares and its limiting law.

TipSolution

Minimizing \(\sum(y_i-\beta x_i)^2\) gives \(\hat\beta=\sum x_i Y_i/\sum x_i^2\). \(E\hat\beta=\beta\), \(\mathrm{Var}(\hat\beta\mid x)=\sigma^2/\sum x_i^2\). When \(\frac1n\sum x_i^2\to\sigma_x^2\), \(\sqrt{n}(\hat\beta-\beta)\to n(0,\sigma^2/\sigma_x^2)\); standardizing \(\varepsilon\) so that \(\sigma^2=1\) is the statement in the problem.

Exercise 12.29

NoteStem (abridged)

Deduce the limiting distribution of the iid sample median by the same Taylor argument.

TipSolution

\(x_i\equiv 1\), \(\beta\) is the median, \(\psi= \mathrm{sign}(Y_i-\theta)\), \(\sigma_x^2=1\). Then (12.4.5) becomes \(\sqrt{n}(\hat m-\theta)\to n\bigl(0,1/(4f(\theta)^2)\bigr)\), which is the median theorem of §10.2.

Exercise 12.30

NoteStem (abridged)

Parametric bootstrap standard errors for LAD and \(M\)-estimators on the Potoroo data; errors normal, double exponential, and logistic.

TipSolution

\(23\)-point least squares: \(\tilde\alpha=18.675\), \(\tilde\beta=-0.894\), \(\hat\sigma^2=\mathrm{RSS}/21=0.0551\), \(\hat\sigma=0.235\). Parametric bootstrap: draw residuals from \(n(0,\hat\sigma^2)\) (or DE / logistic scaled to the same variance), add back \(\tilde\alpha+\tilde\beta x_i\), and re-estimate. One realization with \(B=600\):

Error LAD \(\mathrm{se}(\tilde\alpha)\) LAD \(\mathrm{se}(\tilde\beta)\) \(M\) \(\mathrm{se}(\tilde\alpha)\) \(M\) \(\mathrm{se}(\tilde\beta)\)
Normal 1.27 0.069 0.99 0.054
Double exponential 0.90 0.049 0.88 0.048
Logistic 1.10 0.060 0.93 0.051

Under the normal, the \(M\)-estimator is clearly more stable than LAD (consistent with ARE \(1.39\)); under the heavy-tailed DE the two are close. Numbers have Monte Carlo error depending on \(B\) and the seed; the order of magnitude is stable. The analytic least squares \(\mathrm{se}(\hat\beta)=\hat\sigma/\sqrt{S_{xx}}=0.054\) is almost the same as the \(M\)-estimator under the normal.

Exercise 12.31

NoteStem (abridged)

Nonparametric bootstrap on the same data: resample the fitted residuals.

TipSolution

Residuals \(\hat\varepsilon_i=y_i-(\tilde\alpha+\tilde\beta x_i)\) are drawn with replacement and added back to the fitted means before re-estimation. \(B=600\):

\[ \text{LAD: }\mathrm{se}(\tilde\alpha)=0.84,\ \mathrm{se}(\tilde\beta)=0.046; \qquad M\text{: }\mathrm{se}(\tilde\alpha)=0.92,\ \mathrm{se}(\tilde\beta)=0.050. \]

The empirical residuals are slightly lighter-tailed (already least-squares fitted), so the nonparametric se for LAD is smaller than the normal parametric bootstrap. Residual bootstrap keeps the \(x\) design fixed, corresponding to conditional inference; resampling the pairs \((x_i,y_i)\) would add a further layer of \(x\) variation.