Simple and partial slopes

For x1=(1,2,3,4,5)x_1=(1,2,3,4,5), x2=(2,5,6,7,10)x_2=(2,5,6,7,10) and y=(4,3,4,5,4)y=(4,3,4,5,4), compute the simple slope of yy on x1x_1 and the partial slope of x1x_1 after including x2x_2. Include an intercept in both regressions. Are the two slopes equal?

The centred cross-products are S11=10S_{11}=10, S22=34S_{22}=34, S12=18S_{12}=18, S1y=2S_{1y}=2 and S2y=2S_{2y}=2. The simple slope is S1y/S11=2/10=0.2S_{1y}/S_{11}=2/10=0.2. The slope-matrix determinant is 10⋅34−182=1610\cdot34-18^2=16, and the partial slope is b1=(34⋅2−18⋅2)/16=2b_1=(34\cdot2-18\cdot2)/16=2. The full fit has intercept 44 and b2=−1b_2=-1. The simple and partial slopes are different because the latter adjusts for x2x_2.