Menu Close

Linear models and least squares: UPSC Statistics Optional PYQ Solutions (1996–2026)

All 48 questions UPSC has asked on linear models and least squares in the Statistics Optional (Paper I, Linear Inference and Multivariate Analysis) from 1996 to 2026, solved step by step – latest first.

Try them yourself first: the same questions, without solutions, are on our Linear Inference and Multivariate Analysis topic-wise PYQs page.

How we check these solutions

These are our own solutions, prepared with AI help. UPSC does not publish official answers. Every solution is checked a second way before it goes up, and says how:

  • ✓ Checked by computer the numbers were worked out again independently in code (Python with NumPy/SciPy) and matched.
  • ✓ Proof checked step by step for “prove that” and “examine whether” questions, every step was checked against the definitions and the standard theorems.
  • ✓ Derivation checked step by step for derivations and approximations, every step was checked, and the result was also tested numerically.
  • ✓ Answer checked step by step for descriptive questions, every point was checked against the standard theory.

Spotted a mistake or a neater method? Tell us in the comments below or through Report an error.

Jump to a question (year · question number):

2026 · 5a 2026 · 5c 2026 · 6a 2025 · 5c 2025 · 6c 2024 · 5a 2023 · 6b(ii) 2022 · 5a 2022 · 8a 2020 · 5d 2020 · 6b 2019 · 5a 2019 · 5b 2018 · 5a 2018 · 8c 2017 · 5a 2017 · 6b 2017 · 7c 2016 · 5b 2016 · 6c 2015 · 5c 2015 · 6c 2014 · 5a 2014 · 8c 2013 · 5a 2013 · 5b 2012 · 5b 2012 · 5e 2011 · 5b 2007 · 6a 2007 · 6c 2006 · 4a 2005 · 6a 2004 · 5b 2004 · 6a 2003 · 5a 2001 · 5c 2000 · 5a 2000 · 5b 2000 · 6a 1999 · 9a 1999 · 9b 1998 · 9a 1998 · 10b 1997 · 9a 1997 · 9b 1996 · 9a 1996 · 9b

Cover of the UPSC Prelims Topic-wise PYQ book with detailed explanations

From the Optional Province team

Preparing for Prelims too?

Our UPSC Prelims Topic-wise PYQ Book covers every Prelims question with detailed explanations, so you can see exactly where UPSC asks from. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

Let Y1,Y2,⋯,Yn be n independent observations from a population with mean μ and variance σ2. Obtain the best linear unbiased estimator of μ and an unbiased quadratic estimator for σ2.

2026 · Paper I · Q5a · 10 marks

Solution

BLUE of μ\mu. Consider linear estimators T=∑aiYiT=\sum a_iY_i.

  • Unbiasedness: E(T)=μ∑ai=μE(T)=\mu\sum a_i=\mu for all μ\mu requires ∑ai=1\sum a_i=1.
  • Variance: V(T)=σ2∑ai2V(T)=\sigma^2\sum a_i^2.

Minimise ∑ai2\sum a_i^2 subject to ∑ai=1\sum a_i=1. With a Lagrange multiplier, ∂∂ai{∑ai2−2λ(∑ai−1)}=2ai−2λ=0\frac{\partial}{\partial a_i}\{\sum a_i^2-2\lambda(\sum a_i-1)\}=2a_i-2\lambda=0, so all aia_i are equal: ai=1/na_i=1/n. (Directly: ∑ai2=∑(ai−1n)2+1n≥1n\sum a_i^2=\sum(a_i-\frac1n)^2+\frac1n\ge\frac1n, with equality only when ai=1na_i=\frac1n.) Hence μ̂BLUE=Y‾=1n∑Yi,V(Y‾)=σ2n.\hat\mu_{\text{BLUE}}=\bar Y=\frac1n\sum Y_i,\qquad V(\bar Y)=\frac{\sigma^2}n .

Unbiased quadratic estimator of σ2\sigma^2. Consider Q=∑(Yi−Y‾)2=∑Yi2−nY‾2Q=\sum(Y_i-\bar Y)^2=\sum Y_i^2-n\bar Y^2. Using E(Yi2)=σ2+μ2E(Y_i^2)=\sigma^2+\mu^2 and E(Y‾2)=σ2n+μ2E(\bar Y^2)=\frac{\sigma^2}n+\mu^2: E(Q)=n(σ2+μ2)−n(σ2n+μ2)=(n−1)σ2.E(Q)=n(\sigma^2+\mu^2)-n\Big(\frac{\sigma^2}n+\mu^2\Big)=(n-1)\sigma^2 . So s2=1n−1∑i=1n(Yi−Y‾)2s^2=\frac1{n-1}\sum_{i=1}^n(Y_i-\bar Y)^2 is an unbiased quadratic estimator of σ2\sigma^2. In matrix form s2=1n−1Y′(I−1nJ)Ys^2=\frac{1}{n-1}Y'(I-\frac1nJ)Y, and E(Y′AY)=σ2trA+μ2𝟏′A𝟏=σ2(n−1)+0E(Y'AY)=\sigma^2\text{tr}A+\mu^2\mathbf 1'A\mathbf 1=\sigma^2(n-1)+0.

✓ Proof checked step by step Every step was checked: minimising Σaᵢ² subject to Σaᵢ = 1 gives aᵢ = 1/n, and E Σ(Yᵢ − Ȳ)² = (n − 1)σ².

↑ Back to the question list

Discussing Gauss-Markov linear model 𝐘n×1=Xn×p𝛃p×1+𝐮n×1 with E(𝐘)=X𝛃 and D(𝐘) = variance and covariance matrix of 𝐘=σ2I, show that E[𝐘′{I−X(X′X)−1X′}𝐘]=σ2(n−p)

2026 · Paper I · Q5c · 10 marks

Solution

