# With a few data points can a generate a close equation to meet them?

I have

1x = -40, 2x = -41 , 3x = -54


and getting a few more. Can I generate a equation for a graph that gets close to this?

I was trying to get Wolfram Alpha to do this.

EDIT:

Sorry for lack of clarity

I am hand measuring signal to distance in meters

I have

at 1 meter: -40 (signal strength)
at 2 meter: -41
at 3 meter: -54


And I could keep measuring

is it possible to come up with some kind of math to estimate signal strength for any distance?

Im thinking smooth line on a scatter plot

-
Do you really mean, for example, three times $x$ equals minus $54$? If you do, I can't make any sense out of your question. If you mean something else, please take the time to figure out how to express yourself in a way that others can understand. –  Gerry Myerson Apr 19 '11 at 5:41
The title says you have "points", yet I see nothing like points $(x,y)$ in the body of question. What do you really want to do? –  Ｊ. Ｍ. Apr 19 '11 at 6:03
Found what I was looking for wolframalpha.com/input/… –  Seth Hikari Apr 19 '11 at 6:38
Sorry I mean this wolframalpha.com/input/?i=quadratic%20fit%20{-40%2C%20-41%2C%20-54}&l‌​k=2 –  Seth Hikari Apr 19 '11 at 6:47
How many are these measurements? Probably the best idea here, without knowing anything else special about your data, is to do piecewise cubic Hermite interpolation. –  Ｊ. Ｍ. Apr 19 '11 at 7:53

The process of fitting a smooth curve (or surface) to a set of data points is called non-linear regression and is part of statistics. For an overview see: http://en.wikipedia.org/wiki/Nonlinear_regression .

There are many curves that will fit your data. Getting more points is a good idea. See also "curve fitting" here: http://en.wikipedia.org/wiki/Curve_fitting

There are some online tools for this. For example, if you want to fit your data with a polynomial go here http://www.xuru.org/rt/PR.asp

For other types of curve fitting try: http://www.xuru.org/rt/TOC.asp

Of course there is commercial software for this and other statistical modeling tasks as well.

-

You have given three data points: (1,-40), (2,-41), (3,-54). Through any $n$ points there will be a polynomial of degree at most $n-1$, so there will be a quadratic that fits them exactly. Lagrange interpolation is one way to find the polynomial. Excel has it built in. However, the interpolation can be very sensitive to errors of measurement, so you might want to fit the best quadratic through more points. It will not go exactly through the points, but will be much less sensitive to error. Again, Excel will do the fit to any order you like. Chapter three in Numerical Recipes (obsolete versions are free) has a good discussion.

If these are signal strengths measured in dB, you would actually expect that once you get far enough away they should fit a straight line if you take the logarithm of the distance. The power drops as $r^{-2}$ and taking the logarithm makes that a line. The three you give do not.

-
@Seth: I repeat once more the admonition I gave in the comments: without trying to compute diagnostics like the coefficient of determination, or at the very least doing an inspection of the residuals, any expression you come up is of suspect quality. You might want to study the physics of the situation as well to see if a quadratic expression for signal strength is justified. –  Ｊ. Ｍ. Apr 19 '11 at 16:11