CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download
Project: Lab Manual
Views: 13
Visibility: Unlisted (only visible to those who know the link)
Image: ubuntu2204
Kernel: Python 3 (system-wide)

3. Propagation of Uncertainty

3.1 Introduction

Suppose that you've measured quantities aa, bb, cc, … with uncertainties UaU_a, UbU_b, UcU_c, …, and you are calculating a function f(a,b,c,)f(a,b,c,\ldots). For example, you might calculate the average speed of an object by dividing the distance covered by the time elapsed. How would you find the uncertainty of the average speed from the uncertainties of the distance and time? The general process of finding the uncertainty of a calculated quantity is called the propagation of uncertainty.

3.2 General Method

If quantity aa varies by UaU_a while bb, cc, … are held constant, then the function f(a,b,c,)f(a,b,c,\ldots) will vary by (f/a)Ua(\partial f/\partial a)U_a. There are similar variations in ff when the other variables are varied individually. If variations in ff due to each of the quantitiess are independent of each other, the uncertainty of ff due to the uncertainties of all of the quantities is

Uf=(faUa)2+(fbUb)2+.\begin{equation} U_f = \sqrt{\left(\frac{\partial f}{\partial a} U_a\right)^2 + \left(\frac{\partial f}{\partial b} U_b\right)^2 +\ldots}. \tag{3.1} \end{equation}

In other words, the variations due to each variable combine like the components of a vector do to give the length of the vector. Note that this is based on the assumption that the variations in aa, bb, ... are independent of each other.

3.3 Two Frequently-Used Examples

3.3.1 Addition or Subtraction

If the function is a sum or difference, f=a±bf = a \pm b, then the partial derivatives are f/a=1\partial f/\partial a = 1 and f/a=±1\partial f/\partial a = \pm 1. Using equation 3.1, the uncertainty in ff is

Uf=Ua2+Ub2,\begin{equation} U_f = \sqrt{ U_a^2 + U_b^2}, \tag{3.2} \end{equation}

for both addition and subtraction.

If f=a+b+cdf = a + b + \ldots - c - d - \ldots, then equation 3.2 generalizes to

Uf=Ua2+Ub2+Uc2+.\begin{equation} U_f = \sqrt{ U_a^2 + U_b^2 + U_c^2 + \ldots}. \tag{3.3} \end{equation}

3.3.2 Multiplication or Division

If the function is f=abf = ab, then f/a=b\partial f/\partial a = b and f/b=a\partial f/\partial b = a. Using equation 3.1, the uncertainty in ff is

Uf=(bUa)2+(aUb)2=(ab)2[(Uaa)2+(Ubb)2].\begin{equation} U_f = \sqrt{ \left(b U_a\right)^2 + \left(a U_b\right)^2} = \sqrt{(ab)^2 \left[\left(\frac{U_a}{a}\right)^2 + \left(\frac{U_b}{b}\right)^2\right]}. \tag{3.4} \end{equation}

This can be rewritten as

Uf=f(Uaa)2+(Ubb)2,\begin{equation} U_f = f\sqrt{ \left(\frac{U_a}{a}\right)^2 + \left(\frac{U_b}{b}\right)^2}, \tag{3.5} \end{equation}

or

Uff=(Uaa)2+(Ubb)2.\begin{equation} \frac{U_f}{f} = \sqrt{ \left(\frac{U_a}{a}\right)^2 + \left(\frac{U_b}{b}\right)^2}. \tag{3.6} \end{equation}

The same result holds for division (see problem 3.1). The uncertainty of a quantity divided by that quantity (Ua/aU_a/a, for example) is called a fractional uncertainty. For multiplication or division, the fractional uncertainties combine the same way as uncertainties commbine for addition or subtraction. Note that equations 3.5 and 3.6 cannot be used to calculate the uncertainty of a2a^2 by setting a=ba = b (see problem 3.2).

If f=(ab)/(cd)f = (ab\cdots)/(cd\cdots), then equation 3.6 generalizes to

Uff=(Uaa)2+(Ubb)2+(Ucc)2+.\begin{equation} \frac{U_f}{f} = \sqrt{ \left(\frac{U_a}{a}\right)^2 + \left(\frac{U_b}{b}\right)^2 + \left(\frac{U_c}{c}\right)^2 + \ldots}. \tag{3.7} \end{equation}

3.4 Examples

Example 3.1: Suppose that you measure the dimensions of the object below as D=4.24±0.03 cmD = 4.24 \pm 0.03 \ \rm{cm} and H=6.07±0.04 cmH = 6.07 \pm 0.04 \ \rm{cm}.

Are your measurements consistent with those of someone who reports A=31.32±0.61 cm2A = 31.32 \pm 0.61 \ \rm{cm^2}?

