From a sample of 10 observations, the following results were obtained:

sum(Yi)=1110

sum(Xi)=1700

sum(XiYi)=205500

sum(Xi^2)=322000

sum(Yi^2)=132100

The r^2 = 0.9758. But, on rechecking these calculations it was found that two pairs of observations were accidentally recorded, Y 90 X 120 and Y 140 X 220 -- instead of -- Y 80 X 110 and Y150 X 210.

Obtain the correct r^2.

...so I can tell that the new Ybar is the same, 111. and the new Xbar will be 168 instead of 170. The original sum(Yi^2) has to be wrong as well as the sum(XiYi) and sum(Xi^2).

How the heck do you do this?! (Not looking for a solution, just some detailed hints if possible.)

Thanks very much for reading!