prepare a question paper for testing linear regression concepts in python
- User
prepare a question paper for testing linear regression concepts in python
Assistant
Below is a sample question paper designed to test concepts of Linear Regression using Python. This paper includes a mix of theoretical, interpretative, and practical coding questions to comprehensively assess the candidate's understanding.
Linear Regression in Python Question Paper
Section A: Multiple Choice Questions (30 points, 3 points each)
-
Assumption of Linear Regression:
- a) Homoscedasticity and Multicollinearity
- b) Homoscedasticity and No Multicollinearity
- c) Heteroscedasticity and Multicollinearity
- d) Heteroscedasticity and No Multicollinearity
-
Which Python library is primarily used for Linear Regression?
- a) NumPy
- b) pandas
- c) Scikit-learn
- d) Matplotlib
-
Interpretation of the Slope (β1) in Simple Linear Regression:
- a) Change in the dependent variable for a one-unit change in the independent variable, while all other variables are held constant.
- b) Change in the independent variable for a one-unit change in the dependent variable.
- c) The strength of the linear relationship between the variables.
- d) The accuracy of the model.
-
What does R-squared (Coefficient of Determination) measure?
- a) The strength and direction of the linear relationship between variables.
- b) The proportion of the variance in the dependent variable that is predictable from the independent variable(s).
- c) The accuracy of predictions in terms of errors.
- d) The complexity of the model.
-
Handling Missing Values in a Dataset Before Applying Linear Regression:
- a) Always drop the rows with missing values.
- b) Always impute missing values with the mean.
- c) Strategy depends on the nature and amount of missing data (e.g., imputation, interpolation, or removal).
- d) Missing values must be addressed appropriately as they can significantly affect model performance.
-
Cross-Validation in Linear Regression:
- a) Used to increase the complexity of the model.
- b) Techniques for evaluating the model’s performance on unseen data.
- c) Method to handle imbalanced datasets.
- d) Approach to feature engineering.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.