In the intermediate steps, we'll keep several digits and display the appropriate number of significant figures in the final step. The area in terms of the measured dimensions DD and HH is

A=HD+12π(D2)2=HD+π8D2,\begin{equation} A = HD + \frac{1}{2}\pi\left(\frac{D}{2}\right)^2 = HD + \frac{\pi}{8}D^2, \tag{3.8} \end{equation}

which gives

A=(6.07 cm)(4.24 cm)+π8(4.24 cm)2=25.737 cm2+7.060 cm2=32.797 cm2.\begin{equation} A = (6.07\ \rm{cm})(4.24\ \rm{cm}) + \frac{\pi}{8}(4.24\ \rm{cm})^2 = 25.737\ \rm{cm}^2 + 7.060\ \rm{cm}^2 = 32.797\ \rm{cm}^2. \tag{3.9} \end{equation}

Using equation 3.1, the uncertainty of the area is

UA=(AHUH)2+(ADUD)2=(DUH)2+[(H+π4D)UD]2,\begin{equation} U_{A} = \sqrt{\left(\frac{\partial A}{\partial H} U_H\right)^2 + \left(\frac{\partial A}{\partial D} U_D\right)^2} = \sqrt{ \left(D U_H\right)^2 + \left[\left(H + \frac{\pi}{4}D \right) U_D \right]^2}, \tag{3.10} \end{equation}

which gives

UA=[(4.24 cm)(0.04 cm)]2+[(6.07 cm+π4(4.24 cm))(0.03 cm)]2=0.329 cm2.\begin{equation} U_{A} = \sqrt{\left[\left(4.24\ \rm{cm}\right)\left(0.04\ \rm{cm}\right)\right]^2 + \left[\left(6.07\ \rm{cm} + \frac{\pi}{4}(4.24\ \rm{cm})\right)\left(0.03\ \rm{cm}\right)\right]^2 } = 0.329\ \rm{cm}^2. \tag{3.11} \end{equation}

Rounding the uncertainty to two significant figures and the area to the same decimal place, the measured area is 32.80±0.33 cm232.80 \pm 0.33\ \rm{cm}^2. The expected ranges for the area are 32.4733.13 cm232.47 - 33.13\ \rm{cm}^2 and 30.7131.93 cm230.71 - 31.93\ \rm{cm}^2, which do not overlap, so they are not consistent.

Example 3.2: Suppose that the number of bacteria in a certain colony at a certain time is N=40,000±200N = 40,000 \pm 200. What is f=lnNf = \ln N? Your answer should include an uncertainty.

The value of ff is ln(40,000)=10.5966\ln(40,000) = 10.5966. The partial derivative of ff with respect to NN is f/N=1/N\partial f/\partial N = 1/N, so

Uf=(fNUN)2=UNN=20040,000=0.005.\begin{equation} U_f = \sqrt{\left( \frac{\partial f}{\partial N} U_N \right) ^2} = \frac{U_N}{N} = \frac{200}{40,000} = 0.005. \tag{3.12} \end{equation}

Rounding lnN\ln N to the same decimal place as the uncertainty, the anwser is 10.597±0.00510.597 \pm 0.005.

3.5 Uncertainty Calculations Using Python

You should learn how to perform uncertainty calculations by hand. Once you've done that, you may also use the uncertainties package in Python. This is described in one of the Computation Tutorials.

3.6 Problems

3.1 Show that equation 3.6 also holds for f=a/bf = a/b.

3.2 Equations 3.5 and 3.6 cannot be used to calculate the uncertainty of a2a^2 by setting a=ba = b.    (a) Explain why those equations can't be used to find Ua2U_{a^2}.    (b) Using equation 3.1, find the correct expression for Ua2U_{a^2}.

3.3 Find an expression for the uncertainty of f=Acos(Bx)f = A \cos (Bx), where AA and BB are constants.

3.4 Suppose that xx is measured to be 85±385 \pm 3. What are the value and uncertainty of log10x\log_{10} x? It will be helpful to know that ddx(log10x)=1xln10.\frac{d}{dx}(\log_{10} x) = \frac{1}{x \ln 10}.

3.5 Suppose that a sample of water with a mass of 1.5 ± 0.1 kg starts at a temperature of 275 ± 4 K and finishes at a temperature of 331 ± 2 K. The specific heat of water is cc = 4186 J/(kg K) with negligible uncertainty. The amount of energy that must flow into the water to cause this temperature increase is given by Q=mcΔTQ = mc\Delta T, where ΔT=TfTi\Delta T = T_f - T_i is the change in temperature. Find the heat flow and its uncertainty. (Hint: First, find ΔT\Delta T and it uncertainty. Treat ΔT\Delta T as a single variable for the final part of the calculation.)