# Calculating standard error of the mean when we have uncertainties for each measurement

## Our measurement method

Suppose we want to measure the period oscillation of a simple pendulum consisting of a weight hanging from a string. We displace the weight, let it go and measure the time $$t$$ of one full oscillation with a digital stopwatch1.

We repeat this measurement five times, so our data are:

$$t = 5.1, 5.3, 5.3, 4.9, 5.0 s$$.

Our mean is $$\bar{t}=5.12 s$$.

The standard error of the mean $$\sigma_{\bar{x}}$$ is calculated with equation

$$\sigma_{\bar{t}} = \frac{s}{\sqrt{n}}, \tag{1}$$

where s is the standard deviation of our sample. Using our data we get:

$$\sigma_{\bar{t}} = \frac{0.1789}{\sqrt{5}} = 0.08 \ s.$$

This gives the final value for the measurement:

$$\bar{t} = 5.12±0.08 \ s.$$

## My question

When estimating $$\sigma_{\bar{t}}$$, can we take into account the uncertainty of each individual measurement?

In our example, the digital stopwatch has a display that shows time with one decimal digit. We can estimate the uncertainty of individual measurement $$u(t)$$ to be half of the smallest digit:

$$u(t) = 0.05 \ s.$$

Can we use this uncertainty and improve Eq. 1?

Footnotes:

1. We can improve the accuracy of our measurement by measuring the time of eight full oscillations and then dividing the result by eight. However, for simplicity let's stick with one oscillation here, since the question is not about measurement technique.

The traditional statistical analysis of your five observations would be rather different than a physicist's 'error analysis'. Here is the usual terminology of the statistical analysis, along with methods of computation. The statistical analysis assumes that the measurements are a random sample from a normal distribution with unknown mean $$\mu$$ and standard deviation $$\sigma.$$
Confidence interval. The usual statistical approach would be to find a 95% 'confidence interval' for the true period of the pendulum. In R statistical software, this interval can be computed as shown below. I use the notation $$X_1, X_2, \dots X_5$$ for the five measurements. (This is to avoid confusion with Student's t distribution, which is used in finding the confidence interval.)
x = c(5.1,5.3,5.3,4.9,5.0)
t.test(x)$conf.int [1] 4.897884 5.342116 attr(,"conf.level") [1] 0.95  Rounded to two places, the confidence interval is $$(4.90, 5.34).$$ The computation is based on $$\bar X \pm t^*S/\sqrt{n}.$$ Here $$\bar X = 5.12, S = 0.179,$$ and $$n = 5.$$ The number $$t^* = 2.776$$ cuts 2.5% of the probability from the upper tail of Student's t distribution (a distribution symmetrical about 0) with $$\nu = n - 1 = 4$$ degrees of freedom. mean(x); sd(x); length(x) [1] 5.12 [1] 0.1788854 [1] 5 qt(.975, 4) [1] 2.776445  Standard errors. The 'standard error of the mean' is $$SD(\bar X) = \sigma/\sqrt{5}.$$ It is estimated as $$S/\sqrt{5} = 0.08.$$ Because the population standard deviation $$\sigma$$ is seldom known, it is usual to use the terminology 'standard error of the mean' for this (estimated) standard error. sd(x)/sqrt(5) [1] 0.08  Margin of error of CI. The margin of error for the confidence interval is the half-width of the confidence interval: $$t^*S/\sqrt{n} = 0.222.$$ qt(.975, 4)*sd(x)/sqrt(5) [1] 0.2221156  Error of a single observation in the sample. If you really see an advantage in knowing the the standard deviation $$SD(X_i)$$ for a single observation, that would be $$\sigma$$ estimated as $$S = 0.179.$$ I see no sound statistical rationale for saying this is "half the smallest digit on the digital stopwatch" because I can imagine sources of error other than rounding. Prediction interval for additional observation. If you want a 95% 'prediction interval' for an additional measurement $$X_6$$ (not used to estimate $$\mu$$ by $$\bar X$$ or $$\sigma$$ by $$S$$), that would be found as $$\bar X \pm 2.776S\sqrt{1 + 1/5}$$ or $$(4.58, 5.66).$$ pm = c(-1,1); mean(x) + pm*qt(.975,4)*sd(x)*sqrt(1.2) [1] 4.57593 5.66407  Notice that two sources of error are involved here: error from the original sample of five and the error of the new measurement. [If $$\mu$$ and $$\sigma$$ were precisely known (not estimated from five observations), the 95% prediction interval for $$X_6$$ would be $$\mu \pm 1.96\sigma.]$$ • Excellent answer. What statistic would you suggest to use as uncertainty of our measurements of$\bar{t}$instead of standard error of the mean (0.08 𝑠) when publishing in a physics journal? – Evgenii Feb 25 '19 at 3:10 • Another question, how do we know if we can assume that the population is normally distributed here? – Evgenii Feb 25 '19 at 3:13 • Publishing is a physics journal, you should probably keep close to the customary way of reporting errors. I have seen the (estimated) standard error of the sample mean$\bar X$used for that. As a statistician, I might prefer giving the 95% CI for$\mu.\$ // If you had several dozen observations, rather than only 5, you might do a goodness-of-fit test to see if data are actually normal. What dist'n to use for astronomical data was a debate btw Gauss and Laplace (each proud of his own dist'n). Gauss's normal dist'n seems to have won and may often be right in physics, but I guess not always. – BruceET Feb 25 '19 at 3:20