In the following text, uncertainty refers to standard deviation.
I have 500 time series which I use in a few equations and get averages and uncertainties. Through calculations for each time series, I end up with a data set with 500 values of the position z, the resistance $R(z)$, the absolute and the relative uncertainty: $$ z \,, R( z ) \,, \pm \Delta R(z) \,, \pm \frac{\Delta R(z)}{ R(z) }$$
What I want is to calculate the permeation $P$ through the following formula: $$ P=\frac{1}{\int_{z_{min}}^{z_{max}}R(z)dz} $$
therefore, I need to numerically integrate these 500 values. This is easy with a trapezoidal but the question is what happens to the uncertainty? How does it propagate through the integral? Essentially I want to report the average $ \left( P \pm \Delta P \right) \, [units]$
I found an answer to my question which in my opinion is correct (or at least has a point). Nevertheless it would be nice to have a validation from someone that might know more on the topic.
Since the average is calculated with a trapezoidal (which in reality is a summation) then the standard deviation can also be calculated by uncertainty propagation algebra for addition.
Based on Wikipedia for trapezoidal rule: $$ \int_c^d f(x) dx \approx (d-c) \left[ \frac{f(c)+f(d)}{2} \right] = \left( \frac{d-c}{2} \right) f(c) + \left( \frac{d-c}{2} \right) f(d)$$
which will follow the 2nd uncertainty propagation rule from Wikipedia: $$ f=aA+bB$$
with:
In terms of Python3 code that translates to: