0

I have a table of values;

$$3.00 \mapsto 12.15$$

$$3.10 \mapsto 12.82$$

And I'd like to know an equation for getting the inbetween values.

For example:

$$3.05 \mapsto \frac{12.15 + 12.82}2$$

But I'm not sure how I'd do this, and I'm not sure of the terminology of the issue I am facing sorry if its already been asked/answered which I am sure it has.

Thanks

Rory Daulton
  • 32,288
  • 1
    Have you searched for "linear interpolation"? – Rory Daulton Jan 13 '16 at 12:51
  • ah brilliant, thats what I needed, it's hard to google stuff when you don't know what your looking for haha :) – Robert Pounder Jan 13 '16 at 12:52
  • It might also hope to note that what you are looking off is sometimes called a "line of best fit" or if you think the relationships is not linear(if you have more than just those two points and they don't all lie on the same line), then you would be looking for a curve of best fit. Usually you need to guess at the structure of the data before calculating one though(is it linear? Is it exponential? Is it quadratic?) once you have a good guess of this, you should be able to find formulas to compute the curve of best fit. – Sean English Jan 13 '16 at 13:01

1 Answers1

1

As Rory said this is linear interpolation.

If you have two points $(x_1,y_1)$ and $(x_2,y_2)$ then the points in between are given by: $\left(x_1+t(x_2-x_1),y_1+t(y_2-y_1)\right)$ where $t$ is between 0 and 1 and represents what proportion of the way you are from the first point to the second.

Ian Miller
  • 11,844