



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




(a) Find the least squares estimators of β 0 and β 1 and an unbiased estima- tor of σ^2.
(b) Show that the test of H 0 : β 1 = 0 is the usual two sample Student t test for the equality of means.
Solution. (a)
∑^1
i=
∑^ n
j=
(Yij − β 0 − β 1 xi)^2 =
∑^1
i=
∑^ n
j=
(Yij − Y¯i· + Y¯i· − β 0 − β 1 xi)^2
∑^1
i=
∑^ n
j=
(Yij − Y¯i·)^2 + n( Y¯ 0 · − β 0 )^2 + n( Y¯ 1 · − β 0 − β 1 )^2
Here we use the fact that xi is either zero or one. Obviously S is minimized if β 0 = Y¯ 0 · and β 0 + β 1 = Y¯ 1 ·. Then the least squares estimates are βˆ 0 = Y¯ 0 · and βˆ 1 = Y¯ 1 · − Y¯ 0 ·. The estimator of the variance is s^2 = ∑ ∑(Yij − Y¯i·)^2 /(2n − 2). In matrix terms, let (^1) n denote an n-dimensional vector with all compo- nents equal to 1. Then
[ (^1) n 0 n (^1) n 1 n
] ; XT^ X =
[ 2 n n n n
] ; XT^ Y =
[ ∑ 1 i=
∑n ∑ j=1^ Yij n j=1 Y^1 j
] .
Then the estimates are given by (XT^ X)−^1 XT^ Y. (b) The test can be constructed in various ways. Note that Var βˆ 1 = 2 σ^2 /n and that s^2 is the usual pooled variance in the two sample Student t test. Therefore the test statistic based on the confidence interval method is
t = ( Y¯ 1 · − Y¯ 0 ·)/(s
√ 2 /n).
The null model is Yij = β 0 + εij and the least squares estimate is Y¯··. The numerator of the F statistic is n( Y¯ 0 · − Y¯··)^2 + n( Y¯ 1 · − Y¯··)^2 with 1 degree of freedom. After some algebra, this reduces to n( Y¯ 1 · − Y¯ 0 ·)^2 /2 so that F = t^2.
Case I x x – x x x
Case II x x –
Case III x x – x x –
In each case the symbol x indicates an observed factor combination, and the symbol – indicates an unobserved factor combination.
Solution. First note that E[Yij − Yij′ ] = βj − βj′. Therefore in Case I all differences βj − βj′^ are estimable because for some i, Yi,j and Yi,j′^ are both observed. A similar argument applies to αi − αi′. In Case II, α 1 − α 2 is estimated by Y 12 − Y 22 and α 2 − α 3 is estimated by Y 23 − Y 33. Then one can estimate α 1 − α 3 by (Y 12 − Y 22 ) + (Y 23 − Y 33 ). Similarly all differences of β’s are estimable. In Case III, α 1 − α 2 and β 1 − β 2 can be estimated as in Case I. To see that α 1 − α 3 is not estimable, suppose to the contrary that E[
∑ i
∑ j cij^ Yij^ ] = α 1 − α 3. Then the coefficient of β 3 must be zero in this expectation. But β 3 appears only in E[Y 33 ], so we must have c 33 = 0. But then the coefficient of α 3 is also zero, a contradiction. Similar arguments show that no contrasts involving α 3 or β 3 are estimable.
Solution. (a) Write N =
∑ i ni/N^ , Y¯^ =^
∑ i
∑ j Yij /N^ and ¯x^ =^
∑ i nixi/N^. Under H 0 we have a linear regression with least squares estimates
βˆ 1 =
∑k i=
∑ni ∑^ j=1(xi^ −^ x¯)Yij k i=1 ni(xi^ −^ x¯)^2
; βˆ 0 = Y¯ − βˆ 1 x.¯
Under the alternative ̂m(xi) = Y¯i·. Therefore the lack of fit test rejects for large values of
F =
( Y¯i· − Y¯ − βˆ 1 (xi − x¯))^2 /(k − 2) ∑ i
∑ j (Yij^ −^ Y¯i·)^2 /(N^ −^ k)^
which has the Fk− 2 ,N −k distribution if H 0 is true. (b) If no replicated observations are present, one can fit a more complex linear model and test whether the linear model fits as well as the complex model. For instance one might fit a low degree polynomial to the data and test whether the higher degree terms have coefficient zero. One can also examine residual plots and look for substantial departures from a “white noise” pattern. (c) The completed ANOVA table is the following.
Source Sum of Squares d.f. Mean Square Linear regression 69.31 1 69. Lack of fit 3309.93 4 827. Error 83.67 6 13. Corrected total 3462.91 11
The F statistic for lack of fit is 827. 48 / 13 .95 = 59.34, so we conclude that the linear model does not fit the data. Judging from the pattern in the data (large Y values in the middle and small values at the extremes of x), a quadratic term would greatly improve the fit.
Yij = β 0 + β 1 xi 1 + β 2 xi 2 + β 11 x^2 i 1 + β 22 x^2 i 2 + β 12 xi 1 xi 2 + eij
where n observations of Yij are made for each of the following combinations of (xi 1 , xi 2 ): (1, 1), (1, −1), (− 1 , 1), (− 1 , −1) and (0, 0).
(a) Assume n = 1 and β 11 = β 22 = 0. Write the model in matrix form. Which parameters, if any, are estimable?
(b) Under the assumptions of (a), compute a set of least squares estimates. How would your answers change if n > 1?
(c) If n > 1 and we make no assumptions about β 11 and β 22 , how would you estimate σ^2 = Var (eij )?
(d) Can you test H 0 : β 11 + β 22 = 0? You do not need to construct the test statistic, but describe how it could be constructed and state its distribution under H 0.
Solution. (a) In matrix form with n = 1 we have
β 0 β 1 β 2 β 12
Note that X has full rank since the columns are orthogonal. Therefore all parameters are estimable. (b) It is easy to see that
XT^ X = diag(5, 4 , 4 , 4); XT^ Y =
The least squares solution is
βˆ =