Mid Sem Exam
Mid Sem Exam
Instructions
1
1. (6 points) Consider the following data where x represents the independent variable and
y represents the dependent variable.
Answer the following questions in relation to the linear regression model y = β0 +β1 x+.
(a) Find the estimates of the simple linear regression coefficients. [2 Marks]
(b) Test the hypothesis for regression coefficients β0 and β1 . For which parameter the
null hypothesis is rejected and at what significance level ? [2 Marks]
(c) Find the R2 and sum of squared residual errors. [1 Mark]
(d) Estimate the error term variance σ 2 . [1 Mark]
2. (8 points) Consider the given data, namely “LDA Data”, where age and estimated
salary are independent variables (or features) and purchased is dependent variable (or
label). Assuming the LDA model, estimate the following:
(a) Estimate the probability that a student who studies for 40 h and has an undergrad
CGPA of 3.5 gets an A in the class. [2 Mark]
(b) How many hours would the student in part (a) need to study to have a 50% chance
of getting an A in the class? [2 Marks]
4. (5 points) For the given data using KNN algorithm for K = 3 (i.e. number of neighbors
are 3), predict the value of (29, 10, 7). Mention all the necessary steps. Use Euclidean
distance for identifying the neighbors. [5 Marks]
6. (3 points) For the Polynomial Regression data fit a degree 4 polynomial regression
model between Level (independent variable) and Salary (dependent variable). Predict
the expected Salary at Level 11. [3 Marks]