SCUQ  


This is a repost of my graduate work in Germany. My supervisor retired in 2007 and his university website was taken down. That also erased my publicly available thesis. I am reposting it here for archival purposes.

SCUQ – A Class Library for the Evaluation of Scalar- and Complex-Valued Uncertain Quantities

A measurement evaluation is not complete, unless the uncertainty and unit of the measured quantity are also reported in addition to the measured value. In general, the measured quantity is based on several correlated other quantities. In most cases the physical model relating these input parameters is known. A standard evaluating the uncertainty of the measured quantity in this case is proposed by the ISO Guide to the expression of uncertainty in measurements (GUM). The GUM proposes using the means of frequential statistics to evaluate the problem. Therefore effects that cannot be expressed using relative long run frequencies (i.e. repeated measurements) are randomised. Although the GUM is widely accepted and has been ported to national standards, it is a proven approximation of systematic effects contributing to the uncertainty of the measured quantity.

Weise and Wöger propose an alternate approach using Bayesian inference. Bayesian inference allows incorporating a degree of belief into the statistical evaluation of a quantity. Therefore, their method can model systematic effects more accurately than the GUM does. According to the authors, the outcomes of their method are in line with the requirements of the GUM.

In this thesis, we evaluate both approaches in general and evaluate the following problems in particular:

  • propagation of the uncertainty of scalar-valued (real) input quantities contributing to one scalar (real) output parameter,
  • propagation of the uncertainty of complex-valued input quantities contributing to one complex-valued output parameter.

Related work focusing on these problem domains is reviewed and a class library implemented in Python that can be used by software applications to propagate the uncertainty in both cases automatically, is presented. We implemented methods that use frequential statistics and present a software design implementing the method proposed by Weise and Wöger. Furthermore, we implemented classes evaluating the physical units of all quantities of the physical model. These classes can be used optionally to verify the physical model.

We tested the class library by evaluating solved problems of other researchers. Furthermore, we verified our implementation using a suite of component tests that can also be used to test the compatibility of the destination platform. Our library evaluated all presented problems correctly, and it was tested using Python 2.4 and NumPy 1.0.1 on Microsoft Windows XP and SUSE Linux 9.3 on 80x86 platforms.

We are confident that this class library can be used as a cornerstone in many software applications for uncertainty propagation.

2025 Update: I have not maintained this code in almost 20 years. Your runway may vary if you try to use it. Baysian uncertainty propagation does not seem to be coded up anywhere else, so I am keeping this online for archival purposes, wheras the GUM approach is widely available in other libraries, such as MetroloPy.

Published: 2007-02-19
Updated  : 2025-10-03
Not a spam bot? Want to leave comments or provide editorial guidance? Please click any of the social links below and make an effort to connect. I promise I read all messages and will respond at my choosing.
← Beginning the Blog