One stop guide to computer science students for solved questions, Notes, tutorials, solved exercises, online quizzes, MCQs and more on DBMS, Advanced DBMS, Data Structures, Operating Systems, Machine learning, Natural Language Processing etc.
Top 10 Technical Linear Regression MCQs with Answers | Data Science Interview
Top 10 Technical Linear Regression MCQs with Answers | Data Science Interview
Top 10 Technical Linear Regression MCQs with Answers | Data Science Interview
1. In linear regression, what is the primary purpose of the cost function (usually MSE)?
A. To calculate the correlation coefficient
B. To measure how well the model predicts the output
C. To compute residuals only
D. To normalize the input features
Answer: B
Explanation:The cost function, typically Mean Squared Error (MSE), measures the difference between predicted and actual values; optimization algorithms minimize this to fit the best line.
2. Which of the following can cause the linear regression coefficients to become unstable?
A. High variance in Y
B. Large dataset
C. Small residuals
D. Multicollinearity among X variables
Answer: D
Explanation:Multicollinearity occurs when independent variables are highly correlated, making it difficult to isolate their individual effect, leading to unstable coefficients.
3. In multiple linear regression, the design matrix X is of shape (n, p). What does p represent?
A. Number of data points
B. Number of features (including bias term if added)
C. Predicted values
D. Residuals
Answer: B
Explanation:p represents the number of independent variables (features) in the regression model.
4. Gradient descent may fail to converge in linear regression if:
A. The learning rate is too high
B. The data is normalized
C. The residuals are small
D. There are too many features
Answer: A
Explanation:A high learning rate can cause overshooting of the minimum, preventing convergence.
5. Ridge regression differs from standard linear regression in that it:
A. Minimizes absolute residuals instead of squared residuals
B. Adds L2 regularization to penalize large coefficients
C. Works only with categorical variables
D. Eliminates all multicollinearity automatically
Answer: B
Explanation:Ridge regression adds an L2 penalty term to reduce overfitting and control coefficient magnitude.
6. What is the effect of heteroscedasticity on linear regression models?
A. It affects the efficiency of coefficient estimates
B. It biases the coefficient estimates
C. It changes the slope direction
D. It increases R² automatically
Answer: A
Explanation:Heteroscedasticity doesn’t bias coefficients but makes standard errors unreliable, affecting confidence intervals and hypothesis testing.
What is Heteroscedasticity?
Heteroscedasticity is a statistical property. It occurs when the variance of the residuals is not constant across all levels of the independent variable(s). In other words, the spread (or "scatter") of the residuals changes as the predicted value or an independent variable changes. The opposite case, where residuals have constant variance, is called homoscedasticity.
7. Which technique can you use to check if a linear regression model is overfitting?
A. Check R² on training data only
B. Evaluate model performance on a separate validation/test set
C. Compute residual sum of squares only
D. Increase learning rate
Answer: B
Explanation:Overfitting is detected by poor performance on unseen data compared to training data.
8. What is the closed-form solution (normal equation) for β in linear regression?
A. β = XᵀXy
B. β = X⁻¹y
C. β = (XᵀX)⁻¹ Xᵀy
D. β = yX
Answer: C
Explanation:The normal equation provides the optimal coefficient vector:
9. In linear regression, adding irrelevant features typically:
A. Reduces bias and increases variance
B. Increases R² but may reduce generalization
C. Decreases all residuals to zero
D. Has no effect on coefficients
Answer: B
Explanation:Irrelevant features may artificially increase R² but often reduce performance on new data (overfitting).
10. The p-value associated with a coefficient in linear regression indicates:
A. The probability that the coefficient is exactly zero
B. The R² of the model
C. The magnitude of the residuals
D. The significance of that feature in explaining Y
Answer: D
Explanation:A low p-value (<0.05) suggests that the corresponding predictor significantly contributes to explaining the variability in Y.
No comments:
Post a Comment