# Uncertainty in repetitive measurements

Suppose you have acquired some data from a measurement and you have the following numbers:

• measurement 1: $$1.510 \pm 0.085$$
• measurement 2: $$1.608 \pm 0.089$$
• measurement 3: $$1.566 \pm 0.059$$
• measurement 4: $$1.638 \pm 0.066$$
• measurement 5: $$1.660 \pm 0.071$$

So I have 5 values with their respective uncertainties. Now I'd like to take the mean value of these 5 and report the standard deviation. Three scenarios are in front of my eyes:

1. I take the mean and compute the s.d. by using only the values with no erros, and I get a mean of $$1.596 \pm 0.060$$;

2. I compute the s.d. by using the propagation of errors formula, where $$Q = A+B$$, then $$dQ = (dA^2 +dB^2)^{1/2}$$, and I sum in quadrature for all the 5 errors reported above and I obtain a value of $$1.596 \pm 0.168$$, well larger with respect to case 1;

3. I take the mean of the errors of the 5 measurements that I have with a value of $$1.596 \pm 0.074$$.

I'm really confused because I'm not able to understand how to manage the case where you have to average some data which have errors. If someone has some clues and hints it would be very appreciated.

In general, one should always use all available data to make deductions. If you are so lucky that you have uncertainty bounds on your repeated measurements that means those uncertainties are also a kind of data, and ideally should be used to refine the conclusion.

What I would do is use a weighted method: if we assume the noise and uncertainty is Gaussian, then points with low uncertainty should be given a higher weight than more uncertain points. See this question and its answer. In this case we want to maximize the log-likelihood $$\log(l) = c - (1/2)\sum_i (y_i - \mu)^2/\sigma_i^2$$ where $$a$$ is the sought mean and $$\sigma_i$$ is the uncertainty for each of the data points. The derivative is $$-\sum_i (y_i-\mu)/\sigma_i^2$$ which is zero for the weighted mean $$\mu =\frac{\sum_i y_i/\sigma^2_i}{\sum_i(1/\sigma_i^2)}.$$ Similarly one can calculate a weighted standard deviation: $$\sigma=\sqrt{\frac{N\sum_i (y_i-\mu)^2/\sigma_i^2}{(N-1)\sum_i (1/\sigma_i^2)}}.$$

But note that a lot hinges on the model you are using. Uncertainties do not necessarily have to be Gaussian.

• Thank you so much for the clarifying answer! not just to you Anders but also for other users. It helped me a lot. Feb 7, 2019 at 19:54
• The above are the mean and standard deviation for the samples, and are best estimates for the unknown mean and standard deviation of the population. Oct 31, 2021 at 2:49

Anders S has already given you a very good answer, but I want to show you where you went wrong in your reasoning.

I compute the s.d. by using the propagation of errors formula, where $$Q = A+B$$, then $$dQ = (dA^2 +dB^2)^{1/2}$$, and I sum in quadrature for all the 5 errors reported above and I obtain a value of $$1.596 \pm 0.168$$, well larger with respect to case 1;

This calculates the error in the sum of your measurements. By this method you get that the sum of your measurements is $$7.982 \pm 0.168$$.

But to get the average, you took this sum and then divided by the number of measurements. Since the number of measurements is an exact number with no uncertainty, you can get the error in the average by dividing the error in the sum by the same number.

So you should have $$1.596 \pm 0.036$$ by this method, rather than $$\pm 0.168$$. And you would have improved your error relative to taking a single measurement.

Using Anders method you will get an even smaller error, though.

We need to be careful here. Suppose the data you report in your question are means and standard deviations of the means for a series of random samples. That is, $$1.510 \pm 0.085$$ is the mean $$\pm$$ the standard deviation of the mean for one sample consisting of a number of individual measurements, 1.608±0.089 is the mean ± the standard deviation of the mean for another sample consisting of a number of individual measurements, and so on.

Consider a series of $$i = 1, 2, ...,k$$ random samples, the $$i^{th}$$ sample consisting of $$n_i$$ specific values for the random variable of concern. Each sample can have a different number of specific values. For each sample you evaluate and report the mean and the standard deviation of the mean. The mean of the $$i^{th}$$ sample is $$m_i = {1 \over n_{i}} \sum_{j}^{n_i} y_{ji}$$ where $$y_{ji}$$ is the $$j^{th}$$ value in the $$i^{th}$$ sample. The standard deviation of the mean for the $$i^{th}$$ sample is $$S_i = \sqrt{s_i^2 \over n_i}$$ where $$s_i = \sqrt{{\sum_{j}^{n_i} (y_{ji} - m_i)^2} \over {n_i - 1} }$$ is the standard deviation for the $$i^{th}$$ sample.

The best estimate for the mean is $$m_{best} = {\sum_{i = 1}^{k} m_i/S_i^2 \over \sum_{i = 1}^{k} {1 \over S_i^2}}$$ and the best estimate for the standard deviation of the mean is $$S_{best} = ({\sum_{i = 1}^{k} {1 \over S_i^2}})^{-1/2}$$. You report $$m_{best} \pm S_{best}$$ for your final result.

Note: The sample values mean $$m_{best}$$ and standard deviation $$S_{best}$$ are best-estimates for the unknown population values mean $$\mu$$ and standard deviation of the mean $$\sigma_{\mu}$$.

(For example, see the text Data Analysis for Scientists and Engineers by Meyer for details.)

If your measurements are normally distributed (and systematic uncertainties can be ignored) you could use the mean of the values and the Standard Deviation of the Mean (SDOM) as your final uncertainty. It is simply $$SDOM:\\\sigma_{\overline x}=\frac{\sigma_x}{\sqrt{N}}$$ where $$\sigma_x$$ is just your standard deviation of your measurements and N is your number of measurements.

John Taylor's "An Introduction to Error Analysis" describes this as "the uncertainty in our best estimate for x (namely $$\overline x$$) is the...SDOM" given the above conditions.