Docsity

WGU D600 Task 1 Practice Exam: Linear Regression, Diagnostics, and Python Modeling, Exams of Linear Control Systems

Toggle sidebar
bg1
WGU D600 Task 1: Linear Regression Analysis |
Complete Report, Python Modeling, Results &
Visualizations | 2026/2027 Updated
## Section A: Multiple Choice (30 Questions)
Instructions: Choose the best answer for each question.
1. A data miner fits an OLS model in `statsmodels` and observes that adding a highly correlated
predictor raises \(R^2\) slightly but inflates the standard error of an existing coefficient. Which
diagnostic best confirms this issue?
A. Durbin–Watson statistic near 2.0
B. Variance Inflation Factor (VIF) above 10 for the correlated predictors
C. Breusch–Pagan test \(p\)-value \(> 0.05\)
D. Cook’s distance below \(4/n\) for all rows
2. In a multiple linear regression model, what does the Adjusted R-squared value specifically account
for that the standard R-squared does not?
A. The homoscedasticity of the residuals
B. The number of predictors in the model relative to the number of observations
C. The presence of multicollinearity among predictors
D. The normality of the residuals
3. Which of the following best describes the Coefficient of Determination (R-squared) ?
A. The probability that the slope of the regression line is zero
B. The average distance between the observed data points and the regression line
C. The proportion of variance in the dependent variable explained by the independent variables
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download WGU D600 Task 1 Practice Exam: Linear Regression, Diagnostics, and Python Modeling and more Exams Linear Control Systems in PDF only on Docsity!

WGU D600 Task 1: Linear Regression Analysis |

Complete Report, Python Modeling, Results &

Visualizations | 2026/2027 Updated

Section A: Multiple Choice (30 Questions)

Instructions: Choose the best answer for each question.

  1. A data miner fits an OLS model in statsmodels and observes that adding a highly correlated predictor raises (R^2) slightly but inflates the standard error of an existing coefficient. Which diagnostic best confirms this issue? A. Durbin–Watson statistic near 2. B. Variance Inflation Factor (VIF) above 10 for the correlated predictors C. Breusch–Pagan test (p)-value (> 0.05) D. Cook’s distance below (4/n) for all rows
  2. In a multiple linear regression model, what does the Adjusted R-squared value specifically account for that the standard R-squared does not? A. The homoscedasticity of the residuals B. The number of predictors in the model relative to the number of observations C. The presence of multicollinearity among predictors D. The normality of the residuals
  3. Which of the following best describes the Coefficient of Determination (R-squared)? A. The probability that the slope of the regression line is zero B. The average distance between the observed data points and the regression line C. The proportion of variance in the dependent variable explained by the independent variables

D. The correlation between the residuals and the fitted values

  1. A Durbin–Watson statistic of approximately 2.0 indicates: A. Strong positive autocorrelation B. Strong negative autocorrelation C. No evidence of first-order autocorrelation D. Heteroscedasticity is present
  2. The Breusch–Pagan test is used to detect: A. Non-normality of residuals B. Multicollinearity C. Heteroscedasticity D. Autocorrelation
  3. In a train/test split for a linear regression model, the primary purpose of the test set is to: A. Train the model parameters B. Evaluate how well the model generalizes to unseen data C. Increase the R-squared value D. Remove outliers from the dataset
  4. You fit a multiple linear regression model and obtain a test RMSE of $55,466 and a test MAE of $45,006. Which statement is most accurate? A. MAE is always larger than RMSE for the same model. B. RMSE penalizes large errors more heavily than MAE. C. MAE penalizes large errors more heavily than RMSE. D. RMSE and MAE are identical when residuals are normally distributed.
  5. Which of the following is not a standard assumption of ordinary least squares (OLS) linear regression?
  1. A Jarque–Bera test (p)-value of 0.349 indicates: A. The residuals are significantly non-normal. B. The null hypothesis of normality is not rejected at (\alpha = 0.05). C. The residuals are heteroscedastic. D. The model has omitted variable bias.
  2. Which visualization is most appropriate for checking the linearity assumption in a multiple regression model? A. Histogram of residuals B. Q–Q plot of residuals C. Residuals vs. fitted values plot D. Bar chart of coefficients
  3. In Python, which library provides the train_test_split function commonly used to partition data for modeling? A. statsmodels B. scikit-learn C. matplotlib D. seaborn
  4. A centered VIF value below 2 for all predictors is generally interpreted as: A. Severe multicollinearity B. Moderate multicollinearity C. No problematic multicollinearity D. Perfect collinearity
  5. The regression equation from the representative D600 housing model would allow a stakeholder to: A. Prove causality between predictors and price.

B. Estimate the expected change in price associated with a one-unit change in a predictor, holding other predictors constant. C. Eliminate the need for diagnostic checks. D. Guarantee that future predictions will be within $1 of the true price.

  1. Which of the following is a model reduction technique? A. Adding interaction terms B. Backward elimination C. Increasing the training set size D. Transforming the target variable
  2. A Cook’s distance value below (4/n) for all observations suggests: A. No influential outliers are present. B. The residuals are non-normal. C. Heteroscedasticity is severe. D. The model is overfitted.
  3. In statsmodels, the summary() output of an OLS model includes which of the following? A. Coefficients, standard errors, (t)-values, and (p)-values B. Only the R-squared value C. Confusion matrix D. ROC curve
  4. A test R-squared of 0.822 means: A. 82.2% of the variance in the training data is explained by the model. B. 82.2% of the variance in the test data is explained by the model. C. The model’s predictions are 82.2% accurate in dollar terms. D. The model has an 82.2% chance of being correctly specified.

C. Multicollinearity always causes heteroscedasticity. D. Multicollinearity improves the predictive power of the model.

  1. In the representative D600 model, the final model used six predictors after removing NumBedrooms. This is an example of: A. Forward selection B. Backward elimination C. Ridge regression D. Principal component analysis
  2. A test MAE of $45,006 is interpreted as: A. The average squared difference between predicted and actual prices is $45,006. B. On average, the model’s predictions differ from actual prices by about $45,006. C. The model explains $45,006 of variance in price. D. 45,006 predictions were incorrect.
  3. Which of the following is not a standard step in the D600 Task 1 workflow? A. Exploratory data analysis B. Train/test split C. Model reduction D. Building a confusion matrix
  4. The executive summary of a D600 Task 1 report should: A. Include the full Python code listing. B. Summarize the purpose, key results, and recommendations in a concise manner. C. Replace the need for diagnostic checks. D. Focus only on the R-squared value.

Section B: Short Answer / Conceptual (10 Questions)

Instructions: Answer each question in 2–4 sentences.

  1. Explain the difference between R-squared and Adjusted R-squared , and why Adjusted R-squared is preferred when comparing models with different numbers of predictors.
  2. Describe the purpose of a train/test split in the context of the D600 Task 1 linear regression analysis.
  3. What does a VIF (Variance Inflation Factor) value of 12 for a predictor indicate, and what action might you take in response?
  4. Interpret the following statement from a D600 Task 1 report: “The final model was statistically significant overall ((F = 611.7, p < .001)).”
  5. Explain the difference between RMSE and MAE. Which one is more sensitive to large errors, and why?
  6. What is the purpose of a Q–Q plot in regression diagnostics? What pattern would you expect if residuals are normally distributed?
  7. In the representative D600 housing model, NumBedrooms was removed because its (p)-value was 0.518. Explain why a high (p)-value can justify removing a predictor from a model.
  8. Describe one visualization you would include in a D600 Task 1 report to check the homoscedasticity assumption, and explain what pattern would indicate a violation.
  9. Why is it important to report both training and test metrics (e.g., training R-squared and test R- squared) in a linear regression report?

Instructions: Interpret the following outputs or describe the appropriate visualization.

  1. A D600 Task 1 report includes the following table: | Metric | Result | |---|---| | Training R-squared | 0.794 | | Adjusted R-squared | 0.793 | | Test R-squared | 0.822 | | Test RMSE | $55,466 | | Test MAE | $45,006 | | Breusch–Pagan (p)-value | 0.148 | | Durbin–Watson | 2.014 | | Jarque–Bera (p)-value | 0.349 | Question: Write a brief interpretation of these results for a non-technical stakeholder. Address whether the model appears reliable and whether the assumptions appear satisfied.
  2. You generate a Q–Q plot of the residuals and observe that the points follow the diagonal reference line closely, with only minor deviations at the tails. What does this indicate about the residuals? Is the normality assumption reasonably satisfied?
  3. A residuals vs. fitted values plot shows a clear “U-shaped” pattern. Which regression assumption is violated, and what might you do to address it?
  4. You create a correlation heatmap of the predictors and notice that two predictors have a correlation coefficient of 0.92. What potential issue does this signal, and what diagnostic would you check next?
  5. In the context of the D600 Task 1 report, why is it important to include visualizations (e.g., residual plots, Q–Q plots) alongside numerical metrics? Provide at least two reasons.

