Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I expect my question to sound very naive, please excuse for this. I have a set of $(x, y)$ points on a graph, which are the measurements of a real-life process. Now I want to draw an "approximation line" (or "best-fit line", I don't know what is the right name for it), which should visually show a common tendency of all these measurements. Which technique/method should I use?

ps. I found a way how to do it manually, but I need an algorithm, in order to render such a line automatically.

share|cite|improve this question
Start with linear regression, go from there. – Simon Hayward Nov 26 '12 at 21:10
up vote 1 down vote accepted

If you need something simple and you would be happy getting a linear model, consider a linear regression or other similar parametric models. Otherwise, there are many methods, kernel smoothing would be an interesting one (particularly, a local linear regression is one of my favorites).

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.