Approximation: Quadratic OLS approximation

 

We modify the result of gird method in the following way:

where red points are the results from grid method. The estimated curve may deviate

 

form the points on the grid in some areas because this is based on all the points.

 

OLS coefficient can be derived by

 

 

where  is 3 x 1 and x1 is n x 3 and it contains ones in the first column, x in the second, and x^2 in the third and y is n x 1 vector. For x0,

 

 

If we consider the points near the estimated point, this method fits well.