To generate the quadratic model for set 2 we assume that the relation between y and x is as follows: y = mx2 + nx + p
I have three unknowns—m, n and p—therefore I need three independent equations to solve the problem. However, I’m going to create a set of two equations—(1) and (2) as below—with two unknowns m and n dependent on the third unknown p. Based on these two equations I’m going to use an iterative procedure that starts with say p = -1,000,000, evaluate m and n, calculate the correlation coefficient r and check the error with the base data set. If the error is above a certain specified epsilon, I adjust p and repeat the process till the model converges.
But before I do that note that as per Anscombe, datasets 1, 2 and 3 have the same xi.
The first equation is to use the average of yi as below: