*Tibor wrote:*

just do some crude average of previous average with current result...

Can I suggest one small change?

As I understand, for given values:

```
v_1, v_2, v_3, v_4, v_5, v_6, ...
```

You are trying to calculate averages:

```
a_1, a_2, a_3, a_4, a_5, ...
```

Where:

```
a1 = v1
a_N = (a_N-1 + v_N)/2
```

Right?

I have prepared short excel file: https://files.fm/u/85djxzg6 (hopefully you can download)

Columns:

- Just numbers (1...N)
- Raw, random data (range 0...20)
- Modified average of above definition
- Full-time average
- N-terms average

I expect that we want to know what is average of last N terms in working building, because the environment can change (borders, stone cut, trees, etc.). Average described above is working well, but it can work even better.

Let's change the equation from:

```
a_N = (a_N-1 + v_N)/2
```

To:

```
a_N = mu*a_N-1 + (1-mu)*v_N
```

If `mu=1/2=0.5`

, you will get the first equation.

But if you place another value of `mu`

, you will get better fit value.

For example using `mu=0.8`

is almost like 7 terms average (for uniform distribution).

That change is almost nothing to the code & memory, but the value is much closer to the target one.