Artificial intelligent assistant

Which of arithmetic, geometric or harmonic mean is the most appropriate in this case? I have a software that periodically detects tempo out of an audio signal and I would like to compute the _average_ tempo out of all the generated values. Example: 253.8171 253.8171 253.8171 126.7117 126.7117 126.7117 126.8721 126.8721 126.8721 126.8426 etc ... The approximative tempo of the source is 126 but as you can see beginning the detection there are false positives. I've tried to compute the arithmetic, gemoetric and harmonic means out of these values: Arithmetic mean : 127.8833534 Geometric mean : 127.6208897 Harmonic mean : 127.4547577 Those values all sound great to me as they're close to each other ... Could some math expert shed some light on which type of mean is the most appropriate ?

Here's a first draft of a data filter:

After you have collected the first $N$ data points, call them $x_1, x_2, ..., x_N$, you calculate a mean, call it $m_N$ and some standard deviation $s_N$. Then look back at the the data points and if any of them don't satisfy a test of not being noisy, $|x_j - m_N| < Cs_N$, for a constant $C > 0$, throw them out of the data set. Now recalculate the mean.

You could tune the algorithm to find the best values of $N$ and $C$ for your application either manually or with machine learning.

There are also more sophisticated approaches. See, e.g., <

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f2e3f157be57f22148372d8aadd164fe