liveBook · Manning

Coefficient of determination

As explained in Causal Inference for Data Science

R squared is the coefficient of determination measuring the proportion of outcome variation explained by a model.

R squared measures how well a model predicts an outcome. A high value can signal low predictive error, but it does not show that the model remains useful when someone changes the data-generating design. section 4.1.5

Pac-Man level design

Synthetic levels make ghosts and bonuses negatively correlated. Predicting time from bonuses alone gives R squared = 0.9969; adding ghosts raises it to 0.9996, only a 0.3% improvement. Yet predicting a level with six ghosts and six bonuses changes from 11.52 to 17.03, a 36% difference. When a designer deliberately balances ghosts and bonuses, predictive fit on historical data may therefore conceal which model supports the new design. section 4.1.5

How Causal Inference for Data Science covers it

How deep it goes
Explains model comparison with synthetic data and predictions, but stops short of treating R squared as evidence of causal usefulness.
Examples
Compares bonuses-only and bonuses-plus-ghosts regressions using synthetic Pac-Man level data and counterfactual-looking predictions.
What you can do after
Evaluate predictive models by comparing R squared with predictions under redesigned combinations of variables.
How it connects
Connects R squared to linear regression, predictive error, cross-validation, correlated predictors, and causal inference.

Also explained in

Compare how 7 books explain coefficient of determination →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal Inference for Data Science. The section links point to the parts of the book it draws on.