Answer Key with Rationales

Section A

QuestionAnswerRationale 1BVIF above 10 indicates problematic multicollinearity, which inflates standard errors. 2BAdjusted R-squared penalizes the addition of predictors that do not improve the model sufficiently, accounting for the number of predictors relative to sample size. 3CR-squared is the proportion of variance in the dependent variable explained by the independent variables. 4CA Durbin–Watson statistic near 2.0 indicates no evidence of first-order autocorrelation. 5CThe Breusch–Pagan test detects heteroscedasticity. 6BThe test set evaluates generalization to unseen data. 7BRMSE squares errors before averaging, so it penalizes large errors more heavily than MAE. 8DPerfectly uncorrelated predictors are not required; multicollinearity is a concern, but some correlation is acceptable. 9BQ–Q plots assess normality of residuals. 10Bvariance_inflation_factor() from statsmodels.stats.outliers_influence calculates VIF. 11BBackward elimination starts with all predictors and removes the least significant one iteratively. 12BA (p)-value of 0.518 is above 0.05, so NumBedrooms is not statistically significant after controlling for other predictors. 13BA Jarque–Bera (p)-value of 0.349 fails to reject the null hypothesis of normality at (\alpha = 0.05). 14CResiduals vs. fitted values is used to check linearity (and homoscedasticity). 15Bscikit-learn provides train_test_split. 16CCentered VIF below 2 indicates no problematic multicollinearity.
  1. The overall model is statistically significant ((p < .001)), meaning that the set of predictors collectively explains a significant portion of the variation in the target variable beyond what would be expected by chance.
  2. RMSE squares the errors before averaging and then takes the square root, so it penalizes large errors more heavily. MAE averages the absolute errors and is more robust to outliers but less sensitive to large deviations.
  3. A Q–Q plot compares the quantiles of the residuals to the quantiles of a normal distribution. If residuals are normally distributed, the points should fall approximately along a straight diagonal line.
  4. A high (p)-value suggests that the predictor does not contribute significantly to the model after accounting for other predictors. Removing it simplifies the model without substantially reducing explanatory power, which can improve interpretability and reduce overfitting.
  5. A residuals vs. fitted values plot is used. A “funnel” shape—where the spread of residuals increases as fitted values increase—indicates heteroscedasticity.
  6. Reporting both training and test metrics helps detect overfitting. If training R-squared is much higher than test R-squared, the model may be too complex and not generalize well.
  7. Backward elimination starts with all candidate predictors and iteratively removes the least statistically significant predictor (typically the one with the highest (p)-value above a threshold) until all remaining predictors are significant. In the D600 housing model, NumBedrooms was removed first because its (p)-value was 0.518.

Section C (Suggested Code)

df = pd.read_csv('housing_data.csv') X = df.drop(columns=['SalePrice']) y = df['SalePrice'] ## ``` ```python X_train, X_test, y_train, y_test = train_test_split( X, y, test_size=0.20, random_state= )
X_train_const = sm.add_constant(X_train) model = sm.OLS(y_train, X_train_const).fit() print(model.summary())
vif_data = pd.DataFrame() vif_data['feature'] = X_train.columns vif_data['VIF'] = [variance_inflation_factor(X_train.values, i) for i in range(X_train.shape[1])] print(vif_data)
fitted_vals = model.fittedvalues residuals = model.resid 50. Visualizations provide an intuitive check of assumptions that numerical metrics alone may miss (e.g., non-linearity, heteroscedasticity). They also communicate model behavior to stakeholders in a way that tables of numbers cannot, supporting more informed decision-making. --- ## Scoring Guide | Section | Questions | Points per Question | Total Points | |---|---|---|---| | A: Multiple Choice | 30 | 1 | 30 | | B: Short Answer | 10 | 2 | 20 | | C: Python Modeling | 5 | 4 | 20 | | D: Results &amp; Visualization | 5 | 6 | 30 | | Total | 50 | | 100 | Passing threshold (recommended): 80 points or higher. Use this exam to identify weak areas before submitting your D600 Task 1 performance assessment. Focus additional study on any section where you score below 80%.