Docsity

WGU D600 – Statistical Data Mining Task 1 | Multiple Linear Regression Analysis | Complete, Exams of Nursing

Partial preview of the text

Download WGU D600 – Statistical Data Mining Task 1 | Multiple Linear Regression Analysis | Complete and more Exams Nursing in PDF only on Docsity!

WGU D600 – Statistical Data Mining Task 1 |

Multiple Linear Regression Analysis |

Complete Performance Assessment with

Python, Model Reduction & Diagnostics |

2026 Updated

Q1. What is the primary purpose of multiple linear regression analysis? A) To classify observations into categories

Q5. When using dummy variables for a categorical variable with k categories, how many dummy variables should be created? A) k B) k - 1 C) k + 1 D) 2k

Correct Answer: B Rationale: To avoid perfect multicollinearity (the "dummy variable trap"), one category must serve as the reference category. Therefore, k - 1 dummy variables are created for k categories.

Q6. What is the multiple standard error of estimate? A) The standard deviation of the predictor variables B) The standard deviation of the residuals, measuring how far data points fall from the regression plane C) The standard error of the intercept D) The correlation between predictors

Correct Answer: B Rationale: The multiple standard error of estimate measures the typical distance between observed values and the values predicted by the multiple regression model. Lower values indicate better fit.

Q7. What does a partial regression coefficient measure? A) The total effect of one predictor on the outcome B) The association between a predictor and the outcome after factoring out the effects of other predictors C) The correlation between two predictors D) The R-squared value

Correct Answer: B Rationale: A partial regression coefficient examines the association between a dependent variable and an independent variable after controlling for the effects of all other independent variables in the model.

Q8. A company runs a multiple regression with units sold (Y), advertising spent (X₁), and sale price (X₂): Y = 30,005 + 0.4(X₁) – 0.5(X₂). What does the coefficient 0.4 for X₁ indicate? A) For every $1 increase in advertising, units sold increase by 0.4, holding price constant B) Advertising and units sold are negatively correlated C) 40% of the variance in units sold is explained by advertising D) The intercept is 0.

Correct Answer: A

Rationale: The coefficient 0.4 represents the partial effect of advertising on units sold, holding sale price constant. For each one-unit increase in advertising spending, units sold are expected to increase by 0.4.

Q9. What is the primary difference between simple linear regression and multiple linear regression? A) Simple regression uses one predictor; multiple regression uses two or more predictors B) Simple regression has no intercept C) Multiple regression cannot have a dependent variable D) Simple regression is always more accurate

Correct Answer: A Rationale: Simple linear regression models the relationship between one predictor and one outcome. Multiple linear regression extends this to include two or more predictors, allowing for the assessment of each predictor's unique contribution.

Q10. In multiple regression, what is the response variable also called? A) Independent variable B) Dependent variable C) Predictor variable D) Explanatory variable

Correct Answer: B Rationale: The response variable is also called the dependent variable. It is the outcome being predicted or explained by the independent variables.

Section II: Model Assumptions & Diagnostics

Q11. What does the assumption of linearity in multiple regression require? A) The predictors must be perfectly correlated B) The relationship between predictors and the outcome should be linear C) The residuals must be zero D) The sample size must be large

Correct Answer: B Rationale: Linearity assumes that the relationship between each predictor and the outcome is linear. This can be checked using residual vs. fitted plots; a random scatter indicates linearity is satisfied.

Q12. How is the assumption of linearity typically checked? A) By examining the correlation matrix B) By plotting residuals vs. fitted values C) By calculating the R-squared value

Rationale: A QQ (quantile-quantile) plot compares the distribution of residuals to a normal distribution. If residuals fall approximately along a straight line, normality is supported.

Q17. What is multicollinearity in multiple regression? A) High correlation between the dependent variable and predictors B) High correlation among independent variables C) Low variance in residuals D) Non-normal distribution of residuals

Correct Answer: B Rationale: Multicollinearity occurs when independent variables are highly correlated with each other. This inflates standard errors and makes coefficient estimates unstable.

Q18. How is multicollinearity typically detected? A) By examining the Durbin-Watson statistic B) By calculating Variance Inflation Factors (VIF) C) By plotting residuals D) By checking the QQ plot

Correct Answer: B Rationale: VIF measures how much the variance of a regression coefficient is inflated due to multicollinearity. VIF values above 5 or 10 typically indicate problematic multicollinearity.

Q19. What does a VIF value of 10 indicate? A) No multicollinearity B) Moderate multicollinearity C) Severe multicollinearity requiring attention D) Perfect correlation between predictors

Correct Answer: C Rationale: VIF values above 10 are generally considered indicators of severe multicollinearity, which may require removing or combining correlated predictors.

Q20. What should be done if multicollinearity is detected? A) Ignore it and proceed with the model B) Remove or combine highly correlated predictors C) Add more correlated variables D) Increase the sample size only

Correct Answer: B Rationale: Common remedies for multicollinearity include removing one of the correlated variables, combining them into a composite variable, or using dimensionality reduction techniques like PCA.

Section III: Model Evaluation & Interpretation

Q21. What does R-squared measure in multiple regression? A) The correlation between two predictors B) The proportion of variance in the dependent variable explained by the model C) The standard error of the estimate D) The number of significant predictors

Correct Answer: B Rationale: R-squared (coefficient of determination) quantifies the proportion of total variance in the outcome that is explained by the regression model. It ranges from 0 to 1.

Q22. What is the key difference between R-squared and adjusted R-squared? A) Adjusted R-squared penalizes for the number of predictors, making it more appropriate for model comparison B) R-squared is always higher C) Adjusted R-squared ranges from -1 to 1 D) They are identical

Correct Answer: A Rationale: Adjusted R-squared accounts for the number of predictors in the model. Unlike R-squared, it does not automatically increase when predictors are added, making it a more reliable metric for comparing models with different numbers of variables.

Q23. If a regression model has an adjusted R-squared of 0.82, what does this mean? A) 82% of the variance in the outcome is explained by the model, adjusted for the number of predictors B) The model is 82% accurate C) 82% of predictors are significant D) The model has 82 variables

Correct Answer: A Rationale: Adjusted R-squared of 0.82 indicates that 82% of the variance in the dependent variable is explained by the model after accounting for the number of predictors.

Q24. Which model is generally preferred when comparing two regression models with different numbers of predictors? A) The one with the higher R-squared B) The one with the higher adjusted R-squared C) The one with more predictors D) The one with the lower adjusted R-squared

Correct Answer: B

Rationale: RMSE = √(Σ(residual²) / n). It penalizes larger errors more heavily due to squaring, providing a measure of prediction accuracy.

Q29. What is the difference between R-squared and RMSE? A) R-squared measures variance explained; RMSE measures prediction error in original units B) R-squared is always lower C) RMSE is only for simple regression D) They measure the same thing

Correct Answer: A Rationale: R-squared is a relative measure of fit (proportion of variance explained), while RMSE is an absolute measure of prediction error in the units of the outcome. Both are useful for different purposes.

Q30. A regression model has R-squared = 0.75 and RMSE = 5.2. What does this indicate? A) The model explains 75% of variance and predictions are typically off by 5.2 units B) The model is 75% accurate C) The model has 5.2 predictors D) The model is poor

Correct Answer: A Rationale: R-squared = 0.75 indicates 75% of the variance is explained. RMSE = 5.2 means predictions differ from actual values by approximately 5.2 units on average.

Section IV: Model Reduction Techniques

Q31. What is the goal of model reduction in multiple regression? A) To increase the number of predictors B) To simplify the model by removing unnecessary predictors while maintaining predictive power C) To reduce the sample size D) To eliminate the dependent variable

Correct Answer: B Rationale: Model reduction (variable selection) aims to create a parsimonious model by retaining only the most important predictors, improving interpretability and reducing overfitting.

Q32. What is backward elimination in model reduction? A) Starting with no predictors and adding them one by one B) Starting with all predictors and removing the least significant one iteratively C) Randomly selecting predictors D) Using only the first predictor

Correct Answer: B

Rationale: Backward elimination begins with the full model and iteratively removes the predictor with the highest p-value (least significant) until all remaining predictors are statistically significant.

