I am trying to find out the Line of best fit for a number of data points (x,y). I am using the method of least squares as described here http://faculty.cs.niu.edu/~hutchins/csci230/best-fit.htm
However I need to adjust the algorithm so that I can add a weight to each data point and the line will be more inclined to the points which are more important than others in the data set.
Please note that I only know very basic statistics so keep in mind that you are explaining to a someone with basic knowledge when answering.