Chapter 3 · Section 6 practice

Residual Analysis and Unusual Observations

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

1. Read residuals

Warm-up. Print the first three residuals.

Write your answer, then run it.

2. Check residual mean

Warm-up. Print the mean residual rounded to six decimals.

Write your answer, then run it.

3. Find the largest residual magnitude

Warm-up. Print the week index with greatest absolute residual.

Write your answer, then run it.

4. Read the unusual record

Build your skills. Print the complete row for the largest absolute residual.

Write your answer, then run it.

5. Read leverage

Build your skills. Print all leverage values rounded to three decimals.

Write your answer, then run it.

6. Read Cook’s distance

Build your skills. Print the index with highest Cook’s distance.

Write your answer, then run it.

7. Choose a time-order diagnostic

Build your skills. Print the plot used to investigate error independence, and one warning pattern.

Write your answer, then run it.

8. Compare a leave-one-out fit

Challenge. Remove the row with index 7 (the eighth week), refit, and print the original and revised slopes.

Write your answer, then run it.

9. Match assumptions to plots

Challenge. Print the visual check for each of the four LINE assumptions.

Write your answer, then run it.

10. Separate a diagnostic from a guarantee

Challenge. Print residual mean and a sentence explaining why it cannot verify the population zero-conditional-mean assumption.

Write your answer, then run it.

Reference answers are locked until all 10 attempts are submitted.