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 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.


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

share|cite|improve this question
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? – J. M. Apr 19 '11 at 6:03
Found what I was looking for… – Seth Hikari Apr 19 '11 at 6:38
Sorry I mean this{-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. – J. M. Apr 19 '11 at 7:53
up vote 4 down vote accepted

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: .

There are many curves that will fit your data. Getting more points is a good idea. See also "curve fitting" here:

There are some online tools for this. For example, if you want to fit your data with a polynomial go here

For other types of curve fitting try:

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

share|cite|improve this answer

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.

share|cite|improve this answer
@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. – J. M. Apr 19 '11 at 16:11

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.