The information here presented is based mainly on the book “An Introduction to Error Analysis: The Study of Uncertainties in Physical Measurements” by John R. Taylor, 1997, $2^{nd}$ Edition. There,

- Chapters 1 and 2 are dedicated to basic concepts.
- Chapter 3 presents the methods for propagating uncertainties.
- Chapter 4 discusses the statistical analysis of random uncertainties.
- Chapter 5 and 6 are dedicated to statistical demonstrations, more or less.
- Chapter 7 is dedicated to the analysis of weighted averages.

# Generalities

In general, when you make some measurements, there are two types of error in those collected values. In one
hand you will have the **random errors**, which are, for example, the errors introduced when dropping a ball
from certain height with your hand. Some times the ball will be dropped from a slightly higher height, and
some times from a smaller height. For this reason it is recommendable to make several measurements of the same
magnitude.

There will also exist, on the other hand, the **systematic errors** (or instrumental errors). These are in
general related to errors introduced in the measurements due to the ruler used to measure the height in the
previous example of the ball not being correctly calibrated. Therefore the measurements with this ruler will
be **consistently** larger (or shorter).

The question is therefore, **how to compute the uncertainties associated with each source of errors** previously
described?, and also **how to combine them?**

There is no strictly correct and justifiable way to identify the systematic errors (normally one works with
estimations), neither there is a procedure to compute the total uncertainty from the systematic and random
errors. To combine them, **it is reasonable** (not strictly correct) to assume that the uncertainty of a
measurement $q$ is the *quadratic sum* of the random and systematic errors

$$ \delta q_{\rm tot} = \sqrt{ \left( \delta q_{\rm ran} \right)^2 + \left( \delta q_{\rm sys} \right)^2 } $$

Now, what follows is to determine and propagate the random errors. Here we may have different circumstances:

- You have a function $q(x,y)$, values $x$ and $y$ are known as well as their uncertainties: see section General formula for error propagation for the treatment.
- You have measured $n$ times the values $x$ and $y$, ending up with the pairs $(x_1, y_1)$, $\ldots$, $(x_n, y_n)$. As result you have $n$ values $q_i(x_i, y_i)$. In this case it is necessary to use the Variance for computing the uncertainty of $\bar{q}$. See section Covariance in Error Propagation.

# The absolute and the fractional (relative) uncertainties

The *absolute uncertainty* $\delta x$ in a measurement
$$
x = x_{\rm best} \pm \delta x
$$
indicates the reliability or precision of that measurement. However it does not tells the whole story, because it
is not showed relative to the measurement. An uncertainty of 1cm in a 1km measurement is extremely precise,
whereas the same 1cm uncertainty in a 3cm measurement would indicate a rather crude estimation. For this
reason, it is useful to have an idea of the ratio between the uncertainty and the measurement it is associated
with. Here enters the *fractional uncertainty*, also known as *relative uncertainty* or *precision*.

$$ \delta x (\%) = \dfrac{\delta x}{\left| x_{\rm best} \right|} \times 100 $$

The fractional uncertainty is usually a small number, therefore, multiplying it by 100 and quoting it as the
*percentage uncertainty* is often convenient. For example, the measurement

$$ l = 50 \pm 1 cm $$

has a fractional uncertainty

$$ \dfrac{\delta l}{\left| l_{\rm best} \right|} = \dfrac{1 cm}{50 cm} = 0.02 $$

and a percentage uncertainty of $2%$. Thus the result of measuring $l$ could also be given as

$$ l = 50 cm \pm 2\% $$

Fractional uncertainties are dimensionless, and can be used to classify as acceptable or not a set of measurements:

- Percentage uncertainty $\ge 10\%$: fairly rough measurements.
- Percentage uncertainty $\sim 1 \;{\rm or}\; 2\%$: reasonably careful measurements.

# General formula for error propagation

Suppose that $x, …, z$ are measured with uncertainties $\delta x, …, \delta z$ and the measured values are
used to compute the function $q(x, …, z)$. **If the uncertainties in $x, …, z$ are independent and random**,
then the absolute uncertainty in $q$ is

\begin{equation} \delta q = \sqrt{ \left( \dfrac{\partial q}{\partial x} \delta x \right)^2 + \cdots + \left( \dfrac{\partial q}{\partial z} \delta z \right)^2 } \end{equation}

This is known as the *sum in quadrature* or *quadratic sum* of the uncertainties, and as long as the
measurements were independent and random, it will better describe the uncertainty of $q$ than the simple sum
of the partial derivatives of $q$ with respect to the independent variables, i.e. without taking the
quadratic sum, just the sum.

In any case, whether or not the errors associated to $x$ and $y$ are random and independent, the uncertainty of $q$ is certainly never larger than the ordinary sum

\begin{equation} \delta q \leq \left| \dfrac{\partial q}{\partial x} \right| \delta x + \cdots + \left| \dfrac{\partial q}{\partial z} \right| \delta z \end{equation}

If there is any reason to suspect that errors in $x$ and $y$ are not independent and random, it is not justifiable to use the quadratic sum for $\delta q$. In these cases it is safer to use the upper boundary $ \delta q \leq \cdots $.

Take into account that all other formulas, i.e. for the sum and subtraction, for the multiplication and division, power, etc. can be deduced from this general one, applying the corresponding derivatives.

**When working with relative uncertainties**, it is useful to transform the general equations into

\begin{equation} \dfrac{\delta q}{q} = \sqrt{ \left( \dfrac{1}{q} \dfrac{\partial q}{\partial x} \delta x \right)^2 + \cdots + \left( \dfrac{1}{q} \dfrac{\partial q}{\partial z} \delta z \right)^2 } \end{equation}

