cgobat/asymmetric_uncertainty

Handling correlations between variables

Opened this issue · 0 comments

This package currently has very limited capacity for correctly handling correlations between variables. For example, for two quantities with uncertainties $x\pm\sigma_x$ and $y\pm\sigma_y$, $(x-x) \not\equiv (x-y)$, even if $x=y$ and $\sigma_x = \sigma_y$. This is because $x-x\equiv0\pm0$, but $x-y=0\pm\sigma_{x-y}$, with $\sigma_{x-y}\neq0$.

The functionality to handle this specific subtraction case is already planned (i.e., a_u.__sub__(self, other) checks if other is self), but in general the propagation formulae implemented by this package assume uncorrelated operands. The uncertainties package for symmetric error propagation handles this correctly, and it would be nice if this package could too. Checks for identity should be fairly straightforward to implement, but users may also wish to indicate correlation between two variables that don't share an address in memory (i.e., self is other is False). Some other way of keeping track of (auto)corrrelation may therefore eventually be called for/warranted.