4
$\begingroup$

I understand that when Around is used in computations, uncertainties are by default propagated using a first-order series approximation, assuming no correlations. On the other hand this makes it impossible to propagate uncertainties where one variable appears more than once in the formula, even if all the variables are uncorrelated to each other, because it looks like Mathematica is considering every appearance of the same variable as different variables. Take for instance:

a = Around[7,2];

4a yields 28pm8 (correct result) whereas a+a+a+a yields 28pm4 (wrong). Well, in this case it's obvious how to solve the problem, but if we need for example:

a+Log[a]

Mathematica yields 8.9pm2.0 and I haven't found a way to get the proper result 8.9pm2.3.

$\endgroup$
2
  • 1
    $\begingroup$ In your example, the reason has to do with how expressions are evaluated: a + a + a + a first evaluates to the sum of four Around[] expressions, Around[7,2] + Around[7,2] +.... No reference to the fact that they came from the same variable remains. Around would need to keep an ID tag in order to correlate errors, something that is not done, AFAIK. $\endgroup$
    – Michael E2
    Commented Feb 23, 2021 at 17:38
  • 1
    $\begingroup$ Note that one of the basic examples in the Around documentation is the exact point you make (sum vs. multiplication): "Two different instances of the same Around object are assumed to be uncorrelated; Therefore, the resulting uncertainty is smaller than that obtained by multiplication by 2". I agree that this leads to complications though. AroundReplace seems to be the (very clumsy!) answer to this problem. $\endgroup$
    – MarcoB
    Commented Feb 23, 2021 at 18:31

1 Answer 1

5
$\begingroup$

New in Mathematica 12 is AroundReplace

AroundReplace[x+Log[x], x->Around[7,2]]
8.9±2.3

I agree that Around is somehow broken or at least not well documented on how does it makes sense on the way it distributes errors. See on this question which is somehow related. My answer comes from the answers I got there .

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.