Chapter 3 quiz

Ten questions to bring the chapter together.

Work from question 1 to 10. Edit your Python box, click Run Code, review the result, then click Submit attempt. Reference answers unlock after all ten attempts are submitted. This records completion, not correctness. Each box runs independently. Progress is saved in this browser.

Submitted: 0 / 10

Question 1

Print the correlation between LocationOffset and TravelCost. Compare it with correlation between squared LocationOffset and TravelCost. Explain whether the first result justifies ignoring location.

Write your answer, then run it.

Question 2

Fit Revenue on Ads with an intercept and print coefficients.

Write your answer, then run it.

Question 3

Print the first week’s observed, fitted, and residual revenues.

Write your answer, then run it.

Question 4

Print CAPM beta and its 95% coefficient interval.

Write your answer, then run it.

Question 5

Test H0: CAPM beta=1 against a two-sided alternative; print its p-value.

Write your answer, then run it.

Question 6

At retail Ads=5, print a mean CI and individual PI.

Write your answer, then run it.

Question 7

Print the retail record with the largest absolute residual.

Write your answer, then run it.

Question 8

At Price=8, compare multiple linear regression predictions at Ads=3 and Ads=4.

Write your answer, then run it.

Question 9

For the retail SLR, print SST, SSR, SSE, R-squared and regression RMSE using n-2; state one limitation of using training fit to select predictors.

Write your answer, then run it.

Question 10

Print CAPM total-return predictions for market excess scenarios -1% and +1% with RF=0.0002. Explain the prediction scope.

Write your answer, then run it.

Reference answers are locked until all 10 attempts are submitted.