# Partitioning of variability in regression

This applet illustrates the partitioning of variability into explained and unexplained variability, in the context of linear regression.

The top plot shows a scatterplot of bivariate data . Drag the points to move them around. The grand -mean is shown as the horizontal line, and a dotplot of the -values is shown to the left.
Click ' model (fit), and the variability

**Show model**' to add a least squares model. You can choose to fit either a linear or quadratic model, or the null model (with no correlation between x and y). The variability in the response can be partitioned into two sources: the variability**explained**by the fitted**unexplained**by the fitted model (residual). Click '**Show explained variability**' and '**Show unexplained variability**' to animate the two components into their own plots. Dotplots of fitted values and residuals, respectively, appear to the left. The corresponding part of the overall variability, shown in the bar to the left, is coloured. What happens to the partitioning of variability as you change between the null, linear and quadratic models? Which model is the best fit?## New Resources

## Discover Resources

Download our apps here: