Block 4: Model fit, residuals and outliers

Week 8 · Prediction II · Imai §4.2.5 · about 4 min

NoteHow this works

Run each cell with Run Code, look at the output, then answer the question at the end of the block. Every cell is editable; Start Over resets it. Errors are information: read them.

florida.csv: one row = one Florida county, 2000 presidential election. We regress Buchanan’s 2000 votes on Perot’s 1996 votes.

1. Fit and \(R^2\)

2. Residuals: which county is the outlier?

3. Refit without Palm Beach

Conclusion: Which county is the outlier, and what happens when we drop it?
Palm Beach: Buchanan received 3,407 votes, far more than the model predicts (about 794). One outlier strongly changes the fit. The excess is about 2,600 votes, more than the 537-vote margin in Florida: the "butterfly ballot" confused voters.