# Mean of interpolated data or interpolation of means in geostatistics

Say I have a time series, with actual measurements of a variable $a$ in different locations. If I want to know the average of $p$ from time $t_1$ to $t_n$, I could say that $\overline{a_{p}}=\frac{\sum\limits_{t=1}^n a_{{p}_t}}{n}$, where $p$ is the coordinate of the point of measurement. So far, so good. Let's generalize and call this averaging function $m_p=f(a_p,t)$, where $f(a,t)$ is some deterministic function and $m$ is its result.

Now, say I want to calculate $m$ for a location $o$, where $o$ is a points for which I don't have actual measurements and $a_o$ was estimated through a an interpolating function $g(a,o)$. My intuition tells me that in this case, we should first estimate every $a_{o_t}$ before applying $f(a,t)$. In other words, considering that $a_o = g(a,o)$, we get $m_o$ by doing:

$m_o=f[g(a,o),t]=f(a_o,t)$

But I have seen so many papers that do the other way around. They first calculate $f(a,t)$ for every known $a$ and then interpolate the results using the same g() even though there is no guarantee that $m$ behaves like $a$, or:

$m_o=g[f(a,t),o]=g(m,o)$

In some cases, they use the same logic when instead of $t$, there is some other variable $b$, i.e., it's not a time series, but $f(a,b)$ is a deterministic function.

Are the models in those papers conceptually wrong? If they are wrong, is there a techcnical term to call this kind of mistake?

-

If your interpolation scheme is linear in the input $a$'s (and all interpolation schemes I can think of are), then there is no difference between the mean of interpolated values and the interpolation of the means.
Your notation is a little confusing, so let me put it this way. Suppose you know the values $a_{i,j} = a(p_i,t_j)$ for $m$ points $p_i$ at $n$ times $t_j$. The interpolated value at a point $o$ at any time $t_j$ can typically be expressed as a weighted sum of the values at known points, $$a(o,t_j) := w_1 a_{1,j} + w_2 a_{2,j} + \cdots + w_m a_{m,j}.$$ The mean of these interpolated values is $$\bar a(o) = \frac{1}{n}\sum_j a(o,t_j).$$ If you expand this out, you'll find that it's equal to \begin{align}\bar a(o) &= w_1 \frac{1}{n}\sum_j a_{1,j} + w_2 \frac{1}{n}\sum_j a_{2,j} + \cdots + w_m \frac{1}{n}\sum_j a_{m,j} \\ &= w_1 \bar a_1 + w_2 \bar a_2 + \cdots + w_m \bar a_m,\end{align} which amounts to interpolating the means. Presumably this is better from a computational perspective because if you want to find $\bar a(o)$ at many different $o$, you can keep the $\bar a_i$'s precomputed.
Rahul, I'm sorry for my confusing notation. I'm not very good at mathematics. You mean that if I am right in my suspicion if the data are to be interpolated using kriging? What if instead of just a simple average $m$ is something not linearly related to $a$? ($f(a,t)$ could be a hydrological model, for example). – Adriano Dec 27 '10 at 2:57