STAT 3503A, Regression Analysis, Summer 2023 Assignment 1
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
STAT 3503A, Regression Analysis, Summer 2023
Assignment 1
Total number of questions: 4; Total marks: 45
Assigned on June 3, 2023; Due at 1:00 pm on June 12, 2023
In all the questions, we consider the simple linear regression (LS) model
y = β0 + β1x + ϵ,
and assume that all assumptions about ϵ are satisfied, i.e., ϵi I N (0, σ2 ). The least-squares (LS) estimators of β0 and β 1 are denoted as βˆ0 and βˆ1 , respectively. Define
n
SXX = 工 (xi − )2 .
i=1
Questions:
1. Prove the following conclusions:
(a) [3] βˆ1 is an unbiased estimator of β 1;
(b) [4] Var (βˆ1 ) = ;
(c) [3] βˆ0 is an unbiased estimator of β0 .
2. [5] Let yˆi = βˆ0 + βˆ1xi , i = 1, . . . , n,
n n n
TSS = 工 (yi − y¯)2 , SSR = 工 (yˆi − y¯)2 , and SSE = 工 (yi − yˆi )2 .
i=1 i=1 i=1
Prove that
TSS = SSR + SSE .
3. [5] It is known that
βˆ1 − β1
s一.e. (βˆ1 ) ∼ tn −2 ,
where s一.e.(βˆ1 ) =^(n S(E)XX . Based on this fact, show that a (1 − α)th, 0 < α < 1, confidence interval for β 1 is given by ( βˆ1 − tn −2; α/2 · s一.e.(βˆ1 ), βˆ1 + tn −2; α/2 · s一.e.(βˆ1 )).
That is, show that
Pr ( βˆ1 − tn −2; α/2 · s一.e.(βˆ1 ) < β 1 < βˆ1 + tn −2; α/2 · s一.e.(βˆ1 )) = 1 − α .
4. A dataset is contained in the file “production.txt”. The dateset has two variables named RunTime and RunSize. We will treat RunTime as a response variable y and Runsize as an independent variable x. Consider a simple linear regression (SLR) model for y and x.
(a) [2] Generate a scatter plot between x and y using R, and breifly comment whether a SLR model for y and x seems to be appropriate.
For all the rest subquestions, we assume the SLR model and all the associated assump-
tions hold.
Answer (b)– (f) using manual calculation with details.
(b) [4] Find the LS estimators of β0 and β 1 as well as the estimated s.e.’s of these LS estimators.
(c) [4] Use a t-test to test whether x is useful for explaining or predicting y at 0.05th level.
(d) [3] Construct a 95% confidence interval for β0 . (e) [4] Test the following hypotheses at 0.10th level:
H0 : β0 = 140 VS Ha : β0 140.
(f) [4] Establish the ANOVA table for SLR and use F-test to test whether x is useful for explaining or predicting y at 0.1th level.
(g) [4] Use the lm() function of R to obtain the results for (b), (c), (d) and (f). Attach your R code and summary of your model fit (the output of the summary() function) at the end of your paper. Briefly comment if you obtain the same results using R compared to your manual calculation.
2023-06-12