
In the simplest case, we can proceed with distancebased methods the same way as with the "moving windows" method: we define a certain "neighborhood" of known data points around the unknown position to be estimated each time; the arithmetic mean of these known measurement values is our estimate (= moving average). The neighborhood can be defined in different ways:
However, this method is quite fuzzy because of the different distances between the position to be estimated and the poor integration of known points in the interpolation. The actual distancebased methods use exactly these distances between the estimation points and the known measurement points to weigh their influence in the calculation of the estimated value. By the way, they require a linear spatial correlation between the phenomena.
Using the socalled "Inverse Distance Weighting" method or IDW, the weight of any known point is set inversely proportional to its distance from the estimated point. It is calculated as follows:
Inverse Distance Weighting IDW – basic formula

$\stackrel{\u02c6}{v}$
= value to be estimated ${v}_{i}$ = known value d_{i}..., d_{n}= distances from the n data points to the point estimated n 
In most cases, you will find the following variation, in which the influence of the distance can be additionally controlled by an exponent (which is preset to 2 in most programs).
Most common form of IDW formula with added distance weighting exponent

$\stackrel{\u02c6}{v}$= value to be estimated ${v}_{i}$= known value d^{p}_{i}..., d^{p}_{n} = distances from the n data points to the power of p of the point estimated 
The lower the exponent, the more uniformly all neighbors are incorporated into the calculation (regardless of their distance), and therefore, the "smoother" the estimated surface. The higher the exponent, the more accentuated and "unsettled" is the surface because only the weight of the nearest neighbors is integrated in the interpolation (see the following interactive animation).
IDW "Bulls eye" effect: concentric areas of the same value around the known points – an unwanted
artefact of the IDW interpolation.

IDW modified after Shepard: the Bullseyes are definitely reduced.

The following interactive animation shows 10 data points (blue) with known measurement values (numbers next to the points) and one point, which value is to be calculated (red). At the start of the animation, this value is calculated from the given values and distances. To get to know the principles of IDW interpolation better, you can now experiment with this animation:
Answer the following questions keeping the experiment in mind:
Click here for more information