or

\begin{equation} \dfrac{\delta q}{q} \leq \left| \dfrac{1}{q} \dfrac{\partial q}{\partial x} \right| \delta x + \cdots + \left| \dfrac{1}{q} \dfrac{\partial q}{\partial z} \right| \delta z \end{equation}

One clear example is the following: As the systematic uncertainties of $T$ and $m$ are estimated as $0.5%$ and $1%$, respectively, and the objective is to propagate them following the equation

\begin{equation} k = 4\pi^2 \dfrac{m}{T^2} \end{equation}

and working with relative uncertainty leads to

\begin{equation} \dfrac{\delta k_{\rm sys}}{k} = \sqrt{ \left( \dfrac{\delta m_{\rm sys}}{m} \right)^2 + \left( 2 \dfrac{\delta T_{\rm sys}}{T} \right)^2 } = \sqrt{(1\%)^2 + (2\cdot0.5\%)^2} = 1.4\% \end{equation}

where $\dfrac{\delta m_{\rm sys}}{m}$ and $\dfrac{\delta T_{\rm sys}}{T}$ are directly and conveniently the systematic errors already estimated.

# Statistical analysis of random uncertainties

If we have $n$ measurements of the same quantity $x$ using the same method: $x_1, x_2, \ldots, x_n$. As long as all uncertainties are random and small, it can be justified that:

## The mean

The best estimate for $x$ is the mean of the $n$ measurements:

\begin{equation} \bar{x} = \dfrac{1}{n} \sum_{i = 1}^n x_i \end{equation}

## The standard deviation

The **average uncertainty** of the $n$ individual measurements is given by the standard deviation, or SD:

\begin{equation} \sigma_x = \sqrt{\dfrac{1}{n - 1} \sum_{i=1}^n (x_i - \bar{x})^2} \end{equation}

**Note that it is not the uncertainty** of $\bar{x}$, but the average uncertainty of all the $x_i$.

Based on the denominator, if it is

- $n-1$: it is the
**sample**standard deviation - $n$: it is the
**population**standard deviation

Despite their difference is almost always insignificant, **as long as $n > 5$** —which should always
happen— using the *sample SD* is more appropriate, and **it should always be specified which one you
used**. Also, calculators and software most of the time do not specify which one they used, and is important to
know it.

In conclusion, $\sigma_x$ is the uncertainty in any one measurement of $x$,

\begin{equation} \delta x = \sigma_x \end{equation}

and with this choice we can be $68%$ confident that any one measurement will fall within $\sigma_x$ of the correct answer.

## The standard deviation of the mean

The uncertainty of the mean value $\bar{x}$ is

\begin{equation} \sigma_{\bar{x}} = \dfrac{\sigma_x}{\sqrt{n}} \end{equation}

Of course, this will be the random error component $\delta x_{\rm ran} = \sigma_{\bar{x}}$. In case systematic errors are also present, the total uncertainty will be

\begin{equation} \delta x_{\rm tot} = \sqrt{ \left( \delta x_{\rm ran} \right)^2 + \left( \delta x_{\rm sys} \right)^2 } \end{equation}

## The variance

Although not used in these specific methods for analysis of errors, the variance is also an interesting
quantity. **It is the square of the standard deviation**.

\begin{equation} {\rm Var} = \sigma_x^2 = \dfrac{1}{n - 1} \sum_{i=1}^n (x_i - \bar{x})^2 \end{equation}

## Covariance in Error Propagation

Suppose that to find a value for the function $q(x,y)$ we measure the two quantities $x$ and $y$ several times, obtaining $n$ pairs of data, $x_1,y_1$, $\ldots$, $x_n,y_n$.

In this situation, the treatment is different to that in section General formula for error propagation. In this case the variance is needed. See chapter 9 of the mentioned book for details.

# Weighted averages

Suppose two students measured the quantity $x$ and obtained that:

\begin{equation} {\rm Student\; A:} \; x = x_a \pm \sigma_a \end{equation}

and

\begin{equation} {\rm Student \; B:} \; x = x_b \pm \sigma_b \end{equation}

where $x_a$ is the mean of all student A measurements and $\sigma_a$ the standard deviation of that mean (similarly for $x_b$ and $\sigma_b$).

**The question is how to best combine $x_a$ and $x_b$ for a single best estimate of $x$.**

In the general case, suppose there are $n$ separate measurements of a quantity $x$,

\begin{equation} x_1 \pm \sigma_1, x_2 \pm \sigma_2, \ldots, x_n \pm \sigma_n \end{equation}

It is possible to demonstrate that the best estimate based on these measurements is the weighted average

\begin{equation} x_{\rm wav} = \dfrac{\sum_{i=1}^n (w_i \cdot x_i)}{\sum_{i=1}^n w_i} \end{equation}

where the *weight* $w_i$ of each measurement is the inverse square of the corresponding uncertainty

\begin{equation} w_i = \dfrac{1}{\sigma_i^2} \end{equation}

Finally, it can be proven by error propagation that the uncertainty of $x_{\rm wav}$ is

\begin{equation} \sigma_{\rm wav} = \dfrac{1}{\sqrt{\sum_{i=1}^n w_i}} \end{equation}

# Least-squares fitting

See Chapter 8 on page 181(193 electronic) of the book. See a summary of Chapter 8 in page 197(209 electronic).

Thanks for reading the post! Do not hesitate to write me an email, and share your point of view 😉: contact@poview.org