# measurement errors: add up or cancel out?

Take an accelerometer, or a hall sensor, or a thermometer, or any sensor. It will have an accuracy, which means the readings will contain some error of this sort.

My guess is that by taking a big number of readings of the measured parameter will cancel out the sensor inaccuracy to some extent. Or am I wrong ?

And if I am not wrong, how do I compute the accuracy of the averaged number of readings that I take over a period of time ?

• Calibration and error drift budget with environment determines overall gain and offset error. Random noise reduces std deviation error by square root of N samples. Commented Feb 13, 2020 at 10:16
– jonk
Commented Feb 13, 2020 at 10:20
• Yes great answer @jonk ! Commented Feb 13, 2020 at 10:27
• @Sorenp Thanks for the kind thoughts!
– jonk
Commented Feb 13, 2020 at 10:29

My guess is that by taking a big number of readings of the measured parameter will cancel out the sensor inaccuracy to some extent. Or am I wrong ?

The law of large numbers (LLN) says that when averaging a large number of random variable realizations (here: measurements), the result will converge to the expectation of the underlying random distribution. You assume that's the "real" value.

That's only true if you can model your measurement to be a random variable whose expectation is the actual physical entity your measuring; if you model it as correct value + noise, then the noise must be "zero-mean".

That's generally not the case; usually, you have some systematic measurement error that you don't know.

So, yes, you're wrong.

However, repeated measurement will reduce the variance of the overall measurement, and hence make it more reliable (but can't erase the systematic error).

Attention: Your measurements should be stochastically independent, i.e. no use to measure things that are very correlated multiple times. This poses a problem.

how do I compute the accuracy of the averaged number of readings that I take over a period of time ?

"Accuracy" is not the right term here. You want to read up on what variance is. If your measurements are independent in zero-mean noise, but identical in the actual value thing, then averaging $$\K\$$ of them will reduce the variance by a factor of $$\K\DeclareMathOperator{\Var}{Var}\$$ of your measurement $$\Y\$$:

$$\Var(Y):=\Var\left(\frac1K\sum\limits_{i=1}^K X_\text{actual, const.}+N_i\right) = \frac 1K \Var(X_\text{actual, const.}+N) = \frac1K\Var(N)$$

For general estimation theory, you'll have to look into the Fisher Information of your measurement-based estimator, but hint: no fun at this stage.

You always have two kinds or errors: Random error and systematic error

Systematic errors are there always with the same amplitude, they don't change (over long periods of time and extanded temperature range they do have drift as well, this will be defined e.g. in ppm /°C or ppm /y). This means these errors won't cancel out with averaging, because all measurements will have the same systematic error. But if you can determine the systematic error (e.g. by some calibration routine) you can compensate for this error by subtracting a calibration value from your measurement result.

Random errors behaves like you descripe, every measurement varies by some degree due to noise from all kind of sources. You can not correct this error from a single measurement, because there is no way you could possibly know how this exact measurement was altered. BUT you can average this random error down. If you take an infinite amount of samples your average random error will approach 0 (you can still have a systematic error, meaning the mean of your measurements is not representing the real mean value).

The easy way is averaging a large amount of samples. The better way is to evaluate the normal distribution and set a confidence interval say 95% .. Then discard the samples that aren't within that confidence interval of the normal distribution.

I guess it is also worth taking the precision into account. Say if the accelerometer at rest measures 0.9g you would have to offset that precision by 0.1g to get 1g as expected. Now it may measure 0.9, 0,91 0,89 and so on... That would be the accuracy of your sensor. So if you test the sensor in a controlled environment you would be able to handle this.

• Another way, say with a thermometer, submerge it in a slush ice bath, you know the temperature should be almost 0 degrees C, then submerge it in boiling water, the temp should be around 100 degree C.. perform some 20 samples and evaluate the accuracy and precision. Be creative ;) Commented Feb 13, 2020 at 10:20
• Averaging does no good if the errors are not randomly distributed about the true value. Also, I think you are conflating precision and accuracy...they are entirely different concepts. Commented Feb 13, 2020 at 15:13