Differences between extrapolation and interpolation

Artículo revisado y aprobado por nuestro equipo editorial, siguiendo los criterios de redacción y edición de YuBrain.

When carrying out different types of calculations, whether in science or engineering, it is very common to resort to experimental data that we find organized in different tables. These data usually relate two variables that we know depend on each other, but whose mathematical dependence we do not know. This wouldn’t be a problem if the data we need was all in the table, but this rarely happens. It is more common that we need the value of one of the variables for a value of the other that is not found in the table.

When this happens, we can fit the experimental or tabulated data to a polynomial mathematical function, which we can then use to approximate the unknown value of the variable of interest. This process may involve interpolation or extrapolation.

These two processes are closely related and are based on the same basic tuning procedure, but they are not the same. Next, we will discuss what are the main differences between these two methods of estimating the value of a dependent variable for a given value of an independent one.

interpolation definition

Interpolation is the process of estimating the value of a dependent variable for a particular value of the independent variable from knowledge of a set of data or discrete points above and below the point we want to estimate. In other words, it is the process of estimating a point that lies between two known points. The following graph shows a series of data represented by the blue points and the red point represents the interpolation between the points in X 1 and X 2 .

Differences between extrapolation and interpolation

The word interpolation comes from the union of two Latin words that are the prefix inter-, which means between or at intervals, and -polire , which means to push or impel, referring to the fact that interpolation has to do with pushing or moving two data. to a point that lies between them.

Extrapolation Definition

Extrapolation can be understood as the process of estimating the value of a dependent variable for a value of the independent variable, from a set of points or data that are either all greater than or all less than the point to be estimated.

In other words, it is the process of estimating the value of a point that is above or below all known points or data. The following figure shows an example of extrapolating the data to a point above all known data.

Differences between extrapolation and interpolation

From an etymological point of view, extrapolate has the same Latin root –polire , only this time it is preceded by the Latin prefix extra- which means out of. Thus, the term refers to the estimate of points that are outside the range of the original data set, either because it is greater or less than all known data.

Differences in the uncertainty of interpolation and extrapolation

When comparing interpolation with extrapolation, it can be observed that there is an important difference regarding the risk of producing results that deviate considerably from the real value of the data we are looking for. In the case of interpolation, since it is carried out between two consecutive points, we can have a certain degree of certainty that the value we are interpolating is somewhere between these two points. That is, we have some assurance that the value of the unknown function does not shoot up or down before reaching the next point, because we know where that next point is.

Instead, when we do an extrapolation, we are projecting the behavior of the data forwards or backwards, and since there are no reference points ahead (or further back, if that were the case), then we have no way of knowing how it behaves. really the variable. It may continue with the same behavior as it came before, such as it may abruptly fire in either direction. For this reason, extrapolation carries greater uncertainty than interpolation.

They are usually fitted to different polynomial functions

The extrapolation and interpolation processes are based on the adjustment of two or more known points to a mathematical function that will allow us to predict the value of the function at other unknown points. In both the case of interpolation and extrapolation, the most commonly used function for estimation is the linear function (y = mx +b). While this function is suitable for both interpolation and extrapolation when the unknown value we want to estimate is reasonably close to the known points, this is no longer the case when extrapolating away from the extremes.

In fact, if the data as a whole is not remarkably linear in behavior, extrapolations can very quickly drift away from the true value as we move away from either extreme. This is why extrapolation usually requires more care and the use of extrapolation functions that are more complex or have higher orders than those used for interpolation.

In the latter case, linear interpolation is almost always adequate, assuming that the known data or points are not too far apart.

They may differ in the number of data items needed for the estimate

Another important difference between interpolation and extrapolation is the number of data items required to carry out the estimate. In interpolation, it is almost always assumed that the value of the sought point lies on a straight line joining the two closest points. In this case, knowing these two points is enough to carry out the interpolation. In other words, the effect of an error in the slope estimate on the interpolation is rarely serious, since the estimated point will almost always lie between the two known points.

