Propagation of Error

How do we determine the error in one variable if we know the error in one of more other variables? Let’s focus out discussion on a specific scenario:

We have a sample of ideal gas at \(1.25\pm 0.03\, atm\) with a volume of \(21.27\pm 0.13\, L\) and a temperature of \(298.2\pm 1.4\, K\). How many moles of gas do we have?

How can we answer the question? We can easily use the ideal gas law to determine the number of moles of the gas, but what about the error?

Error can be thought of like it is a change in an about. When we write that the pressure is \(1.25\pm 0.03\,atm\) what we are saying is that the pressure could change up to \(0.03\, atm\) and our measurement would not have noticed. Interpreting the errors as changes gives a clue as to how we treat this error. We need to determine what changes would be exhibited by the number of moles based on the changes in pressure, volume, and temperature. In other words, how \(\Delta n\) is caused by a \(\Delta P\)? If we know how then we can take that change and multiply it by how big of a change (error) we have.

So, how can we represent the change in moles versus a change in pressure? We can do it as a ratio \(\frac{\Delta n}{\Delta P}\). However, we shouldn’t be talking about macroscopic changes, we need to look at infinitesimal changes. So

\[ \begin{equation} \frac{\Delta n}{\Delta P} \rightarrow \frac{dn}{dP} \rightarrow \left(\frac{\partial n}{\partial P}\right)_{V,T} \end{equation} \]

Unfortunately, errors are both positive and negative. Because of this we can express the change (error) in the number of moles of gas based on the change (error) in the pressure as

\[ \begin{equation} \left(\text{change (error) in n}\right)^2 = \left(\frac{\partial n}{\partial P}\right)_{V,T}^2 \left(\text{change (error) in P}\right)^2 \end{equation} \]

\[ \begin{equation} \left(\Delta n\right)^2 = \left(\frac{\partial n}{\partial P}\right)_{V,T}^2 \left(\Delta P\right)^2 \end{equation} \]

So there is an effect on the number of moles caused by the errors in pressure, volume, and temperature in this problem. Therefore, the total change (error) in the number of moles is the sum of all those effects. That is

\[ \begin{equation} \left(\Delta n\right)^2 = \left(\frac{\partial n}{\partial P}\right)_{V,T}^2 \left(\Delta P\right)^2 + \left(\frac{\partial n}{\partial V}\right)_{P,T}^2 \left(\Delta V\right)^2 + \left(\frac{\partial n}{\partial T}\right)_{P,V}^2 \left(\Delta T\right)^2 \end{equation} \]

We know we have an ideal gas so

\[ \begin{equation} PV=nRT \Rightarrow n=\frac{PV}{RT} \end{equation} \]

Therefore

\[ \begin{equation} \left(\frac{\partial n}{\partial P}\right)_{V,T} =\left. \frac{\partial}{\partial P} \frac{PV}{RT} \right|_{V,T} = \frac{V}{RT} \frac{\partial P}{\partial P} = \frac{V}{RT} \end{equation} \]

\[ \begin{equation} \left(\frac{\partial n}{\partial V}\right)_{P,T} =\left. \frac{\partial}{\partial V} \frac{PV}{RT} \right|_{P,T} = \frac{P}{RT} \frac{\partial V}{\partial V} = \frac{P}{RT} \end{equation} \]

\[ \begin{equation} \left(\frac{\partial n}{\partial T}\right)_{P,V} =\left. \frac{\partial}{\partial T} \frac{PV}{RT} \right|_{P,V} = \frac{PV}{R} \frac{\partial}{\partial T}\frac{1}{T} = -\frac{PV}{RT^2} \end{equation} \]

We can substitute these expression into our previous expression for \(\left(\Delta n\right)^2\) and get

\[ \begin{equation} \left(\Delta n\right)^2 = \left(\frac{V}{RT}\right)^2 \left(\Delta P\right)^2 + \left(\frac{P}{RT}\right)^2 \left(\Delta V\right)^2 + \left(-\frac{PV}{RT^2}\right)^2 \left(\Delta T\right)^2 \end{equation} \]

Now we can finally answer our problem

We have a sample of ideal gas at \(1.25\pm 0.03\, atm\) with a volume of \(21.27\pm 0.13\, L\) and a temperature of \(298.2\pm 1.4\, K\). How many moles of gas do we have?

First we just use the ideal gas law to determine the number of moles

\[ \begin{eqnarray} PV=nRT \Rightarrow n &=& \frac{PV}{RT} \nonumber \\ &=& \frac{(1.25\, atm)(21.27\, L)}{(0.08206\frac{L\cdot atm}{mol\cdot K})(298.2\, K)} = 1.08652157\,mol \end{eqnarray}\]

Now we can use our error equation to determine the error in this number

\[ \begin{eqnarray} \left(\Delta n\right)^2 &=& \left(\frac{V}{RT}\right)^2 \left(\Delta P\right)^2 + \left(\frac{P}{RT}\right)^2 \left(\Delta V\right)^2 + \left(-\frac{PV}{RT^2}\right)^2 \left(\Delta T\right)^2 \\ &=& \left(\frac{21.27\,L}{(0.08206\frac{L\cdot atm}{mol\cdot K})(298.2\,K)}\right)^2(0.03\,atm)^2 \nonumber \\ && + \left(\frac{1.25\,atm}{(0.08206\frac{L\cdot atm}{mol\cdot K})(298.2\,K)}\right)^2(0.13\,L)^2 \\ && + \left(-\frac{(1.25\,atm)(21.27\,L)}{(0.08206\frac{L\cdot atm}{mol\cdot K})(298.2\,K)^2}\right)^2(1.4\,K)^2 \nonumber \\ &=& \left(0.869217253\frac{mol}{atm}\right)^2(0.03\,atm)^2 + \left(0.051082349\frac{mol}{L}\right)^2(0.13\,L)^2 \\ && + \left(-0.0036436\frac{mol}{K}\right)^2(1.4\,K)^2 \nonumber \\ &=& 0.000750104\,mol^2 \end{eqnarray} \]

So the error in the number of moles of gas in this problem is the square root of this value

\[ \begin{equation} \Delta n = \sqrt{\left(\Delta n\right)^2} = \sqrt{0.000750104\,mol^2} = 0.027388033\,mol \end{equation} \]

So now we know that we have 1.08652157 moles of gas, plus or minus 0.027388033 moles. We use the error to determine the number of decimal place that we can report. We always round the error so that it has either 1 or 2 non-zero digits. Whether it has one or two digits is controlled by the first (left-most) non-zero digit. If this left-most non-zero digit in the error is \(\ge 3\) we report the error with only one digit and then we round the value to have the same precision as the error. If this left-most digit is \(\le 2\) we report the error with two digits and again round the value to have the same precision as the error. In our case the left-most non-zero digit in the error is a 2 so we need to report the error with 2 digits. That means we report the error as \(0.027\,mol\). This means that we need to round the number of moles to this same precision, that is to the thousandths place. So, we report

\[ \begin{equation} n = 1.087\pm 0.027\,mol = 1.087(27)\,mol \end{equation} \]