A Simpler Way to Calculate Error Bars

How to calculate nice error bars?

I remember from undergrad years, one of the biggest sources of confusion was how to compute error bars for experimental data points. I recall my professor in the chemical engineering lab one day showed us the equation for propagation of uncertainty, but we never had the foggiest idea of how it was derived, what justified the use of the equation, or what the assumptions were behind the equation. I don’t fully understand the statistical arguments behind the POU formula. Furthermore, the POU formula is complicated and unwieldy to use for large equations, and I haven’t the foggiest idea how to apply it to an implicit equation.

Constrained Optimization Paradigm

An alternate method of computing error bounds on a function is to recast the problem as two optimization problems. Suppose we have a function f=f(x,y), with uncertainties u_x and u_y What then is the uncertainty in f, u_f?

The way to find u_f, is to first attempt to maximize f subject to the uncertainty bounds on x and y. Then once that problem is compete, then attempt to minimize f subject to the same constraints. This yields quantities f_{max} and f_{min}. Call the nominal value of f, f_0. Then the upper bound on error is f_{max} - f_0, and the lower bound on error is f_0 - f_{min}.

In MATLAB, this problem is easily solved using the Optimization Toolbox with fmincon(). The objective function is f, and the upper and lower bounds on x and y form the vectors of upper and lower bounds on the decision variables.

The advantage of this approach, is that it is intuitively easy to understand. Furthermore, it can expose unevenness in your uncertainty (for example, the lower bound might be much closer to the nominal value than the upper bound). Lastly, this approach works for implicit functions.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s