Getting the average of values with errors.

1.2k Views Asked by At

I have five data values each with an associated error. I want to find the mean of these values but also take the errors into account. How do I do this? Lets say the data values and errors are:

values = [10.0,10.2,10.4,10.6,10.8]
errors = [0.05,0.06,0.03,0.04,0.02]

Just to be clear, the first datum is (10.0 +/- 0.05).

My thoughts: Can I just get an average of the values (10.4) and an average of the errors (0.04) and therefore my overall average is (10.4 +- 0.04)?

Or do I need to add the errors in quadrature? Which gives (10.4 +- 0.095) .

How do I do this ?

1

There are 1 best solutions below

6
On

You have to assume that there exists a random variable ${X_i}$ for each of your datum. Now, you want to be able to speak about an overall random variable $X$ defined as $$X = \frac{1}{5}\sum\limits_{i = 1}^5 {{X_i}} $$ The mean of $X$ is obtainable from $$E[X] = \frac{1}{5}\sum\limits_{i = 1}^5 {E[{X_i}]} $$ and for the standard deviation (which loosely speaking is a measure of error), we have $${\sigma _X} = \sqrt {E[{X^2}] - {{\left( {E[X]} \right)}^2}} = \sqrt {E\left[ {{{\left( {\frac{1}{5}\sum\limits_{i = 1}^5 {{X_i}} } \right)}^2}} \right] - {{\left( {\frac{1}{5}\sum\limits_{i = 1}^5 {{\mu _{{X_i}}}} } \right)}^2}} $$Now, it is usually assume that the random variables are independent, that is $$i \ne j \to E[{X_i}{X_j}] = 0$$so that we get $${\sigma _X} = \frac{1}{5}\sqrt {\sum\limits_{i = 1}^5 {{\sigma _{{X_i}}}^2} } $$