Q33. What is forward selection in model reduction? A) Starting with all predictors and removing them B) Starting with no predictors and adding the most significant one iteratively C) Selecting predictors alphabetically D) Using all predictors

Correct Answer: B Rationale: Forward selection begins with an empty model and adds predictors one at a time, selecting the one that most improves the model at each step, until no further significant improvement is achieved.

Q34. What is stepwise regression? A) A combination of forward selection and backward elimination B) Only forward selection C) Only backward elimination D) Random selection

Correct Answer: A Rationale: Stepwise regression combines forward selection and backward elimination, allowing predictors to be added and removed at each step based on statistical criteria.

Q35. What criterion is commonly used to compare models during stepwise selection? A) R-squared only B) AIC (Akaike Information Criterion) or BIC (Bayesian Information Criterion) C) Sample size D) Number of predictors

Correct Answer: B Rationale: AIC and BIC balance model fit with complexity, penalizing for the number of parameters. Lower AIC/BIC values indicate better models.

Q36. What is the Akaike Information Criterion (AIC)? A) A measure of model fit that penalizes complexity B) A test for normality C) A correlation coefficient D) A type of residual

Correct Answer: A Rationale: AIC estimates the relative quality of statistical models for a given dataset, balancing goodness of fit with model complexity. Lower AIC indicates a better model.

Section V: Python Implementation & Advanced Topics

Q41. Which Python library is commonly used for multiple linear regression with detailed statistical output? A) NumPy B) pandas C) statsmodels D) Matplotlib

Correct Answer: C Rationale: statsmodels provides comprehensive statistical output for regression, including coefficients, standard errors, t-statistics, p-values, R-squared, and diagnostic tests.

Q42. In statsmodels, what does sm.add_constant(X) do? A) Adds a constant term (intercept) to the predictor matrix B) Removes the intercept C) Standardizes variables D) Adds a dependent variable

Correct Answer: A Rationale: sm.add_constant(X) adds a column of ones to the predictor matrix, allowing the regression model to estimate an intercept term. Without it, the model is forced through the origin.

Q43. After fitting a model with statsmodels, which attribute provides the R-squared value? A) model.params B) model.rsquared C) model.pvalues D) model.resid

Correct Answer: B Rationale: The rsquared attribute of a fitted statsmodels results object contains the R-squared value. Similarly, rsquared_adj provides adjusted R-squared.

Q44. How can you obtain the residuals from a statsmodels regression model? A) model.resid B) model.params C) model.fittedvalues D) model.summary()

Correct Answer: A

Rationale: The resid attribute contains the residuals (differences between observed and predicted values) from the fitted model.

Q45. What Python function creates a residual vs. fitted plot for regression diagnostics? A) sns.scatterplot(x=model.fittedvalues, y=model.resid) B) sns.histplot(model.resid) C) sns.boxplot(model.resid) D) sns.heatmap(model.resid)

Correct Answer: A Rationale: Plotting fitted values on the x-axis and residuals on the y-axis creates a residual vs. fitted plot, used to assess linearity and homoscedasticity.

Q46. In scikit-learn, which class is used for linear regression? A) sklearn.linear_model.LinearRegression B) sklearn.linear_model.LogisticRegression C) sklearn.decomposition.PCA D) sklearn.cluster.KMeans

Correct Answer: A Rationale: The LinearRegression class in sklearn.linear_model is used for ordinary least squares linear regression, including multiple regression.

Q47. What is the difference between statsmodels and scikit-learn for regression? A) statsmodels provides detailed statistical inference; scikit-learn focuses on prediction and is more efficient for large datasets B) scikit-learn provides more statistics C) They are identical D) statsmodels cannot handle multiple regression

Correct Answer: A Rationale: statsmodels is designed for statistical inference with comprehensive output (p-values, confidence intervals), while scikit-learn emphasizes prediction performance and scalability.

Q48. How can you detect multicollinearity in Python? A) Calculate VIF using statsmodels or variance_inflation_factor B) Plot residuals C) Calculate RMSE D) Check QQ plot

Correct Answer: A Rationale: The variance_inflation_factor function from statsmodels.stats.outliers_influence calculates VIF for each predictor, helping detect multicollinearity.