On the other hand, in the case of extrapolation, since as we move further from the highest (or lowest) point the differences in the slope of the line have an increasing impact on the value of y, it is very risky to take only two points to calculate the slope. In these cases, what is usually done is to fit several points to the best line or to another polynomial function of higher order through the process of least squares, thus ensuring that the line that we extrapolate forward (or backward) reflects the general behavior of the data as a whole and not just a couple of them.

Linear interpolated and extrapolated

In the case of linear interpolation and linear extrapolation, essentially the same mathematical equations are used. In both cases, the interpolation function has the form y = mx + b, where y is the value we are looking for for a given value of x, m is the slope of the straight line to which we are fitting the data, and b is the cut with the y-axis of the interpolation function.

The slope of a linear function can be calculated from any two points using the formula:

Differences between extrapolation and interpolation

We can apply this formula twice, once between any two points of the series of known data, and another between a known point and the point we want to find. Since in both cases the slope is the same, we can match both expressions and thus obtain the formula that relates the value of y that we are looking for to the certain value of x that we have.

Example

Suppose we want to use two consecutive points p k-1 =(x k-1 ; y k-1 ) and p k =(x k ; y k ) to interpolate or extrapolate any point (x ; y). We can then write the slope twice and equate to get:

Differences between extrapolation and interpolation

Rearranging this equation, we get:

Differences between extrapolation and interpolation

Note that, in this case, nothing is assumed about the position of the point (x ; y) in relation to the two data being used for the estimation, so the same equation is used for both interpolation and for the extrapolation.

If it is verified that x k-1 < x < x k , or, in other words, that x lies between x k-1 and x k , then it is an interpolation. On the other hand, if x>x max or x<x min , that is, if x is greater than the maximum value or less than the minimum value of the data series, then it is an extrapolation.

interpolation example

Suppose we know that the demand for pizzas in the Venezuelan city of Mérida is 500,000 units per year when the average price per unit is $20, while at an average price of $15 the demand increases to 750,000. We are interested in estimating what the demand would be if we set the price at $16.5.

Solution

Note that this is an example of interpolation, since the point we want to estimate, corresponding to a price of $16.5, is located between two known points (ie, it is between $15 and $20). For this example, we have:

Differences between extrapolation and interpolation

Now, applying the linear interpolation formula:

Differences between extrapolation and interpolation

Differences between extrapolation and interpolation

 Thus, if the average price of pizzas is set at $16.5 per unit, the annual demand will be 675,000 pizzas per year.

Examples of extrapolation

Suppose that in the same example above we want to determine what the demand would be if the price increased to $25 per unit. Since in this case it is verified that x = $25 > $20, then it is an extrapolation. Again, the data is:

Differences between extrapolation and interpolation

Substituting:

Differences between extrapolation and interpolation

Differences between extrapolation and interpolation

Therefore, the extrapolation predicts that if the price increases to $25, the demand is reduced to half of what it was at $20.

References

Alonso. (2006, February 13). 3 Methods of interpolation from points . University of Madrid. https://www.um.es/geograf/sigmur/temariohtml/node43_mn.html

Gonza, D. (2016, September). Unit: interpolation and extrapolation of data . doloresgonza.files. https://doloresgonza.files.wordpress.com/2016/09/interpolacion-1.pdf

LesKanaris. (nd). The difference between extrapolation and interpolation – Interesting – 2022 . https://us.leskanaris.com/3668-the-difference-between-extrapolation-and-interpolation.html

Pinzón, J. (2013, October 9). Interpolation and Extrapolation . julianapinzon. https://julianapinzon.wordpress.com/interpolacion-y-extrapolacion/

UNIGAL. (2021, September 14). Linear Interpolation Formula, Definition, Examples, and More . https://unigal.mx/formula-de-interpolacion-lineal-definicion-ejemplos-y-mas/

Israel Parada (Licentiate,Professor ULA)
Israel Parada (Licentiate,Professor ULA)
(Licenciado en Química) - AUTOR. Profesor universitario de Química. Divulgador científico.

Artículos relacionados