Variance inflation from correlated predictors

A regression with an intercept has predictors x1=(1,2,3,4,5)x_1=(1,2,3,4,5) and x2=(2,5,6,7,10)x_2=(2,5,6,7,10). Let rr be their sample correlation. Compute 1−r21-r^2 and the associated variance inflation factor.

The predictor means are 33 and 66. Their centred cross-products are S11=10S_{11}=10, S22=34S_{22}=34 and S12=18S_{12}=18, so r2=182/(10⋅34)=81/85r^2=18^2/(10\cdot34)=81/85. Thus 1−r2=4/851-r^2=4/85, and the variance inflation factor is 85/4=21.2585/4=21.25.