Gauss–Markov linear model. Y=Xβ+uY=X\beta+u, where YY is an n×1n\times1 vector of observations, XX a known n×pn\times p matrix of rank pp, β\beta a p×1p\times1 vector of unknown parameters and uu a vector of errors with E(u)=0,D(u)=E(uu′)=σ2In.E(u)=0,\qquad D(u)=E(uu')=\sigma^2I_n . So E(Y)=XβE(Y)=X\beta and D(Y)=σ2ID(Y)=\sigma^2I: the observations are uncorrelated with a common variance. No distribution is assumed. The least squares estimator is β̂=(X′X)−1X′Y\hat\beta=(X'X)^{-1}X'Y, and the residual sum of squares is Y′(I−H)YY'(I-H)Y with H=X(X′X)−1X′H=X(X'X)^{-1}X'.

Result. Let M=I−HM=I-H.

  1. MM is symmetric, and M2=I−2H+H2=MM^2=I-2H+H^2=M since H2=X(X′X)−1X′X(X′X)−1X′=HH^2=X(X'X)^{-1}X'X(X'X)^{-1}X'=H.
  2. MX=X−X(X′X)−1X′X=0MX=X-X(X'X)^{-1}X'X=0.
  3. So MY=M(Xβ+u)=MuMY=M(X\beta+u)=Mu, and Y′MY=u′M′Mu=u′MuY'MY=u'M'Mu=u'Mu.
  4. E(u′Mu)=Etr(Muu′)=tr{ME(uu′)}=σ2tr(M)E(u'Mu)=E\,\text{tr}(Muu')=\text{tr}\{M\,E(uu')\}=\sigma^2\text{tr}(M).
  5. tr(M)=n−tr{X(X′X)−1X′}=n−tr{(X′X)−1X′X}=n−tr(Ip)=n−p\text{tr}(M)=n-\text{tr}\{X(X'X)^{-1}X'\}=n-\text{tr}\{(X'X)^{-1}X'X\}=n-\text{tr}(I_p)=n-p.

Hence E[Y′{I−X(X′X)−1X′}Y]=σ2(n−p).◼E\big[Y'\{I-X(X'X)^{-1}X'\}Y\big]=\sigma^2(n-p). \qquad\blacksquare So σ̂2=Y′(I−H)Y/(n−p)\hat\sigma^2=Y'(I-H)Y/(n-p) is an unbiased estimator of σ2\sigma^2.

✓ Proof checked step by step Every step was checked: (I − H) is symmetric and idempotent with (I − H)X = 0, and its trace is n − p.

↑ Back to the question list

Let 𝐥′𝛃 be any estimable linear function of parameters β1,β2,⋯,βp. Then prove that– (i) there exists a unique linear function 𝐜′𝐘 of random variables Y1,Y2,⋯,Yn such that 𝐜∈V(A′) and E(𝐜′𝐘)=𝐥′𝛃, where V(A′) is the vector space generated by row vectors of A′ and E(𝐘)=A𝛃; (ii) variance of 𝐜′𝐘 is less than the variance of any other linear unbiased estimator.

2026 · Paper I · Q6a · 20 marks

Solution

Set-up. E(Y)=AβE(Y)=A\beta, D(Y)=σ2ID(Y)=\sigma^2I, with AA of order n×pn\times p. V(A′)V(A'), the space spanned by the rows of A′A', is the column space 𝒞(A)\mathcal C(A) of AA, a subspace of ℝn\mathbb R^n. l′βl'\beta is estimable, so there is at least one bb with E(b′Y)=b′Aβ=l′βE(b'Y)=b'A\beta=l'\beta for all β\beta, i.e. A′b=lA'b=l.

(i) Existence. Let PP be the orthogonal projector onto 𝒞(A)\mathcal C(A), and put c=Pbc=Pb. Then c∈𝒞(A)c\in\mathcal C(A), and since PA=APA=A and PP is symmetric, c′A=b′PA=b′A=l′,c'A=b'PA=b'A=l', so E(c′Y)=l′βE(c'Y)=l'\beta.

Uniqueness. Suppose c1,c2∈𝒞(A)c_1,c_2\in\mathcal C(A) both satisfy ci′A=l′c_i'A=l'. Then (c1−c2)′A=0(c_1-c_2)'A=0, so c1−c2c_1-c_2 is orthogonal to every column of AA, i.e. to 𝒞(A)\mathcal C(A). But c1−c2∈𝒞(A)c_1-c_2\in\mathcal C(A). A vector orthogonal to itself is zero, so c1=c2c_1=c_2. ◼\blacksquare

(ii) Minimum variance. Let b′Yb'Y be any linear unbiased estimator of l′βl'\beta, so b′A=l′b'A=l'. Write b=c+(b−c)b=c+(b-c) with c=Pbc=Pb as above. Then (b−c)′A=l′−l′=0(b-c)'A=l'-l'=0, so b−c⊥𝒞(A)b-c\perp\mathcal C(A), and in particular (b−c)′c=0(b-c)'c=0. Hence V(b′Y)=σ2b′b=σ2(c′c+(b−c)′(b−c))≥σ2c′c=V(c′Y),V(b'Y)=\sigma^2b'b=\sigma^2\big(c'c+(b-c)'(b-c)\big)\ \ge\ \sigma^2c'c=V(c'Y), with equality if and only if b=cb=c. So c′Yc'Y has smaller variance than any other linear unbiased estimator of l′βl'\beta: it is the unique BLUE. ◼\blacksquare

(The BLUE c′Yc'Y equals l′β̂l'\hat\beta for any solution β̂\hat\beta of the normal equations A′Aβ̂=A′YA'A\hat\beta=A'Y.)

✓ Proof checked step by step Every step was checked: the projection of any unbiased coefficient vector onto the column space of A, its uniqueness, and the Pythagorean split of the variance.

↑ Back to the question list

If X1,X2,…,Xn is a random sample from a standard normal population, then using quadratic forms show that the sample mean X‾=1n∑j=1nXj and sample variance S2=1n−1∑j=1n(Xj−X‾)2 are stochastically independent.

2025 · Paper I · Q5c · 10 marks

Solution

Quadratic-form result. If X∼Nn(0,I)X\sim N_n(0,I), a linear form b′Xb'X and a quadratic form X′AXX'AX (AA symmetric) are independent if and only if Ab=0Ab=0.

Proof of sufficiency. AA is symmetric, so A=∑kλkpkpk′A=\sum_k\lambda_kp_kp_k' over its non-zero eigenvalues, with orthonormal pkp_k. If Ab=0Ab=0 then λkpk′b=pk′Ab=0\lambda_kp_k'b=p_k'Ab=0, so pk′b=0p_k'b=0 for each kk. The normal variables pk′Xp_k'X and b′Xb'X have covariance pk′b=0p_k'b=0, so they are independent; and X′AX=∑λk(pk′X)2X'AX=\sum\lambda_k(p_k'X)^2 is a function of the pk′Xp_k'X only. Hence X′AXX'AX is independent of b′Xb'X.

Application. Let 𝟏\mathbf 1 be the vector of ones and J=𝟏𝟏′J=\mathbf 1\mathbf 1'. X‾=1n𝟏′X=b′X,b=1n𝟏,\bar X=\frac1n\mathbf 1'X=b'X,\qquad b=\frac1n\mathbf 1, (n−1)S2=∑(Xj−X‾)2=X′X−nX‾2=X′(I−1nJ)X=X′AX.(n-1)S^2=\sum(X_j-\bar X)^2=X'X-n\bar X^2=X'\Big(I-\frac1nJ\Big)X=X'AX . Now Ab=1n(I−1nJ)𝟏=1n(𝟏−nn𝟏)=0.Ab=\frac1n\Big(I-\frac1nJ\Big)\mathbf 1=\frac1n\Big(\mathbf 1-\frac nn\mathbf 1\Big)=0 . So X‾\bar X and S2S^2 are stochastically independent. ◼\blacksquare

By-products. AA is idempotent (A2=AA^2=A) with rank trA=n−1\text{tr}A=n-1, so (n−1)S2=X′AX∼χn−12(n-1)S^2=X'AX\sim\chi^2_{n-1}; and nX‾2=X′(1nJ)X∼χ12n\bar X^2=X'(\frac1nJ)X\sim\chi^2_1 with 1nJ⋅A=0\frac1nJ\cdot A=0 (Craig’s theorem gives the same independence).

✓ Proof checked step by step Every step was checked: X̄ = b′X with b = 1/n, (n − 1)S² = X′AX with A = I − J/n, and Ab = 0, which gives independence for normal X.

↑ Back to the question list

Consider the model: Yn×1=Xn×kθk×1+εn×1, where ε is an n×1 vector of unobservable random variables such that E(ε)=0 and D(ε)=σ2Ω, σ>0 unknown, Ω is a positive definite matrix of known constants and rank(X)=k<n. Then (i) Derive least square estimator of θ and (ii) Derive an unbiased estimator of σ2

2025 · Paper I · Q6c · 15 marks

Solution

Note. Since D(ε)=σ2ΩD(\varepsilon)=\sigma^2\Omega is not a multiple of II, the appropriate least squares estimator is the generalised least squares (Aitken) estimator, which minimises the weighted sum of squares (Y−Xθ)′Ω−1(Y−Xθ)(Y-X\theta)'\Omega^{-1}(Y-X\theta).

(i) Estimator of θ\theta. Ω\Omega is positive definite, so there is a non-singular PP with PΩP′=IP\Omega P'=I (for example P=Ω−1/2P=\Omega^{-1/2}), and P′P=Ω−1P'P=\Omega^{-1}. Transform: Y*=PY,X*=PX,ε*=Pε:Y*=X*θ+ε*,Y^*=PY,\quad X^*=PX,\quad\varepsilon^*=P\varepsilon:\qquad Y^*=X^*\theta+\varepsilon^*, with E(ε*)=0E(\varepsilon^*)=0 and D(ε*)=σ2PΩP′=σ2ID(\varepsilon^*)=\sigma^2P\Omega P'=\sigma^2I. This is an ordinary Gauss–Markov model, and X*X^* has rank kk. Ordinary least squares on it minimises (Y*−X*θ)′(Y*−X*θ)=(Y−Xθ)′Ω−1(Y−Xθ),(Y^*-X^*\theta)'(Y^*-X^*\theta)=(Y-X\theta)'\Omega^{-1}(Y-X\theta), and the normal equations X*′X*θ=X*′Y*X^{*\prime}X^*\theta=X^{*\prime}Y^* become X′Ω−1Xθ=X′Ω−1YX'\Omega^{-1}X\theta=X'\Omega^{-1}Y. Hence θ̂=(X′Ω−1X)−1X′Ω−1Y.\hat\theta=(X'\Omega^{-1}X)^{-1}X'\Omega^{-1}Y . It is unbiased, E(θ̂)=(X′Ω−1X)−1X′Ω−1Xθ=θE(\hat\theta)=(X'\Omega^{-1}X)^{-1}X'\Omega^{-1}X\theta=\theta, with D(θ̂)=σ2(X′Ω−1X)−1,D(\hat\theta)=\sigma^2(X'\Omega^{-1}X)^{-1}, and by the Gauss–Markov theorem applied to the transformed model it is the BLUE of θ\theta.

(ii) Unbiased estimator of σ2\sigma^2. In the transformed model the residual sum of squares is R02=(Y*−X*θ̂)′(Y*−X*θ̂)=(Y−Xθ̂)′Ω−1(Y−Xθ̂),R_0^2=(Y^*-X^*\hat\theta)'(Y^*-X^*\hat\theta)=(Y-X\hat\theta)'\Omega^{-1}(Y-X\hat\theta), and E(R02)=σ2tr(I−H*)=(n−k)σ2E(R_0^2)=\sigma^2\,\text{tr}(I-H^*)=(n-k)\sigma^2, where H*=X*(X*′X*)−1X*′H^*=X^*(X^{*\prime}X^*)^{-1}X^{*\prime} has trace kk. So σ̂2=(Y−Xθ̂)′Ω−1(Y−Xθ̂)n−k=Y′Ω−1Y−θ̂′X′Ω−1Yn−k\hat\sigma^2=\frac{(Y-X\hat\theta)'\Omega^{-1}(Y-X\hat\theta)}{n-k}=\frac{Y'\Omega^{-1}Y-\hat\theta'X'\Omega^{-1}Y}{n-k} is unbiased for σ2\sigma^2.

✓ Derivation checked step by step Every step was checked: the transformation by Ω^(−1/2), the generalised least squares estimator (X′Ω⁻¹X)⁻¹X′Ω⁻¹Y and the unbiased estimator of σ² on n − k df.

↑ Back to the question list

How will you justify the usage of the principle of least squares in estimating the parameters of a linear regression model? With usual notations, for the regression model y∼=Xβ∼+ε∼, show that the least square estimator of β∼ is β∼̂=(X′X)−1X′y∼

2024 · Paper I · Q5a · 10 marks

Solution

Why least squares?

  1. Optimality without a distribution. By the Gauss–Markov theorem, if E(ε)=0E(\varepsilon)=0 and D(ε)=σ2ID(\varepsilon)=\sigma^2I, the least squares estimator is the best linear unbiased estimator: no other linear unbiased estimator has smaller variance. Only the first two moments of the errors are needed.
  2. Maximum likelihood under normality. If ε∼N(0,σ2I)\varepsilon\sim N(0,\sigma^2I), maximising the likelihood in β\beta is the same as minimising ∑εi2\sum\varepsilon_i^2, so the LS estimator is also the MLE and is then efficient (minimum variance among all unbiased estimators).
  3. Geometry. Xβ̂X\hat\beta is the orthogonal projection of yy onto the column space of XX: the closest point to the data among all possible mean vectors.
  4. Convenience. The criterion is differentiable, gives a closed-form solution, and leads directly to the distribution theory of tt and FF tests and to the analysis of variance.

Derivation. Minimise S(β)=(y−Xβ)′(y−Xβ)=y′y−2β′X′y+β′X′Xβ.S(\beta)=(y-X\beta)'(y-X\beta)=y'y-2\beta'X'y+\beta'X'X\beta . Using ∂∂β(β′a)=a\frac{\partial}{\partial\beta}(\beta'a)=a and ∂∂β(β′Aβ)=2Aβ\frac{\partial}{\partial\beta}(\beta'A\beta)=2A\beta for symmetric AA: ∂S∂β=−2X′y+2X′Xβ=0⇒X′Xβ̂=X′y(normal equations).\frac{\partial S}{\partial\beta}=-2X'y+2X'X\beta=0\quad\Longrightarrow\quad X'X\hat\beta=X'y\quad(\text{normal equations}). If XX has full column rank pp, X′XX'X is non-singular and β̂=(X′X)−1X′y.\hat\beta=(X'X)^{-1}X'y . It is a minimum: the Hessian 2X′X2X'X is positive definite, and directly, for any β\beta, S(β)=S(β̂)+(β−β̂)′X′X(β−β̂)≥S(β̂),S(\beta)=S(\hat\beta)+(\beta-\hat\beta)'X'X(\beta-\hat\beta)\ \ge\ S(\hat\beta), because the cross term 2(β−β̂)′X′(y−Xβ̂)2(\beta-\hat\beta)'X'(y-X\hat\beta) vanishes by the normal equations.

✓ Derivation checked step by step Every step was checked: the justifications (BLUE, ML under normality, projection) and the matrix derivation of the normal equations with the second-order condition.

↑ Back to the question list

Let three mutually independent variables Y1,Y2 and Y3 having common variance σ2 and E(Y1)=β1+β2,E(Y2)=β1+β3,E(Y3)=β1+β2 be given. Show that the linear parametric function p1β1+p2β2+p3β3 is estimable if and only if p1=p2+p3, clearly stating the assumptions used, if any.

2023 · Paper I · Q6b(ii) · 5 marks

Solution

Assumptions. Y1,Y2,Y3Y_1,Y_2,Y_3 are uncorrelated (here independent) with E(Y)=XβE(Y)=X\beta and common variance σ2\sigma^2; the parameters are unrestricted. A parametric function p′βp'\beta is (linearly) estimable if there is a linear function c′Yc'Y with E(c′Y)=p′βE(c'Y)=p'\beta for all β\beta, i.e. X′c=pX'c=p: pp must lie in the row space of XX.

Design matrix. X=(110101110),rank X=2.X=\begin{pmatrix}1&1&0\\1&0&1\\1&1&0\end{pmatrix},\qquad\text{rank }X=2 .

Condition. E(c1Y1+c2Y2+c3Y3)=(c1+c2+c3)β1+(c1+c3)β2+c2β3E(c_1Y_1+c_2Y_2+c_3Y_3)=(c_1+c_2+c_3)\beta_1+(c_1+c_3)\beta_2+c_2\beta_3. For this to equal p1β1+p2β2+p3β3p_1\beta_1+p_2\beta_2+p_3\beta_3 for all β\beta we need c1+c2+c3=p1,c1+c3=p2,c2=p3.c_1+c_2+c_3=p_1,\qquad c_1+c_3=p_2,\qquad c_2=p_3 . Adding the last two gives c1+c2+c3=p2+p3c_1+c_2+c_3=p_2+p_3, so the equations are consistent if and only if p1=p2+p3.◼p_1=p_2+p_3. \qquad\blacksquare

  • Necessity: if p′βp'\beta is estimable, the equations hold, and then p1=p2+p3p_1=p_2+p_3.
  • Sufficiency: if p1=p2+p3p_1=p_2+p_3, take c2=p3c_2=p_3 and any c1,c3c_1,c_3 with c1+c3=p2c_1+c_3=p_2 (for example c=(p2,p3,0)c=(p_2,p_3,0)); then E(c′Y)=p′βE(c'Y)=p'\beta.

For example, β1+β2\beta_1+\beta_2 and β2−β3\beta_2-\beta_3 are estimable, but β1\beta_1, β2\beta_2 and β3\beta_3 separately are not.

✓ Proof checked step by step Every step was checked: the row space of the design matrix is spanned by (1, 1, 0) and (1, 0, 1), and p lies in it exactly when p₁ = p₂ + p₃.

↑ Back to the question list

Define general linear model with usual assumptions. If y1=β1+u1,y2=−β1+β2+u2,y3=−β2+u3, where u1,u2,u3 are mutually independent random variables with mean zero and variance σ2, then find the least square estimators of β1 and β2.

2022 · Paper I · Q5a · 10 marks

Solution

General linear model. y=Xβ+uy=X\beta+u, where yy (n×1n\times1) is observed, XX (n×pn\times p) is a known design matrix, β\beta (p×1p\times1) is unknown, and the errors satisfy E(u)=0,D(u)=σ2InE(u)=0,\qquad D(u)=\sigma^2I_n (uncorrelated, equal variance; normal if tests are needed). XX usually has full column rank, and then β̂=(X′X)−1X′y\hat\beta=(X'X)^{-1}X'y.

Here. X=(10−110−1),X′X=(2−1−12),X′y=(y1−y2y2−y3).X=\begin{pmatrix}1&0\\-1&1\\0&-1\end{pmatrix},\qquad X'X=\begin{pmatrix}2&-1\\-1&2\end{pmatrix},\qquad X'y=\begin{pmatrix}y_1-y_2\\y_2-y_3\end{pmatrix}. Normal equations: 2β̂1−β̂2=y1−y2,−β̂1+2β̂2=y2−y3.2\hat\beta_1-\hat\beta_2=y_1-y_2,\qquad-\hat\beta_1+2\hat\beta_2=y_2-y_3 . With (X′X)−1=13(2112)(X'X)^{-1}=\frac13\begin{pmatrix}2&1\\1&2\end{pmatrix}: β̂1=2(y1−y2)+(y2−y3)3=2y1−y2−y33,β̂2=(y1−y2)+2(y2−y3)3=y1+y2−2y33.\hat\beta_1=\frac{2(y_1-y_2)+(y_2-y_3)}3=\frac{2y_1-y_2-y_3}3,\qquad\hat\beta_2=\frac{(y_1-y_2)+2(y_2-y_3)}3=\frac{y_1+y_2-2y_3}3 . Their variances are 23σ2\frac23\sigma^2 each, and Cov(β̂1,β̂2)=13σ2\text{Cov}(\hat\beta_1,\hat\beta_2)=\frac13\sigma^2. The residual SS is (y1+y2+y3)2/3(y_1+y_2+y_3)^2/3 on 1 df.

✓ Checked by computer We checked in Python: X′X = [[2, −1], [−1, 2]], β̂₁ = (2y₁ − y₂ − y₃)/3, β̂₂ = (y₁ + y₂ − 2y₃)/3, and the residual SS (y₁ + y₂ + y₃)²/3.

↑ Back to the question list

(i) What are orthogonal polynomials? How do you fit an orthogonal polynomial of degree ‘p’? (ii) For the model 𝐘n×1=Xn×k𝛃k×1+𝐮n×1,E(𝐮𝐮′)=σ2In, where Xn×k is a matrix of rank k(k<n), find out the value of E[𝐘′(In−X(X′X)−1X′)𝐘].

2022 · Paper I · Q8a · 20 marks

Solution

(This question is also listed under 3.3 Regression analysis. The worked solution is repeated here so that this page is complete.)

(i) Orthogonal polynomials. These are polynomials P0(x)=1,P1(x),…,Pp(x)P_0(x)=1,P_1(x),\dots,P_p(x), with PrP_r of degree rr, that are orthogonal over the observed xx values: ∑i=1nPr(xi)Ps(xi)=0(r≠s).\sum_{i=1}^nP_r(x_i)P_s(x_i)=0\qquad(r\ne s).

Fitting a polynomial of degree pp.

  1. Construct the PrP_r by the recurrence P1=x−x‾,Pr+1=(x−ar+1)Pr−brPr−1,ar+1=∑xPr2∑Pr2,br=∑Pr2∑Pr−12P_1=x-\bar x,\qquad P_{r+1}=(x-a_{r+1})P_r-b_rP_{r-1},\quad a_{r+1}=\frac{\sum xP_r^2}{\sum P_r^2},\ b_r=\frac{\sum P_r^2}{\sum P_{r-1}^2} (or take them from tables when xx is equally spaced).
  2. Fit yi=α0+α1P1(xi)+…+αpPp(xi)+eiy_i=\alpha_0+\alpha_1P_1(x_i)+\dots+\alpha_pP_p(x_i)+e_i. Since the columns are orthogonal, α̂0=y‾,α̂r=∑yiPr(xi)∑Pr2(xi),r=1,…,p.\hat\alpha_0=\bar y,\qquad\hat\alpha_r=\frac{\sum y_iP_r(x_i)}{\sum P_r^2(x_i)},\quad r=1,\dots,p .
  3. The SS due to the rr-th term is α̂r∑yiPr(xi)\hat\alpha_r\sum y_iP_r(x_i) on 1 df, and the residual SS is ∑(y−y‾)2−∑r=1pα̂r∑yPr\sum(y-\bar y)^2-\sum_{r=1}^p\hat\alpha_r\sum yP_r on n−p−1n-p-1 df. Each term can be tested with an FF ratio, and the degree is raised until the added terms become non-significant.
  4. If needed, expand the PrP_r to write the fitted curve in powers of xx.

(ii) Expected residual sum of squares. Let H=X(X′X)−1X′H=X(X'X)^{-1}X' and M=In−HM=I_n-H. Then MM is symmetric and idempotent (M2=MM^2=M), and MX=0MX=0.

Since Y=Xβ+uY=X\beta+u, MY=MXβ+Mu=Mu,Y′MY=u′Mu.MY=MX\beta+Mu=Mu,\qquad Y'MY=u'Mu . Using E(u′Mu)=Etr(Muu′)=tr(ME(uu′))=σ2tr(M)E(u'Mu)=E\,\text{tr}(Muu')=\text{tr}\big(M\,E(uu')\big)=\sigma^2\,\text{tr}(M): tr(M)=tr(In)−tr(X(X′X)−1X′)=n−tr((X′X)−1X′X)=n−tr(Ik)=n−k.\text{tr}(M)=\text{tr}(I_n)-\text{tr}\big(X(X'X)^{-1}X'\big)=n-\text{tr}\big((X'X)^{-1}X'X\big)=n-\text{tr}(I_k)=n-k . Hence E[Y′(In−X(X′X)−1X′)Y]=(n−k)σ2.E\big[Y'(I_n-X(X'X)^{-1}X')Y\big]=(n-k)\sigma^2 . So s2=Y′MY/(n−k)s^2=Y'MY/(n-k), the residual mean square, is an unbiased estimator of σ2\sigma^2. (No normality is needed for this.)

✓ Derivation checked step by step Every step was checked: the construction and use of orthogonal polynomials, and E[Y′(I − H)Y] = (n − k)σ² from the trace of an idempotent matrix.

↑ Back to the question list

Define Gauss-Markov linear model. State and prove necessary and sufficient condition for the linear function l′β of the parameters to be linearly estimable.

2020 · Paper I · Q5d · 10 marks

Solution

Gauss–Markov linear model. (Y,Xβ,σ2I)(Y,X\beta,\sigma^2I): YY is an n×1n\times1 vector of observations with E(Y)=Xβ,D(Y)=σ2In,E(Y)=X\beta,\qquad D(Y)=\sigma^2I_n, where XX is a known n×pn\times p matrix of rank r≤pr\le p and β\beta an unknown parameter vector. The observations are uncorrelated with equal variance; no distribution is assumed.

Definition. l′βl'\beta is linearly estimable if there is a vector cc such that E(c′Y)=l′βE(c'Y)=l'\beta for all β\beta.

Theorem. l′βl'\beta is linearly estimable if and only if ll belongs to the row space of XX (the column space of X′X'), i.e. rank(X′)=rank(X′⋮l).\text{rank}(X')=\text{rank}(X'\,\vdots\,l).

Proof.

  • Necessity. If E(c′Y)=c′Xβ=l′βE(c'Y)=c'X\beta=l'\beta for all β\beta, then (taking β\beta to be each unit vector in turn) c′X=l′c'X=l', i.e. X′c=lX'c=l. So ll is a linear combination of the columns of X′X', and appending ll to X′X' does not raise its rank.
  • Sufficiency. If l∈𝒞(X′)l\in\mathcal C(X'), then l=X′cl=X'c for some cc. Then E(c′Y)=c′Xβ=l′βE(c'Y)=c'X\beta=l'\beta for every β\beta, so c′Yc'Y is a linear unbiased estimator of l′βl'\beta. ◼\blacksquare

Equivalent forms. Because 𝒞(X′)=𝒞(X′X)\mathcal C(X')=\mathcal C(X'X), the condition is also: the equations X′Xg=lX'Xg=l are consistent; or l′(X′X)−X′X=l′l'(X'X)^-X'X=l' for a generalised inverse (X′X)−(X'X)^-. In particular, if r=pr=p every l′βl'\beta is estimable, and if r<pr<p only rr linearly independent functions are. When l′βl'\beta is estimable, its BLUE is l′β̂l'\hat\beta for any solution β̂\hat\beta of the normal equations.

✓ Proof checked step by step Every step was checked: unbiasedness requires X′c = l, so l must lie in the row space of X, and the rank and g-inverse forms of the condition.

↑ Back to the question list

Let Y1,Y2,Y3 be uncorrelated variables with common variance σ2 such that E(Y1)=β1+β2E(Y2)=2β1E(Y3)=β1−β2 Compute residual mean square.

2020 · Paper I · Q6b · 10 marks

Solution

Model. X=(11201−1),X′X=(6002),X′Y=(Y1+2Y2+Y3Y1−Y3).X=\begin{pmatrix}1&1\\2&0\\1&-1\end{pmatrix},\qquad X'X=\begin{pmatrix}6&0\\0&2\end{pmatrix},\qquad X'Y=\begin{pmatrix}Y_1+2Y_2+Y_3\\Y_1-Y_3\end{pmatrix}. X′XX'X is diagonal, so β̂1=Y1+2Y2+Y36,β̂2=Y1−Y32.\hat\beta_1=\frac{Y_1+2Y_2+Y_3}6,\qquad\hat\beta_2=\frac{Y_1-Y_3}2 .

Residual sum of squares. SSE=Y′Y−β̂′X′Y=Y12+Y22+Y32−(Y1+2Y2+Y3)26−(Y1−Y3)22.\text{SSE}=Y'Y-\hat\beta'X'Y=Y_1^2+Y_2^2+Y_3^2-\frac{(Y_1+2Y_2+Y_3)^2}6-\frac{(Y_1-Y_3)^2}2 . Expanding, SSE=(Y1−Y2+Y3)23.\text{SSE}=\frac{(Y_1-Y_2+Y_3)^2}3 . (Check: (1,−1,1)(1,-1,1) is orthogonal to both columns of XX, so Y1−Y2+Y3Y_1-Y_2+Y_3 has mean zero and is the only error function.)

Residual mean square. The error df are n−rank(X)=3−2=1n-\text{rank}(X)=3-2=1, so RMS=σ̂2=SSE1=(Y1−Y2+Y3)23,\text{RMS}=\hat\sigma^2=\frac{\text{SSE}}{1}=\frac{(Y_1-Y_2+Y_3)^2}3, which is an unbiased estimator of σ2\sigma^2, since V(Y1−Y2+Y3)=3σ2V(Y_1-Y_2+Y_3)=3\sigma^2.

✓ Checked by computer We checked in Python: X′X = diag(6, 2), β̂₁ = (y₁ + 2y₂ + y₃)/6, β̂₂ = (y₁ − y₃)/2, and the residual SS (y₁ − y₂ + y₃)²/3 on 1 df.

↑ Back to the question list

In order to estimate two parameters θ and ϕ, a number of independent measurements are taken, each having errors with mean zero and variance σ2. Suppose there are (i) n observations with mean θ, (ii) m observations with mean (θ−ϕ), and (iii) m observations with mean (ϕ−θ). Set up this in the form of a standard linear model. What are the least square estimates of θ and ϕ? Find var(ϕ̂), cov(θ̂,ϕ̂) and var(ϕ̂−θ̂).

2019 · Paper I · Q5a · 10 marks

Solution

Linear model. Call the three groups of observations AA (nn values, mean θ\theta), BB (mm values, mean θ−ϕ\theta-\phi) and CC (mm values, mean ϕ−θ\phi-\theta), with totals TA,TB,TCT_A,T_B,T_C and means y‾A,y‾B,y‾C\bar y_A,\bar y_B,\bar y_C. Then Y=X(θϕ)+ε,X=(𝟏n𝟎n𝟏m−𝟏m−𝟏m𝟏m),E(ε)=0,D(ε)=σ2In+2m.Y=X\begin{pmatrix}\theta\\\phi\end{pmatrix}+\varepsilon,\qquad X=\begin{pmatrix}\mathbf 1_n&\mathbf 0_n\\\mathbf 1_m&-\mathbf 1_m\\-\mathbf 1_m&\mathbf 1_m\end{pmatrix},\qquad E(\varepsilon)=0,\ D(\varepsilon)=\sigma^2I_{n+2m}.

Normal equations. X′X=(n+2m−2m−2m2m),X′Y=(TA+TB−TCTC−TB).X'X=\begin{pmatrix}n+2m&-2m\\-2m&2m\end{pmatrix},\qquad X'Y=\begin{pmatrix}T_A+T_B-T_C\\T_C-T_B\end{pmatrix}. |X′X|=2m(n+2m)−4m2=2mn|X'X|=2m(n+2m)-4m^2=2mn, and (X′X)−1=12mn(2m2m2mn+2m).(X'X)^{-1}=\frac1{2mn}\begin{pmatrix}2m&2m\\2m&n+2m\end{pmatrix}.

Least squares estimates. θ̂=2m(TA+TB−TC)+2m(TC−TB)2mn=TAn=y‾A,\hat\theta=\frac{2m(T_A+T_B-T_C)+2m(T_C-T_B)}{2mn}=\frac{T_A}n=\bar y_A, ϕ̂=2m(TA+TB−TC)+(n+2m)(TC−TB)2mn=y‾A+y‾C−y‾B2.\hat\phi=\frac{2m(T_A+T_B-T_C)+(n+2m)(T_C-T_B)}{2mn}=\bar y_A+\frac{\bar y_C-\bar y_B}2 . (This makes sense: y‾A\bar y_A estimates θ\theta, and 12(y‾C−y‾B)\frac12(\bar y_C-\bar y_B) estimates ϕ−θ\phi-\theta.)

Variances. D(θ̂,ϕ̂)=σ2(X′X)−1D(\hat\theta,\hat\phi)=\sigma^2(X'X)^{-1}, so V(ϕ̂)=(n+2m)σ22mn,Cov(θ̂,ϕ̂)=2mσ22mn=σ2n,V(\hat\phi)=\frac{(n+2m)\sigma^2}{2mn},\qquad\text{Cov}(\hat\theta,\hat\phi)=\frac{2m\sigma^2}{2mn}=\frac{\sigma^2}n, V(ϕ̂−θ̂)=V(ϕ̂)+V(θ̂)−2Cov=(n+2m)σ22mn+σ2n−2σ2n=σ22m.V(\hat\phi-\hat\theta)=V(\hat\phi)+V(\hat\theta)-2\text{Cov}=\frac{(n+2m)\sigma^2}{2mn}+\frac{\sigma^2}n-\frac{2\sigma^2}n=\frac{\sigma^2}{2m} . (Directly: ϕ̂−θ̂=12(y‾C−y‾B)\hat\phi-\hat\theta=\frac12(\bar y_C-\bar y_B) has variance 14⋅2σ2m=σ22m\frac14\cdot\frac{2\sigma^2}m=\frac{\sigma^2}{2m}.) Also V(θ̂)=σ2/nV(\hat\theta)=\sigma^2/n.

✓ Checked by computer We checked in Python and by hand: X′X = [[n + 2m, −2m], [−2m, 2m]], θ̂ = ȳ_A, φ̂ = ȳ_A + (ȳ_C − ȳ_B)/2, and the variances and covariance.

↑ Back to the question list

Consider a standard linear model with design matrix X=(−2−2−1−1001122−111−1) and unknown coefficients β1 and β2. Which linear combinations ψ̂=a1β̂1+a2β̂2 have largest and smallest variance subject to a12+a22=1?

2019 · Paper I · Q5b · 10 marks

Solution

Variance of a combination. D(β̂)=σ2(X′X)−1D(\hat\beta)=\sigma^2(X'X)^{-1}, so V(ψ̂)=V(a′β̂)=σ2a′(X′X)−1a.V(\hat\psi)=V(a'\hat\beta)=\sigma^2a'(X'X)^{-1}a . For a′a=1a'a=1, this quadratic form is largest at the eigenvector of (X′X)−1(X'X)^{-1} with the largest eigenvalue, and smallest at the eigenvector with the smallest eigenvalue.

X′XX'X. Column 1 is (−2,−1,0,1,2,−1,1)′(-2,-1,0,1,2,-1,1)' and column 2 is (−2,−1,0,1,2,1,−1)′(-2,-1,0,1,2,1,-1)': ∑x12=4+1+0+1+4+1+1=12,∑x22=12,∑x1x2=4+1+0+1+4−1−1=8,\sum x_1^2=4+1+0+1+4+1+1=12,\quad\sum x_2^2=12,\quad\sum x_1x_2=4+1+0+1+4-1-1=8, X′X=(128812).X'X=\begin{pmatrix}12&8\\8&12\end{pmatrix}. Its eigenvalues are 12±812\pm8: 2020 with eigenvector 12(1,1)′\frac1{\sqrt2}(1,1)', and 44 with eigenvector 12(1,−1)′\frac1{\sqrt2}(1,-1)'. (X′X)−1(X'X)^{-1} has the same eigenvectors with eigenvalues 120\frac1{20} and 14\frac14.

Answer.

  • Largest variance: a=12(1,−1)a=\frac1{\sqrt2}(1,-1), ψ̂=β̂1−β̂22\hat\psi=\frac{\hat\beta_1-\hat\beta_2}{\sqrt2}, with V(ψ̂)=σ24V(\hat\psi)=\frac{\sigma^2}4.
  • Smallest variance: a=12(1,1)a=\frac1{\sqrt2}(1,1), ψ̂=β̂1+β̂22\hat\psi=\frac{\hat\beta_1+\hat\beta_2}{\sqrt2}, with V(ψ̂)=σ220V(\hat\psi)=\frac{\sigma^2}{20}.

(The first five rows have x1=x2x_1=x_2, so they carry a lot of information about β1+β2\beta_1+\beta_2; only the last two rows tell β1\beta_1 apart from β2\beta_2.)

✓ Checked by computer We checked in Python: X′X = [[12, 8], [8, 12]], whose inverse has eigenvalues 1/20 and 1/4 with eigenvectors (1, 1)/√2 and (1, −1)/√2.

↑ Back to the question list

The period of oscillation, t of a pendulum is 2πl/g where l is the length of the pendulum and g is the gravitational constant. The periods observed are tij (j=1,2,…,ni) and lengths li (i=1,…,k) of the pendulum, in an experiment. Assuming the errors of observations to be uncorrelated with zero means and variances σ2, show that the best linear estimator of β=2π/g is β̂=∑(li)12∑jtij∑inili and V(β̂)=σ2∑inili

2018 · Paper I · Q5a · 10 marks

Solution

Model. Since t=2πglt=\frac{2\pi}{\sqrt g}\sqrt l, writing β=2π/g\beta=2\pi/\sqrt g and xi=lix_i=\sqrt{l_i} gives a regression through the origin: tij=βli+eij,E(eij)=0,V(eij)=σ2,uncorrelated.t_{ij}=\beta\sqrt{l_i}+e_{ij},\qquad E(e_{ij})=0,\ V(e_{ij})=\sigma^2,\ \text{uncorrelated}.

Least squares. Minimise S(β)=∑i∑j(tij−βli)2.S(\beta)=\sum_i\sum_j\big(t_{ij}-\beta\sqrt{l_i}\big)^2 . dSdβ=−2∑i∑jli(tij−βli)=0⇒∑ili∑jtij=β∑inili.\frac{dS}{d\beta}=-2\sum_i\sum_j\sqrt{l_i}\big(t_{ij}-\beta\sqrt{l_i}\big)=0\quad\Longrightarrow\quad\sum_i\sqrt{l_i}\sum_jt_{ij}=\beta\sum_in_il_i . Hence β̂=∑i(li)1/2∑jtij∑inili.\hat\beta=\frac{\sum_i(l_i)^{1/2}\sum_jt_{ij}}{\sum_in_il_i}. By the Gauss–Markov theorem (the model is linear in β\beta with uncorrelated, equal-variance errors), this least squares estimator is the best linear unbiased estimator of β\beta.

Variance. β̂=∑i∑jwitij\hat\beta=\sum_i\sum_jw_it_{ij} with wi=li/∑niliw_i=\sqrt{l_i}/\sum n_il_i. The tijt_{ij} are uncorrelated with variance σ2\sigma^2, so V(β̂)=σ2∑iniwi2=σ2∑inili(∑inili)2=σ2∑inili.◼V(\hat\beta)=\sigma^2\sum_in_iw_i^2=\sigma^2\frac{\sum_in_il_i}{\big(\sum_in_il_i\big)^2}=\frac{\sigma^2}{\sum_in_il_i}. \qquad\blacksquare

(An estimate of gg then follows as ĝ=4π2/β̂2\hat g=4\pi^2/\hat\beta^2.)

✓ Proof checked step by step Every step was checked: the model tᵢⱼ = β√lᵢ + eᵢⱼ, the least squares normal equation, and V(β̂) = σ²/Σnᵢlᵢ.

↑ Back to the question list

For a model Yi=β0+β1Xi+εi,i=1,2,3 where X1=−1, X2=0, X3=1, find BLUE’s of β1, β0. Suppose the model is not correct and the true model is Yi=β0+β1Xi+β2Xi2+εi. Find the bias of the BLUE’s obtained.

2018 · Paper I · Q8c · 15 marks

Solution

BLUEs under the straight-line model. X=(1−11011),X′X=(3002),X′Y=(Y1+Y2+Y3Y3−Y1).X=\begin{pmatrix}1&-1\\1&0\\1&1\end{pmatrix},\qquad X'X=\begin{pmatrix}3&0\\0&2\end{pmatrix},\qquad X'Y=\begin{pmatrix}Y_1+Y_2+Y_3\\Y_3-Y_1\end{pmatrix}. β̂0=Y1+Y2+Y33=Y‾,β̂1=Y3−Y12,\hat\beta_0=\frac{Y_1+Y_2+Y_3}3=\bar Y,\qquad\hat\beta_1=\frac{Y_3-Y_1}2, with V(β̂0)=σ2/3V(\hat\beta_0)=\sigma^2/3 and V(β̂1)=σ2/2V(\hat\beta_1)=\sigma^2/2. By the Gauss–Markov theorem these are the BLUEs.

Bias under the true quadratic model. Now E(Yi)=β0+β1Xi+β2Xi2E(Y_i)=\beta_0+\beta_1X_i+\beta_2X_i^2, with Xi2=1,0,1X_i^2=1,0,1: E(Y1)=β0−β1+β2,E(Y2)=β0,E(Y3)=β0+β1+β2.E(Y_1)=\beta_0-\beta_1+\beta_2,\qquad E(Y_2)=\beta_0,\qquad E(Y_3)=\beta_0+\beta_1+\beta_2 . E(β̂0)=3β0+2β23=β0+23β2,E(β̂1)=(β0+β1+β2)−(β0−β1+β2)2=β1.E(\hat\beta_0)=\frac{3\beta_0+2\beta_2}3=\beta_0+\frac23\beta_2,\qquad E(\hat\beta_1)=\frac{(\beta_0+\beta_1+\beta_2)-(\beta_0-\beta_1+\beta_2)}2=\beta_1 . Bias(β̂0)=23β2,Bias(β̂1)=0.\text{Bias}(\hat\beta_0)=\frac23\beta_2,\qquad\text{Bias}(\hat\beta_1)=0 . In matrix form, the bias is (X′X)−1X′zβ2(X'X)^{-1}X'z\,\beta_2 with z=(1,0,1)′z=(1,0,1)', the “alias matrix” of the omitted term. β̂1\hat\beta_1 stays unbiased because the xx’s are symmetric about 0, so the omitted x2x^2 column is orthogonal to the xx column.

✓ Checked by computer We checked in Python: X′X = diag(3, 2), β̂₀ = ȳ and β̂₁ = (y₃ − y₁)/2; under the quadratic model the biases are 2β₂/3 and 0.

↑ Back to the question list

Y1,Y2,Y3,Y4 are four independent variables with E(Y1)=E(Y3)=θ1+θ3+θ4, E(Y2)=E(Y4)=θ1−θ2 and V(Yi)=σ2 (for i=1,2,3,4). Verify whether θ1+θ3 and θ2+θ3+θ4 are estimable. If so, obtain their BLUEs. Also obtain the variances of the BLUEs.

2017 · Paper I · Q5a · 10 marks

Solution

Design. The distinct rows of XX (parameters θ1,…,θ4\theta_1,\dots,\theta_4) are r1=(1,0,1,1)(Y1,Y3),r2=(1,−1,0,0)(Y2,Y4),r_1=(1,0,1,1)\ \ (Y_1,Y_3),\qquad r_2=(1,-1,0,0)\ \ (Y_2,Y_4), so the rank is 2. A function l′θl'\theta is estimable if and only if l=ar1+br2=(a+b,−b,a,a)l=ar_1+br_2=(a+b,\ -b,\ a,\ a) for some a,ba,b.

θ1+θ3\theta_1+\theta_3, l=(1,0,1,0)l=(1,0,1,0). We would need a=1a=1 (third element) and a=0a=0 (fourth element), which is impossible. So θ1+θ3\theta_1+\theta_3 is not estimable.

θ2+θ3+θ4\theta_2+\theta_3+\theta_4, l=(0,1,1,1)l=(0,1,1,1). Take a=1a=1, b=−1b=-1: (0,1,1,1)(0,1,1,1). ✓ So it is estimable: θ2+θ3+θ4=(θ1+θ3+θ4)−(θ1−θ2).\theta_2+\theta_3+\theta_4=(\theta_1+\theta_3+\theta_4)-(\theta_1-\theta_2).

BLUE. The best estimates of the two row functions are the means of the observations that estimate them: θ1+θ3+θ4̂=Y1+Y32,θ1−θ2̂=Y2+Y42.\widehat{\theta_1+\theta_3+\theta_4}=\frac{Y_1+Y_3}2,\qquad\widehat{\theta_1-\theta_2}=\frac{Y_2+Y_4}2 . So θ2+θ3+θ4̂=Y1+Y32−Y2+Y42=Y1−Y2+Y3−Y42.\widehat{\theta_2+\theta_3+\theta_4}=\frac{Y_1+Y_3}2-\frac{Y_2+Y_4}2=\frac{Y_1-Y_2+Y_3-Y_4}2 . Its coefficient vector 12(1,−1,1,−1)\frac12(1,-1,1,-1) is 12\frac12(column of θ2\theta_2) +12+\frac12(column of θ3\theta_3), so it lies in the column space of XX, and this is the BLUE.

Variance. V=14(σ2+σ2+σ2+σ2)=σ2.V=\frac14(\sigma^2+\sigma^2+\sigma^2+\sigma^2)=\sigma^2 .

✓ Checked by computer We checked: θ₁ + θ₃ is not in the row space of X, θ₂ + θ₃ + θ₄ = row₁ − row₂, so its BLUE is (Y₁ + Y₃ − Y₂ − Y₄)/2 with variance σ².

↑ Back to the question list

Show that in the model y=Xβ+ε subject to Cβ=0, the estimator of β is β̂C=β̂−(X′X)−1C′[C(X′X)−1C′]−1Cβ̂ where β̂=(X′X)−1X′y. Note here that y is n×1, X is n×k, β is k×1 and C is q×k of rank q≤k.

2017 · Paper I · Q6b · 15 marks

Solution

Problem. Minimise S(β)=(y−Xβ)′(y−Xβ)S(\beta)=(y-X\beta)'(y-X\beta) subject to Cβ=0C\beta=0, where X′XX'X is non-singular and CC (q×kq\times k) has rank qq.

Lagrangian. ϕ=(y−Xβ)′(y−Xβ)+2λ′Cβ,\phi=(y-X\beta)'(y-X\beta)+2\lambda'C\beta, with λ\lambda a q×1q\times1 vector of multipliers. ∂ϕ∂β=−2X′y+2X′Xβ+2C′λ=0⇒β̂C=(X′X)−1X′y−(X′X)−1C′λ=β̂−(X′X)−1C′λ.\frac{\partial\phi}{\partial\beta}=-2X'y+2X'X\beta+2C'\lambda=0\quad\Longrightarrow\quad\hat\beta_C=(X'X)^{-1}X'y-(X'X)^{-1}C'\lambda=\hat\beta-(X'X)^{-1}C'\lambda .

Finding λ\lambda. The constraint Cβ̂C=0C\hat\beta_C=0 gives Cβ̂−C(X′X)−1C′λ=0.C\hat\beta-C(X'X)^{-1}C'\lambda=0 . C(X′X)−1C′C(X'X)^{-1}C' is q×qq\times q, positive definite (since (X′X)−1(X'X)^{-1} is positive definite and CC has full row rank), and therefore invertible: λ=[C(X′X)−1C′]−1Cβ̂.\lambda=\big[C(X'X)^{-1}C'\big]^{-1}C\hat\beta .

Result. β̂C=β̂−(X′X)−1C′[C(X′X)−1C′]−1Cβ̂,β̂=(X′X)−1X′y.◼\hat\beta_C=\hat\beta-(X'X)^{-1}C'\big[C(X'X)^{-1}C'\big]^{-1}C\hat\beta,\qquad\hat\beta=(X'X)^{-1}X'y. \qquad\blacksquare

Check that it is the minimum. For any β\beta with Cβ=0C\beta=0, S(β)=S(β̂)+(β−β̂)′X′X(β−β̂),S(\beta)=S(\hat\beta)+(\beta-\hat\beta)'X'X(\beta-\hat\beta), so we must minimise (β−β̂)′X′X(β−β̂)(\beta-\hat\beta)'X'X(\beta-\hat\beta) over the subspace Cβ=0C\beta=0, a positive definite quadratic: the stationary point above is the unique minimum. The increase in the residual SS due to the restriction is S(β̂C)−S(β̂)=β̂′C′[C(X′X)−1C′]−1Cβ̂,S(\hat\beta_C)-S(\hat\beta)=\hat\beta'C'\big[C(X'X)^{-1}C'\big]^{-1}C\hat\beta, which is the numerator of the FF test of H0:Cβ=0H_0:C\beta=0.

✓ Proof checked step by step Every step was checked: the Lagrangian, the solution for the multiplier and the resulting restricted estimator, which satisfies Cβ̂_C = 0.

↑ Back to the question list

Let y1=β1−β2+e1, y2=β3+e2 and y3=β1+β2+e3, where e1, e2 and e3 are iid N(0,σ2). Obtain best linear unbiased estimator (BLUE) of (2β1−β2). Is this linear parametric function testable?

2017 · Paper I · Q7c · 15 marks

Solution

Model. X=(1−10001110),|X|=−2≠0.X=\begin{pmatrix}1&-1&0\\0&0&1\\1&1&0\end{pmatrix},\qquad|X|=-2\ne0 . XX is square and non-singular, so every parametric function is estimable and the least squares estimate solves Xβ̂=yX\hat\beta=y exactly: β̂1=y1+y32,β̂2=y3−y12,β̂3=y2.\hat\beta_1=\frac{y_1+y_3}2,\qquad\hat\beta_2=\frac{y_3-y_1}2,\qquad\hat\beta_3=y_2 .

BLUE of 2β1−β22\beta_1-\beta_2. 2β̂1−β̂2=(y1+y3)−y3−y12=3y1+y32.2\hat\beta_1-\hat\beta_2=(y_1+y_3)-\frac{y_3-y_1}2=\frac{3y_1+y_3}2 . Its variance is V=9+14σ2=52σ2.V=\frac{9+1}4\sigma^2=\frac52\sigma^2 . (It is the only linear unbiased estimator: E(c′y)=2β1−β2E(c'y)=2\beta_1-\beta_2 forces c=(32,0,12)c=(\frac32,0,\frac12).)

Is it testable? The function is estimable, so a hypothesis such as H0:2β1−β2=0H_0:2\beta_1-\beta_2=0 is a testable linear hypothesis in principle. But here n=3n=3 and rank(X)=3\text{rank}(X)=3, so the error degrees of freedom are n−r=0n-r=0: the residuals are identically zero and there is no estimate of σ2\sigma^2. So it cannot be tested with a tt or FF test from these data. Only if σ2\sigma^2 is known can it be tested, with z=(3y1+y3)/2σ5/2∼N(0,1)z=\frac{(3y_1+y_3)/2}{\sigma\sqrt{5/2}}\sim N(0,1) under H0H_0. With more observations (error df >0>0) the usual tt test would apply.

✓ Checked by computer We checked in Python: X is non-singular, β̂ = ((y₁ + y₃)/2, (y₃ − y₁)/2, y₂), the BLUE of 2β₁ − β₂ is (3y₁ + y₃)/2 with variance 2.5σ², and there are 0 error degrees of freedom.

↑ Back to the question list

If l′y and m′y be two estimates of the estimable function λ′β, and ls and ms are the projections of l and m respectively on Vs (the column space of coefficient matrix A), then show that ls=ms.

2016 · Paper I · Q5b · 10 marks

Solution

Set-up. E(y)=AβE(y)=A\beta, D(y)=σ2ID(y)=\sigma^2I, and Vs=𝒞(A)V_s=\mathcal C(A) is the column space of AA (the estimation space). l′yl'y and m′ym'y are both unbiased for the estimable function λ′β\lambda'\beta.

Proof. Unbiasedness means, for all β\beta, E(l′y)=l′Aβ=λ′βandE(m′y)=m′Aβ=λ′β.E(l'y)=l'A\beta=\lambda'\beta\quad\text{and}\quad E(m'y)=m'A\beta=\lambda'\beta . Hence (l−m)′Aβ=0(l-m)'A\beta=0 for all β\beta, so (l−m)′A=0(l-m)'A=0: the vector l−ml-m is orthogonal to every column of AA, i.e. l−m⊥Vsl-m\perp V_s.

Let PP be the orthogonal projector onto VsV_s. Then P(l−m)=0P(l-m)=0, so ls=Pl=Pm=ms.◼l_s=Pl=Pm=m_s. \qquad\blacksquare

Meaning. Every unbiased estimator of λ′β\lambda'\beta has the same projection on the estimation space. That common projection ls′yl_s'y is itself unbiased (since ls′A=l′PA=l′Al_s'A=l'PA=l'A), and it is the BLUE: V(l′y)=σ2(∥ls∥2+∥l−ls∥2)≥σ2∥ls∥2V(l'y)=\sigma^2(\|l_s\|^2+\|l-l_s\|^2)\ge\sigma^2\|l_s\|^2. The part l−lsl-l_s lies in the error space and only adds variance.

✓ Proof checked step by step Every step was checked: unbiasedness gives (l − m)′A = 0, so l − m is orthogonal to V_s and the two projections coincide.

↑ Back to the question list

Consider four random variables Y1,Y2,Y3 and Y4 with means and variances as follows: E(Y1)=E(Y2)=θ1+θ2,E(Y3)=E(Y4)=θ1+θ3andV(Yi)=σ2,i=1,2,3,4 Determine the condition of estimability of the parametric function 𝐥′𝛉=l1θ1+l2θ2+l3θ3

2016 · Paper I · Q6c · 15 marks

Solution

Design matrix (parameters θ1,θ2,θ3\theta_1,\theta_2,\theta_3): X=(110110101101),rank X=2.X=\begin{pmatrix}1&1&0\\1&1&0\\1&0&1\\1&0&1\end{pmatrix},\qquad\text{rank }X=2 .

Condition. l′θl'\theta is estimable if and only if ll lies in the row space of XX, i.e. l=a(1,1,0)+b(1,0,1)=(a+b,a,b)l=a(1,1,0)+b(1,0,1)=(a+b,\ a,\ b) for some a,ba,b. Then l2=al_2=a, l3=bl_3=b and l1=a+bl_1=a+b. So l1θ1+l2θ2+l3θ3is estimable⇔l1=l2+l3.l_1\theta_1+l_2\theta_2+l_3\theta_3\ \text{is estimable}\iff l_1=l_2+l_3 .

Directly: E(∑ciYi)=(c1+c2+c3+c4)θ1+(c1+c2)θ2+(c3+c4)θ3E(\sum c_iY_i)=(c_1+c_2+c_3+c_4)\theta_1+(c_1+c_2)\theta_2+(c_3+c_4)\theta_3, and the coefficient of θ1\theta_1 is always the sum of the other two.

BLUE when estimable. l′θ=l2(θ1+θ2)+l3(θ1+θ3)l'\theta=l_2(\theta_1+\theta_2)+l_3(\theta_1+\theta_3), so its BLUE is l2Y1+Y22+l3Y3+Y42,V=σ22(l22+l32).l_2\,\frac{Y_1+Y_2}2+l_3\,\frac{Y_3+Y_4}2,\qquad V=\frac{\sigma^2}2(l_2^2+l_3^2). For example θ2−θ3\theta_2-\theta_3 is estimable (by Y‾12−Y‾34\bar Y_{12}-\bar Y_{34}), but θ1\theta_1, θ2\theta_2, θ3\theta_3 individually are not.

✓ Proof checked step by step Every step was checked: the row space is spanned by (1, 1, 0) and (1, 0, 1), giving the condition l₁ = l₂ + l₃.

↑ Back to the question list

Consider three independent random variables Y1, Y2 and Y3 having common variance σ2 and E(Y1)=β1+β3, E(Y2)=β1+β2, E(Y3)=β1+β3. Determine the condition of estimability of the linear parametric function l′β. Obtain a solution of the normal equation and the S.S. due to error.

2015 · Paper I · Q5c · 10 marks

Solution

Design. X=(101110101),rank X=2.X=\begin{pmatrix}1&0&1\\1&1&0\\1&0&1\end{pmatrix},\qquad\text{rank }X=2 .

Estimability. l′βl'\beta is estimable if and only if l=a(1,0,1)+b(1,1,0)=(a+b,b,a)l=a(1,0,1)+b(1,1,0)=(a+b,\ b,\ a), i.e. l1=l2+l3.l_1=l_2+l_3 .

Normal equations X′Xβ=X′YX'X\beta=X'Y: X′X=(312110202),X′Y=(Y1+Y2+Y3Y2Y1+Y3).X'X=\begin{pmatrix}3&1&2\\1&1&0\\2&0&2\end{pmatrix},\qquad X'Y=\begin{pmatrix}Y_1+Y_2+Y_3\\Y_2\\Y_1+Y_3\end{pmatrix}. 3β1+β2+2β3=Y1+Y2+Y3,β1+β2=Y2,2β1+2β3=Y1+Y3.3\beta_1+\beta_2+2\beta_3=Y_1+Y_2+Y_3,\qquad\beta_1+\beta_2=Y_2,\qquad2\beta_1+2\beta_3=Y_1+Y_3 . The first equation is the sum of the other two, so there are infinitely many solutions. Setting β1=0\beta_1=0: β̂=(0,Y2,Y1+Y32)′.\hat\beta=\Big(0,\ Y_2,\ \frac{Y_1+Y_3}2\Big)'. (Any solution gives the same value of an estimable l′β̂l'\hat\beta; for example β1+β3̂=Y1+Y32\widehat{\beta_1+\beta_3}=\frac{Y_1+Y_3}2 and β1+β2̂=Y2\widehat{\beta_1+\beta_2}=Y_2.)

SS due to error. SSE=Y′Y−β̂′X′Y=Y12+Y22+Y32−Y22−(Y1+Y3)22=(Y1−Y3)22,\text{SSE}=Y'Y-\hat\beta'X'Y=Y_1^2+Y_2^2+Y_3^2-Y_2^2-\frac{(Y_1+Y_3)^2}2=\frac{(Y_1-Y_3)^2}2, on n−r=3−2=1n-r=3-2=1 df. So σ̂2=(Y1−Y3)22\hat\sigma^2=\frac{(Y_1-Y_3)^2}2 is unbiased for σ2\sigma^2.

✓ Checked by computer We checked in Python: the estimability condition l₁ = l₂ + l₃, the solution β̂ = (0, y₂, (y₁ + y₃)/2) of the normal equations and the error SS (y₁ − y₃)²/2 on 1 df.

↑ Back to the question list

For the Gauss Markov Model (Y∼,Xβ∼,σ2I), the estimator t∼′Y∼ is the best linear unbiased estimator (BLUE) for E(t∼′Y∼) iff t∼′Y∼ is uncorrelated with all unbiased estimators of zero.

2015 · Paper I · Q6c · 15 marks

Solution

Definitions. In (Y,Xβ,σ2I)(Y,X\beta,\sigma^2I), a′Ya'Y is an unbiased estimator of zero if E(a′Y)=a′Xβ=0E(a'Y)=a'X\beta=0 for all β\beta, i.e. X′a=0X'a=0. The linear unbiased estimators of E(t′Y)E(t'Y) are exactly t′Y+a′Yt'Y+a'Y with X′a=0X'a=0.

Theorem. t′Yt'Y is the BLUE of E(t′Y)=t′XβE(t'Y)=t'X\beta if and only if Cov(t′Y,a′Y)=0\text{Cov}(t'Y,a'Y)=0 for every aa with X′a=0X'a=0.

Proof of “only if”. Let t′Yt'Y be the BLUE and a′Ya'Y an unbiased estimator of zero. For any real λ\lambda, (t+λa)′Y(t+\lambda a)'Y is unbiased for t′Xβt'X\beta, so V((t+λa)′Y)=V(t′Y)+2λCov(t′Y,a′Y)+λ2V(a′Y)≥V(t′Y).V\big((t+\lambda a)'Y\big)=V(t'Y)+2\lambda\,\text{Cov}(t'Y,a'Y)+\lambda^2V(a'Y)\ \ge\ V(t'Y). So 2λCov+λ2V(a′Y)≥02\lambda\,\text{Cov}+\lambda^2V(a'Y)\ge0 for all λ\lambda. If Cov≠0\text{Cov}\ne0, choosing λ=−Cov/V(a′Y)\lambda=-\text{Cov}/V(a'Y) makes this −Cov2/V(a′Y)<0-\text{Cov}^2/V(a'Y)<0, a contradiction. Hence Cov(t′Y,a′Y)=0\text{Cov}(t'Y,a'Y)=0.

Proof of “if”. Suppose t′Yt'Y is uncorrelated with every unbiased estimator of zero. Any other linear unbiased estimator of t′Xβt'X\beta is b′Y=t′Y+(b−t)′Yb'Y=t'Y+(b-t)'Y, where (b−t)′Y(b-t)'Y is an unbiased estimator of zero. Then V(b′Y)=V(t′Y)+V((b−t)′Y)+2Cov(t′Y,(b−t)′Y)=V(t′Y)+V((b−t)′Y)≥V(t′Y).V(b'Y)=V(t'Y)+V\big((b-t)'Y\big)+2\,\text{Cov}\big(t'Y,(b-t)'Y\big)=V(t'Y)+V\big((b-t)'Y\big)\ \ge\ V(t'Y). So t′Yt'Y has the minimum variance: it is the BLUE. ◼\blacksquare

Remark. Here Cov(t′Y,a′Y)=σ2t′a\text{Cov}(t'Y,a'Y)=\sigma^2t'a, so the condition is t′a=0t'a=0 for all a⊥𝒞(X)a\perp\mathcal C(X), i.e. t∈𝒞(X)t\in\mathcal C(X): the BLUE’s coefficient vector lies in the estimation space, as in Q3.

✓ Proof checked step by step Every step was checked: both directions of the theorem, using the variance of t′Y + λa′Y for an unbiased estimator a′Y of zero.

↑ Back to the question list

Let Y1,Y2,Y3 be three independent observations having expectations E(Y1)=β0−β1+β2,E(Y2)=β0−2β2,E(Y3)=β0+β1+β2 and V(Yi)=σ2 for i=1,2,3. Obtain least square estimates of β0, β1 and β2. Can you obtain unbiased estimate of σ2? Justify your claim.

2014 · Paper I · Q5a · 10 marks

Solution

Model. X=(1−1110−2111).X=\begin{pmatrix}1&-1&1\\1&0&-2\\1&1&1\end{pmatrix}. The columns are mutually orthogonal (1⋅(−1)+0+1=01\cdot(-1)+0+1=0, 1−2+1=01-2+1=0, −1+0+1=0-1+0+1=0), so X′X=diag(3,2,6),X′Y=(Y1+Y2+Y3Y3−Y1Y1−2Y2+Y3).X'X=\text{diag}(3,2,6),\qquad X'Y=\begin{pmatrix}Y_1+Y_2+Y_3\\Y_3-Y_1\\Y_1-2Y_2+Y_3\end{pmatrix}.

Least squares estimates. β̂0=Y1+Y2+Y33,β̂1=Y3−Y12,β̂2=Y1−2Y2+Y36,\hat\beta_0=\frac{Y_1+Y_2+Y_3}3,\qquad\hat\beta_1=\frac{Y_3-Y_1}2,\qquad\hat\beta_2=\frac{Y_1-2Y_2+Y_3}6, with variances σ2/3\sigma^2/3, σ2/2\sigma^2/2 and σ2/6\sigma^2/6, and zero covariances.

Unbiased estimate of σ2\sigma^2? No. Here n=3n=3 and rank(X)=3\text{rank}(X)=3, so XX is square and non-singular. The fitted values reproduce the data exactly, Xβ̂=YX\hat\beta=Y, and the residual SS is identically zero, with n−r=0n-r=0 error df. More generally, an unbiased quadratic estimator Y′AYY'AY would need E(Y′AY)=σ2trA+β′X′AXβ=σ2E(Y'AY)=\sigma^2\,\text{tr}A+\beta'X'AX\beta=\sigma^2 for all β\beta, i.e. X′AX=0X'AX=0; since XX is invertible this forces A=0A=0, and then E(Y′AY)=0≠σ2E(Y'AY)=0\ne\sigma^2. So no unbiased estimator of σ2\sigma^2 exists from these three observations. Repeated observations (more data than parameters) are needed.

✓ Checked by computer We checked in Python: the columns of X are orthogonal, X′X = diag(3, 2, 6), and with n = rank = 3 the residuals are identically zero.

↑ Back to the question list

In the Gauss-Markov set up (Y,Xβ,σ2I) a least square estimate is given by a solution of the system: X′×β̂=X′Y (i) Justify the above statement. (ii) Establish that the above system of equations is always consistent.

2014 · Paper I · Q8c · 15 marks

Solution

(i) Justification. Let β̂\hat\beta be any solution of X′Xβ̂=X′YX'X\hat\beta=X'Y. For any β\beta, S(β)=(Y−Xβ)′(Y−Xβ)=(Y−Xβ̂+X(β̂−β))′(Y−Xβ̂+X(β̂−β))S(\beta)=(Y-X\beta)'(Y-X\beta)=\big(Y-X\hat\beta+X(\hat\beta-\beta)\big)'\big(Y-X\hat\beta+X(\hat\beta-\beta)\big) =S(β̂)+(β̂−β)′X′X(β̂−β)+2(β̂−β)′X′(Y−Xβ̂).=S(\hat\beta)+(\hat\beta-\beta)'X'X(\hat\beta-\beta)+2(\hat\beta-\beta)'X'(Y-X\hat\beta). The last term is zero because X′(Y−Xβ̂)=X′Y−X′Xβ̂=0X'(Y-X\hat\beta)=X'Y-X'X\hat\beta=0. The middle term is ∥X(β̂−β)∥2≥0\|X(\hat\beta-\beta)\|^2\ge0. Hence S(β)≥S(β̂)for all β,S(\beta)\ge S(\hat\beta)\quad\text{for all }\beta, so every solution of the normal equations is a least squares estimate. Conversely, at a minimum the gradient −2X′(Y−Xβ)-2X'(Y-X\beta) must vanish, so every least squares estimate solves the normal equations. (When XX is not of full rank there are many solutions, but Xβ̂X\hat\beta, the residual SS and l′β̂l'\hat\beta for estimable l′βl'\beta are the same for all of them.)

(ii) Consistency. The system X′Xβ=X′YX'X\beta=X'Y is consistent if X′YX'Y lies in the column space of X′XX'X. We show 𝒞(X′X)=𝒞(X′)\mathcal C(X'X)=\mathcal C(X'):

  • 𝒞(X′X)⊆𝒞(X′)\mathcal C(X'X)\subseteq\mathcal C(X'), since X′Xu=X′(Xu)X'Xu=X'(Xu).
  • If v⊥𝒞(X′X)v\perp\mathcal C(X'X), then X′Xv=0X'Xv=0, so v′X′Xv=∥Xv∥2=0v'X'Xv=\|Xv\|^2=0, so Xv=0Xv=0, so v⊥𝒞(X′)v\perp\mathcal C(X'). Hence 𝒞(X′)⊥⊇𝒞(X′X)⊥\mathcal C(X')^\perp\supseteq\mathcal C(X'X)^\perp, i.e. 𝒞(X′)⊆𝒞(X′X)\mathcal C(X')\subseteq\mathcal C(X'X).

So 𝒞(X′X)=𝒞(X′)\mathcal C(X'X)=\mathcal C(X') (equivalently rank(X′X)=rank(X′)\text{rank}(X'X)=\text{rank}(X')). Since X′Y∈𝒞(X′)X'Y\in\mathcal C(X') for any YY, it lies in 𝒞(X′X)\mathcal C(X'X), and the normal equations are always consistent, whatever YY is and whatever the rank of XX. A solution is β̂=(X′X)−X′Y\hat\beta=(X'X)^-X'Y for any generalised inverse. ◼\blacksquare

✓ Proof checked step by step Every step was checked: the decomposition of S(β) that shows any solution of the normal equations minimises it, and consistency from C(X′X) = C(X′).

↑ Back to the question list

Cover of the UPSC Mains Topic-wise and Year-wise PYQs book (2013–2026)

From the Optional Province team

Strengthen your GS papers

Our UPSC Mains Topic-wise & Year-wise PYQ Book (2013–2026) maps every GS question to the syllabus, so you know what UPSC asks and how often. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

Consider the following linear model: y1=θ1+θ2+θ3+θ4+ε1,y2=θ1+θ3−θ2−θ4+ε2,y3=θ1+θ2−θ3−θ4+ε3,y4=θ1+θ4−θ2−θ3+ε4 where θ1,θ2,θ3 and θ4 are parameters, εj∼(0,σ2),j=1…4. εj’s are all independently distributed. Derive normal equations and obtain the BLUE of θ1+θ2+θ3+θ4. Also find the variance of the BLUE.

2013 · Paper I · Q5a · 10 marks

Solution

Design matrix. Reading the coefficients of (θ1,θ2,θ3,θ4)(\theta_1,\theta_2,\theta_3,\theta_4): X=(11111−11−111−1−11−1−11).X=\begin{pmatrix}1&1&1&1\\1&-1&1&-1\\1&1&-1&-1\\1&-1&-1&1\end{pmatrix}. The columns are orthogonal and each has squared length 4, so X′X=4I4X'X=4I_4.

Normal equations X′Xθ=X′yX'X\theta=X'y: 4θ1=y1+y2+y3+y4,4θ2=y1−y2+y3−y4,4\theta_1=y_1+y_2+y_3+y_4,\qquad4\theta_2=y_1-y_2+y_3-y_4, 4θ3=y1+y2−y3−y4,4θ4=y1−y2−y3+y4.4\theta_3=y_1+y_2-y_3-y_4,\qquad4\theta_4=y_1-y_2-y_3+y_4 . Each θ̂j\hat\theta_j is 14\frac14 of the corresponding contrast, with V(θ̂j)=σ2/4V(\hat\theta_j)=\sigma^2/4 and zero covariances.

BLUE of θ1+θ2+θ3+θ4\theta_1+\theta_2+\theta_3+\theta_4. Adding the four estimates: θ̂1+θ̂2+θ̂3+θ̂4=4y1+0+0+04=y1.\hat\theta_1+\hat\theta_2+\hat\theta_3+\hat\theta_4=\frac{4y_1+0+0+0}4=y_1 . This is natural, since E(y1)=θ1+θ2+θ3+θ4E(y_1)=\theta_1+\theta_2+\theta_3+\theta_4 exactly. By the Gauss–Markov theorem it is the BLUE.

Variance. V(y1)=σ2(also =4×σ24,since the θ̂j are uncorrelated).V(y_1)=\sigma^2\qquad(\text{also }=4\times\tfrac{\sigma^2}4,\ \text{since the }\hat\theta_j\text{ are uncorrelated}). (There are no error df here: n=4n=4 equals the number of parameters.)

✓ Checked by computer We checked in Python: X is a 4 × 4 Hadamard matrix, X′X = 4I, and the BLUE of θ₁ + θ₂ + θ₃ + θ₄ is y₁ with variance σ².

↑ Back to the question list

Consider a model yij=μ+αi+εij,i=1,…k,j=1,…n, εij’s are i.i.d. N(0,σ2). Obtain least squares solutions of μ and αi. When is a linear parametric function of αi’s (only) estimable? Derive a test statistic for testing H0:∑i=1nCiαi=0.

2013 · Paper I · Q5b · 10 marks

Solution

Note on the question. The sum in H0H_0 runs over the kk treatments: H0:∑i=1kCiαi=0H_0:\sum_{i=1}^kC_i\alpha_i=0.

Least squares. Minimise S=∑i∑j(yij−μ−αi)2S=\sum_i\sum_j(y_{ij}-\mu-\alpha_i)^2. The normal equations are ∂S∂μ=0:nkμ+n∑iαi=y..,∂S∂αi=0:nμ+nαi=yi.(i=1,…,k).\frac{\partial S}{\partial\mu}=0:\ nk\mu+n\sum_i\alpha_i=y_{..},\qquad\frac{\partial S}{\partial\alpha_i}=0:\ n\mu+n\alpha_i=y_{i.}\quad(i=1,\dots,k). The first equation is the sum of the others, so the rank is kk with k+1k+1 parameters: one restriction is needed for a unique solution. With ∑αi=0\sum\alpha_i=0: μ̂=y‾..,α̂i=y‾i.−y‾...\hat\mu=\bar y_{..},\qquad\hat\alpha_i=\bar y_{i.}-\bar y_{..}. The residual SS is SSE=∑i∑j(yij−y‾i.)2\text{SSE}=\sum_i\sum_j(y_{ij}-\bar y_{i.})^2 on k(n−1)k(n-1) df, and σ̂2=SSE/{k(n−1)}\hat\sigma^2=\text{SSE}/\{k(n-1)\}.

Estimability of ∑ciαi\sum c_i\alpha_i. E(yij)=μ+αiE(y_{ij})=\mu+\alpha_i, so the estimable functions are the linear combinations ∑iai(μ+αi)=(∑ai)μ+∑aiαi\sum_ia_i(\mu+\alpha_i)=(\sum a_i)\mu+\sum a_i\alpha_i. A function of the αi\alpha_i only must have zero coefficient of μ\mu, so ∑ciαi\sum c_i\alpha_i is estimable if and only if ∑ici=0\sum_ic_i=0, i.e. it is a contrast. Its BLUE is ∑ciα̂i=∑ciy‾i.,V=σ2n∑ci2,\sum c_i\hat\alpha_i=\sum c_i\bar y_{i.},\qquad V=\frac{\sigma^2}n\sum c_i^2, which does not depend on the restriction used.

Test of H0:∑Ciαi=0H_0:\sum C_i\alpha_i=0 (∑Ci=0\sum C_i=0). Under normality, ∑Ciy‾i.∼N(∑Ciαi,σ2n∑Ci2)\sum C_i\bar y_{i.}\sim N\big(\sum C_i\alpha_i,\frac{\sigma^2}n\sum C_i^2\big), independent of SSE. So t=∑iCiy‾i.σ̂2∑iCi2/n∼tk(n−1)under H0,t=\frac{\sum_iC_i\bar y_{i.}}{\sqrt{\hat\sigma^2\sum_iC_i^2/n}}\sim t_{k(n-1)}\quad\text{under }H_0, and we reject H0H_0 at level α\alpha if |t|>tα/2,k(n−1)|t|>t_{\alpha/2,\,k(n-1)}. Equivalently, F=t2=n(∑Ciy‾i.)2/∑Ci2σ̂2∼F1,k(n−1),F=t^2=\frac{n\big(\sum C_i\bar y_{i.}\big)^2/\sum C_i^2}{\hat\sigma^2}\sim F_{1,\,k(n-1)}, where the numerator is the single-df sum of squares due to the contrast.

✓ Derivation checked step by step Every step was checked: the normal equations of the one-way model, their solution under Σαᵢ = 0, the contrast condition for estimability, and the t test.

↑ Back to the question list

Y1,Y2,Y3 and Y4 are independent stochastic variables with common variance σ2 and E(Y1)=E(Y2)=μ+α1 and E(Y3)=E(Y4)=μ+α2 (i) Examine whether α1 is estimable. (ii) Find the best unbiased estimator of (α1−α2). (iii) Obtain the variance of the best unbiased estimator of (α1−α2).

2012 · Paper I · Q5b · 12 marks

Solution

Design. With parameters (μ,α1,α2)(\mu,\alpha_1,\alpha_2), the distinct rows of XX are (1,1,0)(1,1,0) (for Y1,Y2Y_1,Y_2) and (1,0,1)(1,0,1) (for Y3,Y4Y_3,Y_4); the rank is 2. A function l′θl'\theta is estimable iff l=a(1,1,0)+b(1,0,1)=(a+b,a,b)l=a(1,1,0)+b(1,0,1)=(a+b,a,b).

(i) Is α1\alpha_1 estimable? l=(0,1,0)l=(0,1,0) needs a=1a=1, b=0b=0 and a+b=0a+b=0: impossible. So α1\alpha_1 is not estimable. (Any E(∑ciYi)=(c1+c2+c3+c4)μ+(c1+c2)α1+(c3+c4)α2E(\sum c_iY_i)=(c_1+c_2+c_3+c_4)\mu+(c_1+c_2)\alpha_1+(c_3+c_4)\alpha_2; to get α1\alpha_1 we need c1+c2=1c_1+c_2=1, c3+c4=0c_3+c_4=0 and the total zero, a contradiction.)

(ii) Best unbiased estimator of α1−α2\alpha_1-\alpha_2. l=(0,1,−1)l=(0,1,-1): a=1a=1, b=−1b=-1, a+b=0a+b=0. ✓ Estimable, since α1−α2=(μ+α1)−(μ+α2)\alpha_1-\alpha_2=(\mu+\alpha_1)-(\mu+\alpha_2). The BLUE is α1−α2̂=Y1+Y22−Y3+Y42.\widehat{\alpha_1-\alpha_2}=\frac{Y_1+Y_2}2-\frac{Y_3+Y_4}2 . (Its coefficient vector is constant within the two groups, so it lies in the estimation space; by Gauss–Markov it is the best linear unbiased estimator.)

(iii) Variance. V=14⋅2σ2+14⋅2σ2=σ2.V=\frac14\cdot2\sigma^2+\frac14\cdot2\sigma^2=\sigma^2 .

✓ Checked by computer We checked: α₁ is not in the row space spanned by (1, 1, 0) and (1, 0, 1), α₁ − α₂ is, and its BLUE (Y₁ + Y₂ − Y₃ − Y₄)/2 has variance σ².

↑ Back to the question list

Derive the normal equations for estimating the parameters of a linear regression model by the method of least squares.

2012 · Paper I · Q5e · 12 marks

Solution

Model. yi=β0+β1x1i+…+βkxki+eiy_i=\beta_0+\beta_1x_{1i}+\dots+\beta_kx_{ki}+e_i, i=1,…,ni=1,\dots,n, with E(ei)=0E(e_i)=0, V(ei)=σ2V(e_i)=\sigma^2 and uncorrelated errors. In matrix form y=Xβ+ey=X\beta+e, with X=[𝟏,x1,…,xk]X=[\mathbf 1,x_1,\dots,x_k].

Least squares. Choose β\beta to minimise the sum of squared errors S=∑i=1n(yi−β0−β1x1i−…−βkxki)2.S=\sum_{i=1}^n\big(y_i-\beta_0-\beta_1x_{1i}-\dots-\beta_kx_{ki}\big)^2 . Setting each partial derivative to zero: ∂S∂β0=−2∑i(yi−β0−∑jβjxji)=0,\frac{\partial S}{\partial\beta_0}=-2\sum_i(y_i-\beta_0-\textstyle\sum_j\beta_jx_{ji})=0, ∂S∂βm=−2∑ixmi(yi−β0−∑jβjxji)=0,m=1,…,k.\frac{\partial S}{\partial\beta_m}=-2\sum_ix_{mi}(y_i-\beta_0-\textstyle\sum_j\beta_jx_{ji})=0,\qquad m=1,\dots,k .

Normal equations. nβ0+β1∑x1i+…+βk∑xki=∑yi,n\beta_0+\beta_1\sum x_{1i}+\dots+\beta_k\sum x_{ki}=\sum y_i, β0∑xmi+β1∑xmix1i+…+βk∑xmixki=∑xmiyi,m=1,…,k.\beta_0\sum x_{mi}+\beta_1\sum x_{mi}x_{1i}+\dots+\beta_k\sum x_{mi}x_{ki}=\sum x_{mi}y_i,\qquad m=1,\dots,k . There are k+1k+1 equations in k+1k+1 unknowns. In matrix form, S=(y−Xβ)′(y−Xβ)S=(y-X\beta)'(y-X\beta) and ∂S/∂β=−2X′(y−Xβ)=0\partial S/\partial\beta=-2X'(y-X\beta)=0 give X′Xβ̂=X′y,β̂=(X′X)−1X′ywhen X has full column rank.X'X\hat\beta=X'y,\qquad\hat\beta=(X'X)^{-1}X'y\ \ \text{when }X\text{ has full column rank}. The Hessian 2X′X2X'X is positive (semi-)definite, so the solution is a minimum. For simple regression (k=1k=1) these reduce to ∑y=nβ0+β1∑x\sum y=n\beta_0+\beta_1\sum x and ∑xy=β0∑x+β1∑x2\sum xy=\beta_0\sum x+\beta_1\sum x^2.

✓ Derivation checked step by step Every step was checked: the sum of squares criterion, its partial derivatives and the matrix form X′Xβ = X′y.

↑ Back to the question list

Assuming the model xi=m1+e1iyi=m2+e2izi=m1+m2+e3i,i=1(1)n where e1i, e2i and e3i are the errors, obtain least square estimates of m1 and m2.

2011 · Paper I · Q5b · 12 marks

Solution

Assumptions. All 3n3n errors are uncorrelated with mean zero and a common variance σ2\sigma^2.

Least squares. Minimise S=∑i=1n{(xi−m1)2+(yi−m2)2+(zi−m1−m2)2}.S=\sum_{i=1}^n\Big\{(x_i-m_1)^2+(y_i-m_2)^2+(z_i-m_1-m_2)^2\Big\}. ∂S∂m1=0:∑xi+∑zi=2nm1+nm2,∂S∂m2=0:∑yi+∑zi=nm1+2nm2.\frac{\partial S}{\partial m_1}=0:\quad\sum x_i+\sum z_i=2nm_1+nm_2,\qquad\frac{\partial S}{\partial m_2}=0:\quad\sum y_i+\sum z_i=nm_1+2nm_2 . Dividing by nn: 2m1+m2=x‾+z‾,m1+2m2=y‾+z‾.2m_1+m_2=\bar x+\bar z,\qquad m_1+2m_2=\bar y+\bar z .

Solution. m̂1=2(x‾+z‾)−(y‾+z‾)3=2x‾−y‾+z‾3,m̂2=2(y‾+z‾)−(x‾+z‾)3=2y‾−x‾+z‾3.\hat m_1=\frac{2(\bar x+\bar z)-(\bar y+\bar z)}3=\frac{2\bar x-\bar y+\bar z}3,\qquad\hat m_2=\frac{2(\bar y+\bar z)-(\bar x+\bar z)}3=\frac{2\bar y-\bar x+\bar z}3 .

Check. E(m̂1)=2m1−m2+m1+m23=m1E(\hat m_1)=\frac{2m_1-m_2+m_1+m_2}3=m_1. ✓ The variances are V(m̂1)=V(m̂2)=(4+1+1)σ29n=2σ23nV(\hat m_1)=V(\hat m_2)=\frac{(4+1+1)\sigma^2}{9n}=\frac{2\sigma^2}{3n}, smaller than σ2/n\sigma^2/n for x‾\bar x alone, because zz carries extra information about m1m_1 (and Cov(m̂1,m̂2)=−σ23n\text{Cov}(\hat m_1,\hat m_2)=-\frac{\sigma^2}{3n}).

✓ Checked by computer Every step was checked: the normal equations 2m₁ + m₂ = x̄ + z̄ and m₁ + 2m₂ = ȳ + z̄ and their solution.

↑ Back to the question list

Let yn×1 be a random vector distributed as Nn(0,σ2In) Derive necessary and sufficient conditions for the quadratic form Y′AY to be distributed as χ2.

2007 · Paper I · Q6a · 20 marks

Solution

Result. Let Y∼Nn(0,σ2In)Y\sim N_n(0,\sigma^2I_n) and AA a symmetric n×nn\times n matrix. Then Y′AYσ2∼χr2⇔A2=A(A idempotent),and then r=rank(A)=tr(A).\frac{Y'AY}{\sigma^2}\sim\chi^2_r\iff A^2=A\ (A\text{ idempotent}),\ \text{and then }r=\text{rank}(A)=\text{tr}(A).

Spectral form. Write A=PΛP′A=P\Lambda P' with PP orthogonal and Λ=diag(λ1,…,λn)\Lambda=\text{diag}(\lambda_1,\dots,\lambda_n). Put Z=P′Y/σZ=P'Y/\sigma. Then Z∼Nn(0,I)Z\sim N_n(0,I), the ZiZ_i are iid N(0,1)N(0,1), and Y′AYσ2=Z′ΛZ=∑iλiZi2.\frac{Y'AY}{\sigma^2}=Z'\Lambda Z=\sum_i\lambda_iZ_i^2 .

Sufficiency. If A2=AA^2=A, then Λ2=Λ\Lambda^2=\Lambda, so each λi\lambda_i is 0 or 1. If rr of them equal 1, Y′AYσ2=∑i:λi=1Zi2\frac{Y'AY}{\sigma^2}=\sum_{i:\lambda_i=1}Z_i^2 is a sum of rr independent squared standard normals, i.e. χr2\chi^2_r, with r=rankA=trAr=\text{rank}A=\text{tr}A.

Necessity. The mgf of ∑λiZi2\sum\lambda_iZ_i^2 is M(t)=∏i(1−2λit)−1/2M(t)=\prod_i(1-2\lambda_it)^{-1/2} for tt near 0. If this is χr2\chi^2_r, then M(t)=(1−2t)−r/2M(t)=(1-2t)^{-r/2}, so ∏i(1−2λit)=(1−2t)rfor all t near 0.\prod_i(1-2\lambda_it)=(1-2t)^r\quad\text{for all }t\text{ near }0 . Both sides are polynomials in tt; by unique factorisation, the roots t=1/(2λi)t=1/(2\lambda_i) of the left side (for λi≠0\lambda_i\ne0) must all equal the root t=12t=\frac12 of the right, with multiplicity rr. So each non-zero λi\lambda_i equals 1 and exactly rr of them are non-zero. Hence Λ2=Λ\Lambda^2=\Lambda, so A2=PΛ2P′=AA^2=P\Lambda^2P'=A. ◼\blacksquare

Remarks. If Y∼Nn(μ,σ2I)Y\sim N_n(\mu,\sigma^2I), the same condition gives a non-central χr2(μ′Aμ/σ2)\chi^2_r(\mu'A\mu/\sigma^2). For a general Y∼Nn(0,Σ)Y\sim N_n(0,\Sigma), the condition is AΣA=AA\Sigma A=A (equivalently AΣA\Sigma idempotent). Examples: (n−1)s2/σ2=Y′(I−1nJ)Y/σ2∼χn−12(n-1)s^2/\sigma^2=Y'(I-\frac1nJ)Y/\sigma^2\sim\chi^2_{n-1}, and SSE/σ2=Y′(I−H)Y/σ2∼χn−p2\text{SSE}/\sigma^2=Y'(I-H)Y/\sigma^2\sim\chi^2_{n-p}.

✓ Proof checked step by step Every step was checked: the spectral decomposition, the mgf of Y′AY/σ², and the argument that the mgf is chi-square only when every eigenvalue is 0 or 1.

↑ Back to the question list

In a Gauss-Markoff set-up, define an estimable parametric function. Show that if r(X)=p, then every parametric function is estimable where we consider the set-up (yn×1,Xn×pβp×1,σ2In)

2007 · Paper I · Q6c · 20 marks

Solution

Definition. In the Gauss–Markov set-up (y,Xβ,σ2In)(y,X\beta,\sigma^2I_n), a parametric function l′βl'\beta is estimable if it has a linear unbiased estimator, i.e. there exists cc (n×1n\times1) with E(c′y)=c′Xβ=l′βfor all β∈ℝp,E(c'y)=c'X\beta=l'\beta\quad\text{for all }\beta\in\mathbb R^p, equivalently X′c=lX'c=l: ll belongs to the column space of X′X' (the row space of XX).

Proof that every function is estimable when r(X)=pr(X)=p. The row space of XX is a subspace of ℝp\mathbb R^p of dimension r(X)=pr(X)=p, so it is the whole of ℝp\mathbb R^p. Hence every l∈ℝpl\in\mathbb R^p lies in it, and X′c=lX'c=l has a solution: every l′βl'\beta is estimable.

Explicitly. If r(X)=pr(X)=p, X′XX'X (p×pp\times p) has rank pp and is non-singular. For any ll, take c=X(X′X)−1l.c=X(X'X)^{-1}l . Then E(c′y)=l′(X′X)−1X′Xβ=l′βfor all β.E(c'y)=l'(X'X)^{-1}X'X\beta=l'\beta\quad\text{for all }\beta . So c′y=l′(X′X)−1X′y=l′β̂c'y=l'(X'X)^{-1}X'y=l'\hat\beta is a linear unbiased estimator of l′βl'\beta. ◼\blacksquare

Since c∈𝒞(X)c\in\mathcal C(X), it is in fact the BLUE, with V(l′β̂)=σ2l′(X′X)−1lV(l'\hat\beta)=\sigma^2l'(X'X)^{-1}l. In particular each βj\beta_j is estimable. (Conversely, if every l′βl'\beta is estimable then each unit vector lies in the row space, so r(X)=pr(X)=p.)

✓ Proof checked step by step Every step was checked: with r(X) = p the row space of X is all of Rᵖ, so every l lies in it, and l′β̂ is the BLUE.

↑ Back to the question list

Discuss least squares method of estimation and the relation between least squares estimators and best linear unbiased estimators.

2006 · Paper I · Q4a · 20 marks

Solution

Least squares method. In the linear model y=Xβ+εy=X\beta+\varepsilon, with E(ε)=0E(\varepsilon)=0 and D(ε)=σ2ID(\varepsilon)=\sigma^2I, the method of least squares estimates β\beta by the value that minimises the sum of squared deviations of the observations from their expectations: S(β)=∑i(yi−xi′β)2=(y−Xβ)′(y−Xβ).S(\beta)=\sum_i(y_i-x_i'\beta)^2=(y-X\beta)'(y-X\beta). Differentiating gives the normal equations X′Xβ̂=X′yX'X\hat\beta=X'y; if XX has full rank, β̂=(X′X)−1X′y\hat\beta=(X'X)^{-1}X'y. Geometrically, Xβ̂X\hat\beta is the orthogonal projection of yy onto the column space of XX. Least squares needs no distributional assumption. The residual SS S(β̂)S(\hat\beta), divided by n−rn-r, is an unbiased estimator of σ2\sigma^2.

Relation with BLUEs (Gauss–Markov theorem). For any estimable l′βl'\beta, the least squares estimator l′β̂l'\hat\beta is the best linear unbiased estimator.

Proof (full rank case). l′β̂=a′yl'\hat\beta=a'y with a=X(X′X)−1la=X(X'X)^{-1}l; it is linear and unbiased. Any other linear unbiased estimator b′yb'y satisfies X′b=lX'b=l. Then X′(b−a)=0X'(b-a)=0 and a′(b−a)=l′(X′X)−1X′(b−a)=0,a'(b-a)=l'(X'X)^{-1}X'(b-a)=0, so V(b′y)=σ2b′b=σ2{a′a+(b−a)′(b−a)}≥σ2a′a=V(l′β̂),V(b'y)=\sigma^2b'b=\sigma^2\{a'a+(b-a)'(b-a)\}\ge\sigma^2a'a=V(l'\hat\beta), with equality only if b=ab=a.

Points to note.

  1. The equivalence is between least squares estimators and best linear unbiased estimators. It holds under the assumptions E(ε)=0E(\varepsilon)=0 and D(ε)=σ2ID(\varepsilon)=\sigma^2I; normality is not needed.
  2. If D(ε)=σ2ΩD(\varepsilon)=\sigma^2\Omega with Ω≠I\Omega\ne I, ordinary least squares is still unbiased but no longer best; the BLUE is then the generalised least squares estimator (X′Ω−1X)−1X′Ω−1y(X'\Omega^{-1}X)^{-1}X'\Omega^{-1}y.
  3. Under normality, the least squares estimators are also maximum likelihood estimators and have minimum variance among all unbiased estimators, linear or not.
  4. Non-linear or biased estimators (ridge regression, for example) can have smaller mean squared error than least squares.

✓ Answer checked step by step Every step was checked: the least squares principle, the normal equations and the Gauss–Markov argument that least squares estimators are BLUEs.

↑ Back to the question list

Consider the model E(y1)=2β1+β2,E(y2)=β1−β2,E(y3)=β1+αβ2 with the usual assumptions. Determine α so that the BLUE’s of β1 and β2 are uncorrelated.

2005 · Paper I · Q6a · 20 marks

Solution

Condition. In the model E(y)=XβE(y)=X\beta, D(y)=σ2ID(y)=\sigma^2I, the BLUEs are β̂=(X′X)−1X′y\hat\beta=(X'X)^{-1}X'y with D(β̂)=σ2(X′X)−1.D(\hat\beta)=\sigma^2(X'X)^{-1}. For two parameters, (X′X)−1(X'X)^{-1} is diagonal exactly when X′XX'X is diagonal. So β̂1,β̂2\hat\beta_1,\hat\beta_2 are uncorrelated if and only if the two columns of XX are orthogonal.

Here. X=(211−11α),X′X=(62−1+α1+α2+α2)=(61+α1+α2+α2).X=\begin{pmatrix}2&1\\1&-1\\1&\alpha\end{pmatrix},\qquad X'X=\begin{pmatrix}6&2-1+\alpha\\1+\alpha&2+\alpha^2\end{pmatrix}=\begin{pmatrix}6&1+\alpha\\1+\alpha&2+\alpha^2\end{pmatrix}. Cov(β̂1,β̂2)=−(1+α)σ2|X′X|=0⇔α=−1.\text{Cov}(\hat\beta_1,\hat\beta_2)=-\frac{(1+\alpha)\sigma^2}{|X'X|}=0\iff\alpha=-1 .

With α=−1\alpha=-1. X′X=diag(6,3)X'X=\text{diag}(6,3), and β̂1=2y1+y2+y36,β̂2=y1−y2−y33,\hat\beta_1=\frac{2y_1+y_2+y_3}6,\qquad\hat\beta_2=\frac{y_1-y_2-y_3}3, with V(β̂1)=σ2/6V(\hat\beta_1)=\sigma^2/6 and V(β̂2)=σ2/3V(\hat\beta_2)=\sigma^2/3.

✓ Checked by computer We checked in Python: the off-diagonal element of X′X is 1 + α, so α = −1 makes X′X = diag(6, 3) and the BLUEs uncorrelated.

↑ Back to the question list

Show that a linear function of observations belongs to the error space if and only if its coefficient vector is orthogonal to the columns of the matrix X in the usual linear model Y=Xβ+ε.

2004 · Paper I · Q5b · 12 marks

Solution

Definitions. In Y=Xβ+εY=X\beta+\varepsilon, E(ε)=0E(\varepsilon)=0, D(ε)=σ2ID(\varepsilon)=\sigma^2I, a linear function c′Yc'Y belongs to the error space (is an error function, or a linear zero function) if E(c′Y)=0for all β.E(c'Y)=0\quad\text{for all }\beta . The estimation space is the column space 𝒞(X)\mathcal C(X), and the error space is its orthogonal complement.

Theorem. c′Yc'Y belongs to the error space if and only if cc is orthogonal to every column of XX, i.e. X′c=0X'c=0.

Proof. E(c′Y)=c′XβE(c'Y)=c'X\beta.

  • If X′c=0X'c=0, then c′Xβ=0c'X\beta=0 for every β\beta, so c′Yc'Y has zero expectation identically: it is an error function.
  • Only if: suppose c′Xβ=0c'X\beta=0 for all β\beta. Taking β=ej\beta=e_j (the jj-th unit vector) gives c′xj=0c'x_j=0, where xjx_j is the jj-th column of XX. So cc is orthogonal to every column of XX, i.e. X′c=0X'c=0. ◼\blacksquare

Consequences. The error space has dimension n−rn-r, where r=rank(X)r=\text{rank}(X). Every error function is uncorrelated with every BLUE, since Cov(a′Y,c′Y)=σ2a′c=0\text{Cov}(a'Y,c'Y)=\sigma^2a'c=0 when a∈𝒞(X)a\in\mathcal C(X) and c⊥𝒞(X)c\perp\mathcal C(X). If c1′Y,…,cn−r′Yc_1'Y,\dots,c_{n-r}'Y is an orthonormal basis of error functions, then SSE=∑k(ck′Y)2\text{SSE}=\sum_k(c_k'Y)^2 and E(SSE)=(n−r)σ2E(\text{SSE})=(n-r)\sigma^2.

✓ Proof checked step by step Every step was checked: E(c′Y) = c′Xβ vanishes for all β exactly when X′c = 0.

↑ Back to the question list

For the model y1=β1+β2+ε1,y2=β1+β3+ε2,y3=β1+β2+ε3 show that λ1β1+λ2β2+λ3β3 is estimable if and only if λ1=λ2+λ3.

2004 · Paper I · Q6a · 20 marks

Solution

Design. X=(110101110),rank X=2,X=\begin{pmatrix}1&1&0\\1&0&1\\1&1&0\end{pmatrix},\qquad\text{rank }X=2, with E(ε)=0E(\varepsilon)=0, D(ε)=σ2ID(\varepsilon)=\sigma^2I.

Proof. λ′β\lambda'\beta is estimable iff there is cc with E(c′y)=λ′βE(c'y)=\lambda'\beta for all β\beta, i.e. c1+c2+c3=λ1,c1+c3=λ2,c2=λ3.c_1+c_2+c_3=\lambda_1,\qquad c_1+c_3=\lambda_2,\qquad c_2=\lambda_3 .

  • Necessity. Adding the last two equations gives c1+c2+c3=λ2+λ3c_1+c_2+c_3=\lambda_2+\lambda_3, and so λ1=λ2+λ3\lambda_1=\lambda_2+\lambda_3.
  • Sufficiency. If λ1=λ2+λ3\lambda_1=\lambda_2+\lambda_3, then c=(λ2,λ3,0)c=(\lambda_2,\lambda_3,0) satisfies all three equations: E(λ2y1+λ3y2)=λ2(β1+β2)+λ3(β1+β3)=λ1β1+λ2β2+λ3β3E(\lambda_2y_1+\lambda_3y_2)=\lambda_2(\beta_1+\beta_2)+\lambda_3(\beta_1+\beta_3)=\lambda_1\beta_1+\lambda_2\beta_2+\lambda_3\beta_3.

So λ1β1+λ2β2+λ3β3\lambda_1\beta_1+\lambda_2\beta_2+\lambda_3\beta_3 is estimable if and only if λ1=λ2+λ3\lambda_1=\lambda_2+\lambda_3. ◼\blacksquare

BLUE. For such a function, λ′β=λ2(β1+β2)+λ3(β1+β3)\lambda'\beta=\lambda_2(\beta_1+\beta_2)+\lambda_3(\beta_1+\beta_3), so the BLUE is λ2y1+y32+λ3y2,V=σ2(λ222+λ32).\lambda_2\frac{y_1+y_3}2+\lambda_3y_2,\qquad V=\sigma^2\Big(\frac{\lambda_2^2}2+\lambda_3^2\Big).

✓ Proof checked step by step We checked: the row space of X is spanned by (1, 1, 0) and (1, 0, 1), so λ′β is estimable exactly when λ₁ = λ₂ + λ₃.

↑ Back to the question list

If Y=Xβ+e is a general linear hypothesis model of full rank. Find the estimate of β the unknown parameter using appropriate method when the distribution of e is unspecified.

2003 · Paper I · Q5a · 12 marks

Solution

Setting. Y=Xβ+eY=X\beta+e, with XX of order n×pn\times p and rank pp (full rank), E(e)=0E(e)=0, D(e)=σ2ID(e)=\sigma^2I. The distribution of ee is not specified, so maximum likelihood cannot be used. The appropriate method is least squares, which needs only the first two moments.

Estimation. Minimise S(β)=(Y−Xβ)′(Y−Xβ)S(\beta)=(Y-X\beta)'(Y-X\beta): ∂S∂β=−2X′Y+2X′Xβ=0⇒X′Xβ̂=X′Y.\frac{\partial S}{\partial\beta}=-2X'Y+2X'X\beta=0\quad\Longrightarrow\quad X'X\hat\beta=X'Y . X′XX'X is non-singular (full rank), so β̂=(X′X)−1X′Y.\hat\beta=(X'X)^{-1}X'Y . The Hessian 2X′X2X'X is positive definite, so this is the minimum.

Properties.

  • Unbiased: E(β̂)=(X′X)−1X′Xβ=βE(\hat\beta)=(X'X)^{-1}X'X\beta=\beta.
  • Dispersion: D(β̂)=(X′X)−1X′(σ2I)X(X′X)−1=σ2(X′X)−1D(\hat\beta)=(X'X)^{-1}X'(\sigma^2I)X(X'X)^{-1}=\sigma^2(X'X)^{-1}.
  • Gauss–Markov: for every ll, l′β̂l'\hat\beta is the BLUE of l′βl'\beta, i.e. it has the smallest variance among all linear unbiased estimators.
  • σ2\sigma^2 is estimated without bias by s2=(Y−Xβ̂)′(Y−Xβ̂)n−ps^2=\frac{(Y-X\hat\beta)'(Y-X\hat\beta)}{n-p}.

If, later, normality is assumed, the same β̂\hat\beta is the maximum likelihood estimator, and β̂∼Np(β,σ2(X′X)−1)\hat\beta\sim N_p(\beta,\sigma^2(X'X)^{-1}) allows exact tt and FF tests.

✓ Derivation checked step by step Every step was checked: the least squares estimator for the full-rank model, its unbiasedness and dispersion, and its BLUE property without any distributional assumption.

↑ Back to the question list

Fill up the blanks in parts (i), (ii) and (iii) and answer (iv). (i) The arithmetic mean of a positive valued statistical variable is than the reciprocal of the arithmetic mean of the reciprocal of the variable. (ii) If one observation is missing in a Randomized Block Design with v treatments and b blocks, in the Analysis of Variance Table, the number of degrees of freedom for treatments will be and that for error will be (iii) The Gauss-Markov Theorem requires the error components to have mean values, variance and all pair-wise covariance’s to be (iv) Write down the structure of the Analysis of Variance Table for a Latin Square Design of order m.

2001 · Paper I · Q5c · 12 marks

Solution

(i) The arithmetic mean of a positive valued variable is greater than (or equal to) the reciprocal of the arithmetic mean of the reciprocals of the variable. (The latter is the harmonic mean, and AM ≥\ge HM, with equality only when all values are equal.)

(ii) With one observation missing in an RBD with vv treatments and bb blocks, the treatment degrees of freedom are v−1v-1 (unchanged), and the error degrees of freedom are (v−1)(b−1)−1(v-1)(b-1)-1 (one less than usual, because one value has been estimated). The total df also fall by one, to vb−2vb-2.

(iii) The Gauss–Markov theorem requires the error components to have zero mean values, equal (constant) variance σ2\sigma^2, and all pair-wise covariances to be zero (uncorrelated errors).

(iv) ANOVA table for an m×mm\times m Latin square design:

Source df SS MS F
Rows m−1m-1 SSR=∑iRi2/m−G2/m2\text{SSR}=\sum_iR_i^2/m-G^2/m^2 SSR/(m−1)(m-1) MSR/MSE
Columns m−1m-1 SSC=∑jCj2/m−G2/m2\text{SSC}=\sum_jC_j^2/m-G^2/m^2 SSC/(m−1)(m-1) MSC/MSE
Treatments m−1m-1 SST=∑kTk2/m−G2/m2\text{SST}=\sum_kT_k^2/m-G^2/m^2 SST/(m−1)(m-1) MST/MSE
Error (m−1)(m−2)(m-1)(m-2) by subtraction MSE
Total m2−1m^2-1 ∑y2−G2/m2\sum y^2-G^2/m^2

Here GG is the grand total and RiR_i, CjC_j, TkT_k are the row, column and treatment totals. The treatment effect is tested with F=MST/MSEF=\text{MST}/\text{MSE} on {m−1,(m−1)(m−2)}\{m-1,(m-1)(m-2)\} df.

✓ Answer checked step by step We checked each answer: AM ≥ HM, the degrees of freedom with one missing value, the Gauss–Markov error conditions and the Latin square ANOVA layout.

↑ Back to the question list

In connection with the Gauss-Markov linear models, what do you mean by Design matrix and Normal equations? Discuss the least squares principle and use it to derive the normal equations.

2000 · Paper I · Q5a · 12 marks

Solution

Gauss–Markov linear model. (Y,Xβ,σ2I)(Y,X\beta,\sigma^2I): Y=Xβ+ε,E(ε)=0,D(ε)=σ2In.Y=X\beta+\varepsilon,\qquad E(\varepsilon)=0,\qquad D(\varepsilon)=\sigma^2I_n .

Design matrix. X=(xij)X=(x_{ij}) is the known n×pn\times p matrix whose element xijx_{ij} is the coefficient of the parameter βj\beta_j in E(Yi)E(Y_i). Its rows describe the conditions (the levels of factors or values of regressors) under which each observation is taken, which is why it is called the design matrix. For example, in E(Y1)=β1+β2E(Y_1)=\beta_1+\beta_2, E(Y2)=β1−β2E(Y_2)=\beta_1-\beta_2, the rows are (1,1)(1,1) and (1,−1)(1,-1). In regression its columns are the values of the regressors; in experimental designs they are 0–1 indicators of treatments and blocks.

Least squares principle. Estimate β\beta by the value that makes the observed YY as close as possible to its expectation XβX\beta, measured by the sum of squared deviations: minβS(β)=∑i=1n(Yi−∑jxijβj)2=(Y−Xβ)′(Y−Xβ).\min_\beta\ S(\beta)=\sum_{i=1}^n\Big(Y_i-\sum_jx_{ij}\beta_j\Big)^2=(Y-X\beta)'(Y-X\beta). It requires no distributional assumption, and for the Gauss–Markov model it gives BLUEs of all estimable functions.

Normal equations. S(β)=Y′Y−2β′X′Y+β′X′Xβ,∂S∂β=−2X′Y+2X′Xβ=0,S(\beta)=Y'Y-2\beta'X'Y+\beta'X'X\beta,\qquad\frac{\partial S}{\partial\beta}=-2X'Y+2X'X\beta=0, so X′Xβ̂=X′Y,i.e.∑ixik(Yi−∑jxijβ̂j)=0,k=1,…,p.X'X\hat\beta=X'Y,\qquad\text{i.e.}\qquad\sum_i x_{ik}\Big(Y_i-\sum_jx_{ij}\hat\beta_j\Big)=0,\quad k=1,\dots,p . These pp linear equations are the normal equations: they say that the residual vector Y−Xβ̂Y-X\hat\beta is normal (orthogonal) to every column of XX. They are always consistent. If rank(X)=p\text{rank}(X)=p, the solution is unique, β̂=(X′X)−1X′Y\hat\beta=(X'X)^{-1}X'Y; otherwise there are many solutions, β̂=(X′X)−X′Y\hat\beta=(X'X)^-X'Y, but they give the same fitted values and the same estimates of estimable functions.

✓ Derivation checked step by step Every step was checked: the definition of the design matrix, the least squares criterion and the derivation of X′Xβ = X′Y.

↑ Back to the question list

Identify, giving reasons, which of the following models are linear? Wherever possible, suggest a transformation Zi=g(Yi) that will result in a linear model for Zi: (i) Yi=β1+β2xi2+ei (ii) Yi=β1+β2xi+ei2

2000 · Paper I · Q5b · 12 marks

Solution

Linear model. A model is linear if E(Yi)E(Y_i) is a linear function of the parameters (not necessarily of xx), and the error enters additively with mean zero: Yi=∑jβjfj(xi)+eiY_i=\sum_j\beta_jf_j(x_i)+e_i, E(ei)=0E(e_i)=0.

(i) Yi=β1+β2xi2+eiY_i=\beta_1+\beta_2x_i^2+e_i. Linear. It is linear in β1,β2\beta_1,\beta_2; the regressor is simply zi=xi2z_i=x_i^2. No transformation of YY is needed: take Zi=YiZ_i=Y_i and regress it on xi2x_i^2.

(ii) Yi=β1+β2xi+ei2Y_i=\beta_1+\beta_2x_i+e_i^2. It is linear in β1,β2\beta_1,\beta_2, but it is not a linear model in the standard form, because the error term ei2e_i^2 is non-negative and has non-zero mean, E(ei2)=σ2E(e_i^2)=\sigma^2 (if E(ei)=0E(e_i)=0). So E(Yi)=β1+σ2+β2xiE(Y_i)=\beta_1+\sigma^2+\beta_2x_i: the intercept β1\beta_1 cannot be separated from σ2\sigma^2, and the error is skewed (under normal eie_i, ei2/σ2∼χ12e_i^2/\sigma^2\sim\chi^2_1). No transformation Zi=g(Yi)Z_i=g(Y_i) turns it into a model in β1\beta_1 with zero-mean errors. It can be rewritten as Yi=γ+β2xi+ui,γ=β1+σ2,ui=ei2−σ2,E(ui)=0,Y_i=\gamma+\beta_2x_i+u_i,\qquad\gamma=\beta_1+\sigma^2,\quad u_i=e_i^2-\sigma^2,\quad E(u_i)=0, a linear model in (γ,β2)(\gamma,\beta_2) with errors of variance 2σ42\sigma^4 (under normality). Least squares then estimates β2\beta_2 and γ\gamma without bias, but β1\beta_1 is not identifiable unless σ2\sigma^2 is known, and normal-theory tests do not apply.

(For contrast, a model such as Yi=β1eβ2xiεiY_i=\beta_1e^{\beta_2x_i}\varepsilon_i is non-linear but becomes linear under Zi=logYiZ_i=\log Y_i: Zi=logβ1+β2xi+logεiZ_i=\log\beta_1+\beta_2x_i+\log\varepsilon_i.)

✓ Answer checked step by step We checked each model for linearity in the parameters and the behaviour of the error term.

↑ Back to the question list

Consider the following linear model y1=θ1+θ4+θ5+e1y2=θ2−θ4+e2y3=θ3+2θ5+e3y4=θ1+θ2+2θ5+e4y5=θ1+θ3+θ4−e5 Where ei’s are i.i.d. N(0,σ2) variables (i) Show that ∑i=15liθi is estimable if and only if l4=l1−l2 and l5=l1+l2−2l3. (ii) Obtain the BLUe of θ1+θ2+θ3 and θ3−2θ5

2000 · Paper I · Q6a · 10 marks

Solution

Note on the question. With the model as printed, the design matrix has rank 4, not 3, so only the first condition, l4=l1−l2l_4=l_1-l_2, is needed for estimability. The second condition, l5=l1+l2−2l3l_5=l_1+l_2-2l_3, is not necessary: for example θ5\theta_5 alone is estimable although l5=1≠l1+l2−2l3=0l_5=1\ne l_1+l_2-2l_3=0. Part (ii) is unaffected, because both functions asked about satisfy both conditions. (The sign of e5e_5 does not matter, since −e5-e_5 has the same mean and variance.)

Design matrix (columns θ1,…,θ5\theta_1,\dots,\theta_5): X=(10011010−10001021100210110).X=\begin{pmatrix}1&0&0&1&1\\0&1&0&-1&0\\0&0&1&0&2\\1&1&0&0&2\\1&0&1&1&0\end{pmatrix}. |X|=0|X|=0 and rankX=4\text{rank}\,X=4. The null space of XX is spanned by v=(−1,1,0,1,0)′v=(-1,1,0,1,0)': check Xv=(−1+1,1−1,0,−1+1,−1+1)′=0Xv=(-1+1,\ 1-1,\ 0,\ -1+1,\ -1+1)'=0.

(i) Estimability. l′θl'\theta is estimable iff ll lies in the row space of XX, which is the orthogonal complement of the null space. So l′θestimable⇔l′v=−l1+l2+l4=0⇔l4=l1−l2.l'\theta\ \text{estimable}\iff l'v=-l_1+l_2+l_4=0\iff l_4=l_1-l_2 . This is necessary and sufficient as the model is printed.

(ii) BLUEs. Both functions satisfy l4=l1−l2l_4=l_1-l_2, so both are estimable. The BLUE of l′θl'\theta is c′yc'y with c=X(X′X)−lc=X(X'X)^-l, the unique unbiased coefficient vector in the column space of XX.

θ1+θ2+θ3\theta_1+\theta_2+\theta_3, l=(1,1,1,0,0)l=(1,1,1,0,0): θ1+θ2+θ3̂=−4y1+15y2−y3+3y4+19y518,V=179σ2.\widehat{\theta_1+\theta_2+\theta_3}=\frac{-4y_1+15y_2-y_3+3y_4+19y_5}{18},\qquad V=\frac{17}9\sigma^2 . (Check: the coefficient of θ1\theta_1 is (−4+3+19)/18=1(-4+3+19)/18=1, of θ2\theta_2 (15+3)/18=1(15+3)/18=1, of θ3\theta_3 (−1+19)/18=1(-1+19)/18=1, of θ4\theta_4 (−4−15+19)/18=0(-4-15+19)/18=0, of θ5\theta_5 (−4−2+6)/18=0(-4-2+6)/18=0.)

θ3−2θ5\theta_3-2\theta_5, l=(0,0,1,0,−2)l=(0,0,1,0,-2): θ3−2θ5̂=−20y1+21y2−5y3−21y4+41y536,V=8336σ2.\widehat{\theta_3-2\theta_5}=\frac{-20y_1+21y_2-5y_3-21y_4+41y_5}{36},\qquad V=\frac{83}{36}\sigma^2 . (Check: θ3\theta_3: (−5+41)/36=1(-5+41)/36=1; θ5\theta_5: (−20−10−42)/36=−2(-20-10-42)/36=-2; the others give 0.)

Error SS. There is n−r=1n-r=1 error df. The error function is 4y1+3y2+y3−3y4−y54y_1+3y_2+y_3-3y_4-y_5 (its coefficient vector is orthogonal to every column of XX), so SSE=(4y1+3y2+y3−3y4−y5)236,σ̂2=SSE.\text{SSE}=\frac{(4y_1+3y_2+y_3-3y_4-y_5)^2}{36},\qquad\hat\sigma^2=\text{SSE}.

✓ Checked by computer We checked in Python: the design matrix has rank 4 with null vector (−1, 1, 0, 1, 0), the two BLUEs have coefficients (−4, 15, −1, 3, 19)/18 and (−20, 21, −5, −21, 41)/36 with variances 17σ²/9 and 83σ²/36, and the error SS is (4y₁ + 3y₂ + y₃ − 3y₄ − y₅)²/36.

↑ Back to the question list

State and prove Gauss-Markoff theorem.

1999 · Paper I · Q9a · 30 marks

Solution

Gauss–Markov theorem. In the linear model Y=Xβ+ε,E(ε)=0,D(ε)=σ2In,Y=X\beta+\varepsilon,\qquad E(\varepsilon)=0,\qquad D(\varepsilon)=\sigma^2I_n, with XX (n×pn\times p) known, the least squares estimator l′β̂l'\hat\beta of any estimable function l′βl'\beta is the best linear unbiased estimator (BLUE): it has the smallest variance among all linear unbiased estimators of l′βl'\beta. Here β̂\hat\beta is any solution of X′Xβ̂=X′YX'X\hat\beta=X'Y.

Proof (full rank, so β̂=(X′X)−1X′Y\hat\beta=(X'X)^{-1}X'Y; the general case uses a generalised inverse in the same way).

Step 1: linear and unbiased. l′β̂=a′Yl'\hat\beta=a'Y with a=X(X′X)−1la=X(X'X)^{-1}l, and E(a′Y)=l′(X′X)−1X′Xβ=l′β.E(a'Y)=l'(X'X)^{-1}X'X\beta=l'\beta .

Step 2: any other linear unbiased estimator. Let b′Yb'Y be unbiased for l′βl'\beta: b′Xβ=l′βb'X\beta=l'\beta for all β\beta, so X′b=lX'b=l. Write d=b−ad=b-a. Then X′d=X′b−X′a=l−X′X(X′X)−1l=0X'd=X'b-X'a=l-X'X(X'X)^{-1}l=0.

Step 3: orthogonality. a′d=l′(X′X)−1X′d=0.a'd=l'(X'X)^{-1}X'd=0 .

Step 4: compare variances. V(b′Y)=σ2b′b=σ2(a+d)′(a+d)=σ2(a′a+d′d)≥σ2a′a=V(l′β̂),V(b'Y)=\sigma^2b'b=\sigma^2(a+d)'(a+d)=\sigma^2(a'a+d'd)\ \ge\ \sigma^2a'a=V(l'\hat\beta), with equality if and only if d=0d=0, i.e. b=ab=a. ◼\blacksquare

So l′β̂l'\hat\beta is the unique BLUE, with V(l′β̂)=σ2l′(X′X)−1lV(l'\hat\beta)=\sigma^2l'(X'X)^{-1}l. In matrix terms, for any linear unbiased estimator β̃=CY\tilde\beta=CY of β\beta, D(β̃)−D(β̂)D(\tilde\beta)-D(\hat\beta) is non-negative definite.

Remarks. The theorem needs only zero-mean, uncorrelated, equal-variance errors, not normality. It says nothing about non-linear or biased estimators. If D(ε)=σ2ΩD(\varepsilon)=\sigma^2\Omega, the BLUE is the generalised least squares estimator (Aitken’s theorem).

✓ Proof checked step by step Every step was checked: unbiasedness of l′β̂, the decomposition of any other unbiased coefficient vector, and the variance inequality.

↑ Back to the question list

y1,y2 and y3 are uncorrelated observations with a common variance σ2 and expectations E(y1)=θ1+θ2,E(y2)=θ1+θ3 and E(y3)=θ1+θ2 (i) Show l1θ1+l2θ2+l3θ3 that is estimable if and only if l1=l2+l3. (ii) Find an unbiased estimate of σ2.

1999 · Paper I · Q9b · 30 marks

Solution

Design. E(y1)=E(y3)=θ1+θ2E(y_1)=E(y_3)=\theta_1+\theta_2, E(y2)=θ1+θ3E(y_2)=\theta_1+\theta_3: X=(110101110),rank X=2.X=\begin{pmatrix}1&1&0\\1&0&1\\1&1&0\end{pmatrix},\qquad\text{rank }X=2 .

(i) Estimability. E(c′y)=(c1+c2+c3)θ1+(c1+c3)θ2+c2θ3E(c'y)=(c_1+c_2+c_3)\theta_1+(c_1+c_3)\theta_2+c_2\theta_3. Equating this to l′θl'\theta for all θ\theta: c1+c2+c3=l1,c1+c3=l2,c2=l3.c_1+c_2+c_3=l_1,\qquad c_1+c_3=l_2,\qquad c_2=l_3 . These are consistent if and only if l1=l2+l3l_1=l_2+l_3 (add the last two). If l1=l2+l3l_1=l_2+l_3, then c=(l2,l3,0)c=(l_2,l_3,0) works. So l1θ1+l2θ2+l3θ3l_1\theta_1+l_2\theta_2+l_3\theta_3 is estimable iff l1=l2+l3l_1=l_2+l_3. ◼\blacksquare

(ii) Unbiased estimate of σ2\sigma^2. The error space has dimension n−r=1n-r=1. The vector (1,0,−1)(1,0,-1) is orthogonal to every column of XX, so y1−y3y_1-y_3 is an error function: E(y1−y3)=0E(y_1-y_3)=0 and V(y1−y3)=2σ2V(y_1-y_3)=2\sigma^2. Hence SSE=(y1−y3)22,E(SSE)=V(y1−y3)2=σ2,\text{SSE}=\frac{(y_1-y_3)^2}2,\qquad E(\text{SSE})=\frac{V(y_1-y_3)}2=\sigma^2, so σ̂2=(y1−y3)22\hat\sigma^2=\frac{(y_1-y_3)^2}{2} is an unbiased estimate of σ2\sigma^2 (on 1 df). The same value follows from SSE=y′y−θ̂′X′y\text{SSE}=y'y-\hat\theta'X'y with any solution of the normal equations, e.g. θ̂=(0,y1+y32,y2)\hat\theta=(0,\frac{y_1+y_3}2,y_2).

✓ Checked by computer We checked: the row space of X is spanned by (1, 1, 0) and (1, 0, 1), giving l₁ = l₂ + l₃, and the error SS is (y₁ − y₃)²/2 on 1 df.

↑ Back to the question list

Discuss least square estimate and show that least-square estimates are the same as the best linear estimates in linear estimation.

1998 · Paper I · Q9a · 20 marks

Solution

Least squares estimate. In the linear model Y=Xβ+εY=X\beta+\varepsilon, E(ε)=0E(\varepsilon)=0, D(ε)=σ2ID(\varepsilon)=\sigma^2I, a least squares estimate of β\beta is any β̂\hat\beta that minimises S(β)=(Y−Xβ)′(Y−Xβ),S(\beta)=(Y-X\beta)'(Y-X\beta), equivalently any solution of the normal equations X′Xβ̂=X′YX'X\hat\beta=X'Y. The least squares estimate of an estimable function l′βl'\beta is l′β̂l'\hat\beta, which is the same for every solution β̂\hat\beta. Geometrically, Xβ̂X\hat\beta is the orthogonal projection of YY onto the estimation space 𝒞(X)\mathcal C(X), and the residual Y−Xβ̂Y-X\hat\beta lies in the error space.

Least squares estimates are best linear unbiased estimates. Let l′βl'\beta be estimable, so l=X′cl=X'c for some cc.

  1. Linear and unbiased. Let a=X(X′X)−la=X(X'X)^-l; it lies in 𝒞(X)\mathcal C(X), and l′β̂=a′Yl'\hat\beta=a'Y. Since l′(X′X)−X′X=l′l'(X'X)^-X'X=l' for estimable ll, E(a′Y)=l′(X′X)−X′Xβ=l′βE(a'Y)=l'(X'X)^-X'X\beta=l'\beta.
  2. Any other linear unbiased estimator b′Yb'Y has X′b=l=X′aX'b=l=X'a, so d=b−ad=b-a satisfies X′d=0X'd=0: dd is orthogonal to 𝒞(X)\mathcal C(X), and in particular to a∈𝒞(X)a\in\mathcal C(X).
  3. Variance. V(b′Y)=σ2(a+d)′(a+d)=σ2(a′a+d′d)≥σ2a′a=V(l′β̂).V(b'Y)=\sigma^2(a+d)'(a+d)=\sigma^2(a'a+d'd)\ge\sigma^2a'a=V(l'\hat\beta). So the least squares estimate has the minimum variance among all linear unbiased estimators, and it is the only one that attains it. ◼\blacksquare

Conclusion. In linear estimation, the least squares estimate of every estimable parametric function coincides with its best linear unbiased estimate. This is the Gauss–Markov theorem; it holds without any distributional assumption, but requires uncorrelated errors with equal variance. (With unequal variances or correlations, the best estimates are weighted or generalised least squares estimates.)

✓ Answer checked step by step Every step was checked: the least squares principle and the Gauss–Markov proof that least squares estimates of estimable functions are the best linear unbiased estimates.

↑ Back to the question list

For the model y=Xβ+e, we have β̂=(X′X)−1X′y, E(β̂−β)(β̂−β)′=σ2(X′X)−1, then test statistic F=Q2(β0)p/Q1n−p for H0:β=β0, where Q1=(y−Xβ̂)′(y−Xβ̂), Q2=(X′e)′(X′X)−1(X′e), e=(y−Xβ0), find the distribution of F and state its properties.

1998 · Paper I · Q10b · 25 marks

Solution

Note. Assume e∼Nn(0,σ2I)e\sim N_n(0,\sigma^2I), XX of order n×pn\times p and rank pp.

Rewriting Q2Q_2. With e=y−Xβ0e=y-X\beta_0, X′e=X′y−X′Xβ0=X′X(β̂−β0),X'e=X'y-X'X\beta_0=X'X(\hat\beta-\beta_0), so Q2(β0)=(β̂−β0)′X′X(X′X)−1X′X(β̂−β0)=(β̂−β0)′X′X(β̂−β0).Q_2(\beta_0)=(\hat\beta-\beta_0)'X'X(X'X)^{-1}X'X(\hat\beta-\beta_0)=(\hat\beta-\beta_0)'X'X(\hat\beta-\beta_0). Also Q2=e′HeQ_2=e'He with H=X(X′X)−1X′H=X(X'X)^{-1}X', and Q1=y′(I−H)y=e′(I−H)eQ_1=y'(I-H)y=e'(I-H)e (since (I−H)X=0(I-H)X=0).

Distributions.

  1. β̂∼Np(β,σ2(X′X)−1)\hat\beta\sim N_p(\beta,\sigma^2(X'X)^{-1}), so (β̂−β)′X′X(β̂−β)/σ2∼χp2(\hat\beta-\beta)'X'X(\hat\beta-\beta)/\sigma^2\sim\chi^2_p. Under H0:β=β0H_0:\beta=\beta_0, Q2/σ2∼χp2Q_2/\sigma^2\sim\chi^2_p.
  2. Q1/σ2∼χn−p2Q_1/\sigma^2\sim\chi^2_{n-p}, since I−HI-H is idempotent of rank n−pn-p.
  3. Q1Q_1 is a function of (I−H)y(I-H)y and Q2Q_2 a function of β̂\hat\beta; these are jointly normal and uncorrelated (Cov(β̂,(I−H)y)=σ2(X′X)−1X′(I−H)=0\text{Cov}(\hat\beta,(I-H)y)=\sigma^2(X'X)^{-1}X'(I-H)=0), so they are independent. (Equivalently, H(I−H)=0H(I-H)=0.)

Hence, under H0H_0, F=Q2(β0)/pQ1/(n−p)∼Fp,n−p.F=\frac{Q_2(\beta_0)/p}{Q_1/(n-p)}\sim F_{p,\,n-p}. We reject H0:β=β0H_0:\beta=\beta_0 at level α\alpha if F>Fα(p,n−p)F>F_\alpha(p,n-p).

Properties.

  1. Non-null distribution. In general, Q2(β0)/σ2Q_2(\beta_0)/\sigma^2 is non-central χp2\chi^2_p with non-centrality λ=(β−β0)′X′X(β−β0)/σ2\lambda=(\beta-\beta_0)'X'X(\beta-\beta_0)/\sigma^2, so FF has the non-central Fp,n−p(λ)F_{p,n-p}(\lambda) distribution. Its power increases with λ\lambda, and λ=0\lambda=0 exactly when β=β0\beta=\beta_0.
  2. Mean. E(F)=n−pn−p−2(1+λp)E(F)=\frac{n-p}{n-p-2}\big(1+\frac\lambda p\big) for n−p>2n-p>2, which equals n−pn−p−2\frac{n-p}{n-p-2} under H0H_0.
  3. Likelihood ratio. FF is equivalent to the likelihood ratio test of H0H_0: λLR2/n=Q1Q1+Q2=(1+pn−pF)−1\lambda_{LR}^{2/n}=\frac{Q_1}{Q_1+Q_2}=\big(1+\frac{p}{n-p}F\big)^{-1}.
  4. Confidence region. {β0:F≤Fα(p,n−p)}\{\beta_0:F\le F_\alpha(p,n-p)\} is the 100(1−α)%100(1-\alpha)\% confidence ellipsoid for β\beta, (β̂−β)′X′X(β̂−β)≤ps2Fα(\hat\beta-\beta)'X'X(\hat\beta-\beta)\le ps^2F_\alpha.
  5. Invariance. FF does not change if the scale of yy or the parametrisation of XX is changed (non-singular transformation of the columns), and it is free of σ2\sigma^2.
  6. For p=1p=1, F=t2F=t^2 with t=(β̂−β0)/SE(β̂)t=(\hat\beta-\beta_0)/\text{SE}(\hat\beta).

✓ Derivation checked step by step Every step was checked: Q₂(β₀) = (β̂ − β₀)′X′X(β̂ − β₀), the chi-square distributions of Q₁ and Q₂, their independence and the non-central F under H₁.

↑ Back to the question list

In connection with the problem of linear estimation, explain the terms ‘estimable parametric function’, ‘error function’ and ‘best linear unbiased estimator (BLUE)’.

1997 · Paper I · Q9a · 24 marks

Solution

Set-up. The linear model (Y,Xβ,σ2I)(Y,X\beta,\sigma^2I): E(Y)=XβE(Y)=X\beta, D(Y)=σ2InD(Y)=\sigma^2I_n, with XX (n×pn\times p) of rank rr.

Estimable parametric function. A linear parametric function l′βl'\beta is estimable if it has at least one linear unbiased estimator, i.e. there is cc with E(c′Y)=l′βfor all β⇔X′c=l.E(c'Y)=l'\beta\ \ \text{for all }\beta\quad\Longleftrightarrow\quad X'c=l . So l′βl'\beta is estimable iff ll lies in the row space of XX, equivalently rank(X′)=rank(X′⋮l)\text{rank}(X')=\text{rank}(X'\,\vdots\,l). If r=pr=p, every l′βl'\beta is estimable. Example: in E(Y1)=β1+β2E(Y_1)=\beta_1+\beta_2, E(Y2)=β1+β2E(Y_2)=\beta_1+\beta_2, the function β1+β2\beta_1+\beta_2 is estimable but β1\beta_1 is not.

Error function. A linear function c′Yc'Y is an error function (a linear zero function) if E(c′Y)=0for all β⇔X′c=0.E(c'Y)=0\ \ \text{for all }\beta\quad\Longleftrightarrow\quad X'c=0 . Its coefficient vector is orthogonal to the columns of XX; the error functions form the error space of dimension n−rn-r. They carry information only about σ2\sigma^2: the residual SS is the sum of squares of n−rn-r orthonormal error functions, and E(SSE)=(n−r)σ2E(\text{SSE})=(n-r)\sigma^2. Example: if E(Y1)=E(Y2)=μE(Y_1)=E(Y_2)=\mu, then Y1−Y2Y_1-Y_2 is an error function.

Best linear unbiased estimator (BLUE). A linear function c′Yc'Y is the BLUE of an estimable l′βl'\beta if

  1. it is unbiased, E(c′Y)=l′βE(c'Y)=l'\beta for all β\beta; and
  2. V(c′Y)≤V(b′Y)V(c'Y)\le V(b'Y) for every other linear unbiased estimator b′Yb'Y of l′βl'\beta.

By the Gauss–Markov theorem the BLUE exists, is unique, equals l′β̂l'\hat\beta for any solution of the normal equations X′Xβ̂=X′YX'X\hat\beta=X'Y, has coefficient vector in the column space of XX, is uncorrelated with every error function, and has variance σ2l′(X′X)−l\sigma^2l'(X'X)^-l.

✓ Answer checked step by step Every step was checked: the three definitions, the condition l ∈ C(X′) for estimability, the condition X′c = 0 for an error function, and the Gauss–Markov form of the BLUE.

↑ Back to the question list

Consider three independent random variables Y1, Y2 and Y3 having common variance σ2 and E(Y1)=2μ1+3μ2,E(Y1)=3μ1+4μ2andE(Y3)=4μ1+5μ2 Show that μ1 and μ2 are estimable. Find their best linear unbiased estimates.

1997 · Paper I · Q9b · 36 marks

Solution

Note on the question. The second expectation is printed as E(Y1)E(Y_1); it should read E(Y2)=3μ1+4μ2E(Y_2)=3\mu_1+4\mu_2.

Estimability. X=(233445),∣2334∣=8−9=−1≠0,X=\begin{pmatrix}2&3\\3&4\\4&5\end{pmatrix},\qquad\begin{vmatrix}2&3\\3&4\end{vmatrix}=8-9=-1\ne0, so rank(X)=2\text{rank}(X)=2, the number of parameters. Hence the row space of XX is all of ℝ2\mathbb R^2, and every linear function of μ1,μ2\mu_1,\mu_2, in particular μ1\mu_1 and μ2\mu_2 themselves, is estimable. (For example E(4Y1−3Y2)=(8−9)μ1+(12−12)μ2=−μ1E(4Y_1-3Y_2)=(8-9)\mu_1+(12-12)\mu_2=-\mu_1.)

Normal equations. X′X=(29383850),|X′X|=1450−1444=6,X′Y=(2Y1+3Y2+4Y33Y1+4Y2+5Y3).X'X=\begin{pmatrix}29&38\\38&50\end{pmatrix},\qquad|X'X|=1450-1444=6,\qquad X'Y=\begin{pmatrix}2Y_1+3Y_2+4Y_3\\3Y_1+4Y_2+5Y_3\end{pmatrix}. (X′X)−1=16(50−38−3829).(X'X)^{-1}=\frac16\begin{pmatrix}50&-38\\-38&29\end{pmatrix}.

BLUEs. μ̂1=50(2Y1+3Y2+4Y3)−38(3Y1+4Y2+5Y3)6=−14Y1−2Y2+10Y36=−7Y1−Y2+5Y33,\hat\mu_1=\frac{50(2Y_1+3Y_2+4Y_3)-38(3Y_1+4Y_2+5Y_3)}6=\frac{-14Y_1-2Y_2+10Y_3}6=\frac{-7Y_1-Y_2+5Y_3}3, μ̂2=−38(2Y1+3Y2+4Y3)+29(3Y1+4Y2+5Y3)6=11Y1+2Y2−7Y36.\hat\mu_2=\frac{-38(2Y_1+3Y_2+4Y_3)+29(3Y_1+4Y_2+5Y_3)}6=\frac{11Y_1+2Y_2-7Y_3}6 . (Check: E(μ̂1)=−7(2μ1+3μ2)−(3μ1+4μ2)+5(4μ1+5μ2)3=3μ1+03=μ1E(\hat\mu_1)=\frac{-7(2\mu_1+3\mu_2)-(3\mu_1+4\mu_2)+5(4\mu_1+5\mu_2)}3=\frac{3\mu_1+0}{3}=\mu_1.)

Variances. From σ2(X′X)−1\sigma^2(X'X)^{-1}: V(μ̂1)=506σ2=253σ2,V(μ̂2)=296σ2,Cov(μ̂1,μ̂2)=−193σ2.V(\hat\mu_1)=\frac{50}6\sigma^2=\frac{25}3\sigma^2,\qquad V(\hat\mu_2)=\frac{29}6\sigma^2,\qquad\text{Cov}(\hat\mu_1,\hat\mu_2)=-\frac{19}3\sigma^2 . The variances are large because the rows of XX are nearly collinear. The error SS is (Y1−2Y2+Y3)2/6(Y_1-2Y_2+Y_3)^2/6 on 1 df.

✓ Checked by computer We checked in Python: X′X = [[29, 38], [38, 50]] with determinant 6, μ̂₁ = (−7y₁ − y₂ + 5y₃)/3, μ̂₂ = (11y₁ + 2y₂ − 7y₃)/6, with variances 25σ²/3 and 29σ²/6.

↑ Back to the question list

With the usual Gauss-Markov linear model, define the estimation space and the error space. Obtain expressions for the SS due to error and the SS due to all possible BLUEs of parametric functions. Find the expectation of the former.

1996 · Paper I · Q9a · 30 marks

Solution

Model. (Y,Xβ,σ2In)(Y,X\beta,\sigma^2I_n), with XX of order n×pn\times p and rank rr. Let PP be the orthogonal projector onto 𝒞(X)\mathcal C(X), P=X(X′X)−X′P=X(X'X)^-X'.

Estimation space. The set of all BLUEs c′Yc'Y of estimable functions, or equivalently the space of their coefficient vectors, is the column space of XX: ℰ={c:c∈𝒞(X)},dimℰ=r.\mathcal E=\{c:c\in\mathcal C(X)\},\qquad\dim\mathcal E=r . (The BLUE of l′βl'\beta has its coefficient vector in 𝒞(X)\mathcal C(X).)

Error space. The set of all linear functions with zero expectation, E(c′Y)=0E(c'Y)=0 for all β\beta, i.e. X′c=0X'c=0: ℰ⊥={c:X′c=0},dimℰ⊥=n−r.\mathcal E^\perp=\{c:X'c=0\},\qquad\dim\mathcal E^\perp=n-r . The two spaces are orthogonal complements in ℝn\mathbb R^n, so every linear function of YY splits uniquely into a BLUE plus an error function, and BLUEs are uncorrelated with error functions.

SS due to error. Take an orthonormal basis c1,…,cn−rc_1,\dots,c_{n-r} of the error space. Then SSE=∑k=1n−r(ck′Y)2=Y′(I−P)Y=(Y−Xβ̂)′(Y−Xβ̂)=Y′Y−β̂′X′Y,\text{SSE}=\sum_{k=1}^{n-r}(c_k'Y)^2=Y'(I-P)Y=(Y-X\hat\beta)'(Y-X\hat\beta)=Y'Y-\hat\beta'X'Y, where β̂\hat\beta is any solution of the normal equations.

SS due to all BLUEs (the SS due to the parameters, or regression SS). With an orthonormal basis a1,…,ara_1,\dots,a_r of the estimation space, SS(β)=∑k=1r(ak′Y)2=Y′PY=β̂′X′Xβ̂=β̂′X′Y,r df.\text{SS}(\beta)=\sum_{k=1}^r(a_k'Y)^2=Y'PY=\hat\beta'X'X\hat\beta=\hat\beta'X'Y,\quad r\text{ df}. So Y′Y=β̂′X′Y+SSEY'Y=\hat\beta'X'Y+\text{SSE}.

Expectation of SSE. Each error function has E(ck′Y)=0E(c_k'Y)=0 and V(ck′Y)=σ2ck′ck=σ2V(c_k'Y)=\sigma^2c_k'c_k=\sigma^2, so E(ck′Y)2=σ2E(c_k'Y)^2=\sigma^2 and E(SSE)=(n−r)σ2.E(\text{SSE})=(n-r)\sigma^2 . (Equivalently, E{Y′(I−P)Y}=σ2tr(I−P)+β′X′(I−P)Xβ=σ2(n−r)+0E\{Y'(I-P)Y\}=\sigma^2\text{tr}(I-P)+\beta'X'(I-P)X\beta=\sigma^2(n-r)+0.) Hence σ̂2=SSE/(n−r)\hat\sigma^2=\text{SSE}/(n-r) is unbiased for σ2\sigma^2. Also E(β̂′X′Y)=rσ2+β′X′XβE(\hat\beta'X'Y)=r\sigma^2+\beta'X'X\beta.

✓ Derivation checked step by step Every step was checked: the definitions of the two spaces, SSE = Y′(I − P)Y, the SS due to BLUEs = Y′PY = β̂′X′Y, and E(SSE) = (n − r)σ².

↑ Back to the question list

Let l1′β̂ and l2′β̂ be the LS estimators of two estimable functions l1′β and l2′β respectively. Obtain the variances and covariances of the estimators.

1996 · Paper I · Q9b · 30 marks

Solution

Set-up. (Y,Xβ,σ2I)(Y,X\beta,\sigma^2I), with β̂=(X′X)−X′Y\hat\beta=(X'X)^-X'Y a solution of the normal equations (any generalised inverse; (X′X)−1(X'X)^{-1} in the full-rank case). l1′βl_1'\beta and l2′βl_2'\beta are estimable, so li=X′cil_i=X'c_i for some cic_i, and hence li′(X′X)−X′X=li′(since X(X′X)−X′X=X).l_i'(X'X)^-X'X=l_i'\qquad(\text{since }X(X'X)^-X'X=X).

The estimators as linear functions of YY. li′β̂=li′(X′X)−X′Y=ai′Y,ai=X{(X′X)−}′li.l_i'\hat\beta=l_i'(X'X)^-X'Y=a_i'Y,\qquad a_i=X\{(X'X)^-\}'l_i .

Covariance. Cov(l1′β̂,l2′β̂)=σ2a1′a2=σ2l1′(X′X)−X′X{(X′X)−}′l2.\text{Cov}(l_1'\hat\beta,\ l_2'\hat\beta)=\sigma^2a_1'a_2=\sigma^2l_1'(X'X)^-X'X\{(X'X)^-\}'l_2 . Using l1′(X′X)−X′X=l1′l_1'(X'X)^-X'X=l_1' and choosing a symmetric generalised inverse: Cov(l1′β̂,l2′β̂)=σ2l1′(X′X)−l2.\text{Cov}(l_1'\hat\beta,\ l_2'\hat\beta)=\sigma^2\,l_1'(X'X)^-l_2 .

Variances (put l1=l2l_1=l_2): V(l1′β̂)=σ2l1′(X′X)−l1,V(l2′β̂)=σ2l2′(X′X)−l2.V(l_1'\hat\beta)=\sigma^2l_1'(X'X)^-l_1,\qquad V(l_2'\hat\beta)=\sigma^2l_2'(X'X)^-l_2 .

Invariance. For estimable l1,l2l_1,l_2, the value of l1′(X′X)−l2l_1'(X'X)^-l_2 does not depend on which generalised inverse is used: writing li=X′cil_i=X'c_i, l1′(X′X)−l2=c1′X(X′X)−X′c2=c1′Pc2l_1'(X'X)^-l_2=c_1'X(X'X)^-X'c_2=c_1'Pc_2, and the projector PP is unique. In the full-rank case these reduce to σ2l1′(X′X)−1l1\sigma^2l_1'(X'X)^{-1}l_1, σ2l2′(X′X)−1l2\sigma^2l_2'(X'X)^{-1}l_2 and σ2l1′(X′X)−1l2\sigma^2l_1'(X'X)^{-1}l_2, the corresponding elements of D(β̂)=σ2(X′X)−1D(\hat\beta)=\sigma^2(X'X)^{-1}. They are estimated by replacing σ2\sigma^2 with s2=SSE/(n−r)s^2=\text{SSE}/(n-r).

✓ Derivation checked step by step Every step was checked: l′β̂ = c′Y with c = X(X′X)⁻l, the variance and covariance formulas, and their invariance to the choice of generalised inverse.

↑ Back to the question list

More on Linear Inference and Multivariate Analysis

Questions: UPSC Civil Services (Main) Examination, Statistics Paper I, 1996–2026. Solutions: Optional Province. Found an error? Tell us.

Spotted an error? Tell us.

We classify every PYQ with care, but mistakes can slip in. If a question is in the wrong topic, has a typo, the wrong year, or is missing, let us know. We review every report and update the page.

Report an Error
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted