By Kardi Teknomo, PhD .

< Previous | Next | Contents >

Correction of Measurement based on Statistics

Suppose we have the following problem. We have a series of measurement that produces a mean and a variance. Then we realized that one of the data was measured incorrectly. Thus, we removed the incorrect data and replace it with the new measurement. Now we would like to know the corrected mean and the corrected variance.

The usual way is of course calculating the sum of all the measurements data that we have and computing the statistics using traditional mean and variance. If you have only a few data, computing the sum of all measurements, square the deviation from the mean is a simple task. However, if you have millions or billions of data that you have computed efficiently the mean and variance based on recursive average and recursive variance without storing the measurement data, you will feel so much inefficient to correct just one measurement (out of billions measurements) using traditional mean and variance. Is there more efficient way to correct single measurement without computing sum of all measurements and all the sum of square the deviation from the mean?

The formulas below give the answers to compute mean and variance based on correction of measurement efficiently.

Correction Measurement
Correction Measurement

See the proof of corrected mean formula and proof of the corrected variance formula .

In above formulas, we use notation Correction Measurement and Correction Measurement are respectively to symbolize the mean and variance before the correction of measurement. We also use notation Correction Measurement and Correction Measurement are respectively to symbolize the mean and variance after the correction of measurement. Let Correction Measurement be the number of measurement data to co mpute the mean and variance. When correct the measurement data, we put out a single data Correction Measurement and we replace it with another single data Correction Measurement into the series of measurement data. Thus, in correction of measurement, the actual number of data does not change. It remains Correction Measurement .

Let us take a simple example.
Using the previous measurement data of 4, 6, 12, 9 we have obtained Correction Measurement and Correction Measurement . Now suppose you just realize that the second measurement data was incorrect and you will replace that measurement with new value of 7. Thus, in here we have Correction Measurement and Correction Measurement with the number of data Correction Measurement .
Without considering all the measurement data, we can compute the corrected mean as
Correction Measurement
We can also compute the corrected variance without recomputed the whole measurement data
Correction Measurement




The interactive program below will give you better understanding of the simple example above. You can also try with your own data. Type your previous average, previous variance and the number of data. Then you also need to input the incorrect measurement data and the correct data (only one data, but not necessarily the last measurement). When you click the "Get corrected mean and the corrected variance" button, the program will give you results of the corrected mean and the corrected variance

Current average , Current variance , Number of data

Incorrect measurement data

Correct data (to replace the incorrect measurement data)


Caution should be noted to use the program above. If the number of data is only less than or equal to 2, the result may be incorrect. Similarly if the wrong- data actually does not exist in the sequence of measurement, the formula will still give the answer though it is incorrect.

< Previous | Next | Contents >

These tutorial is copyrighted .

Preferable reference for this tutorial is

Teknomo, Kardi. (2006) Recursive Average and Variance.
http://people.revoledu.com/kardi/tutorial/RecursiveStatistic/index.html