Question 1
Cheat Sheet:
- For a linear model:
where, 's are uncorrelated with mean 0 and variance .
- Residual sum of square; RSS .
- .
- Total sum of square; TSS .
- Coefficient of Determination; .
- In hypothesis testing, if p-value is less than the significance level , i.e. (p-value ), then there is evidence to reject the null hypothesis.
- Consider a simple linear model given by
where, .
The least square estimates of and are given as
Prove that and are unbiased estimates of and respectively. [5 Marks]
- Consider a linear model as
where, .
Let and be two linear estimators of , where is a constant.
(i) Find the value of such that is an unbiased estimator of . [3 Marks]
(ii) Which among the two estimators, and , would you choose to use? Justify. [5 Marks]
- A university professor wants to understand how students' performance in a Data Science course (measured by a quiz marks ‘’) depend on their study habits. The Professor collects the data which contains the three variables : “Hours of self study per week”, “Hours spent watching recorded lectures” and “Quiz marks”. The target variable is “Quiz marks (out of 10)”, while the remaining two variables are predictors. Each variable has 5 observations.
Consider the following R code and output.
x1 = c(1,2,3,4,5)x2 = c(1,3,2,4,5)y = c(2,4,5,4,5)model_1 = lm(y~x1)summary(model_1)model_2 = lm(y~x2)summary(model_2)model_3 = lm(y~x1+x2)summary(model_3)
## Output-1Call:lm(formula = y ~ x1)
Residuals: 1 2 3 4 5-0.8 0.6 1.0 -0.6 -0.2
Coefficients: Estimate Std. Error t value Pr(>|t|)(Intercept) 2.2000 0.9381 2.345 0.101x1 0.6000 0.2828 2.121 0.124
Residual standard error: 0.8944 on 3 degrees of freedomMultiple R-squared: 0.6, Adjusted R-squared: 0.4667F-statistic: 4.5 on 1 and 3 DF, p-value: 0.124
## Output-2Call:lm(formula = y ~ x2)
Residuals: 1 2 3 4 5-1.000e+00 -4.996e-16 1.500e+00 -5.000e-01 0.000e+00
Coefficients: Estimate Std. Error t value Pr(>|t|)(Intercept) 2.5000 1.1328 2.207 0.114x2 0.5000 0.3416 1.464 0.239
Residual standard error: 1.08 on 3 degrees of freedomMultiple R-squared: 0.4167, Adjusted R-squared: 0.2222F-statistic: 2.143 on 1 and 3 DF, p-value: 0.2394
## Output 3
Call:lm(formula = y ~ x1 + x2)
Residuals: 1 2 3 4 5-0.8421 0.7895 0.7895 -0.5789 -0.1579
Coefficients: Estimate Std. Error t value Pr(>|t|)(Intercept) 2.2632 1.1526 1.963 0.189x1 0.7895 0.7807 1.011 0.418x2 -0.2105 0.7807 -0.270 0.813
Residual standard error: 1.076 on 2 degrees of freedomMultiple R-squared: 0.614, Adjusted R-squared: 0.2281F-statistic: 1.591 on 2 and 2 DF, p-value: 0.386Based on the given information, answer the following subquestions.
(i) Write the fitted linear regression model for all the different models. [3 Marks]
(ii) Write null and alternative hypotheses for the first model and check if we can reject the null hypothesis at 5% significance level, i.e., . Also, what can you conclude about the relationship between the variables Hours of self study per week and Quiz marks. [3 Marks]
(iii) Interpret for the first two models and explain which model will perform better. [2 Marks]
- Consider a linear model as
where, .
(i). Find the value of for which RSS (Residual Sum of Squares) will be minimum. Provide all the steps. [3 Marks]
(ii). Find the value of . [2 Marks ]
(iii). Suppose for the model . Find bias [2 Marks]
- Define Linear Zero Estimators. [2 Marks]
I have written answers on the answer sheets
Not applicable
