Accuracy and error analysis (was Re: [Maxima] primes)



--- Richard Fateman  wrote:
> C Y wrote:
> 
>> c)  When calculations are done using these quantities, there is a
>> resultant uncertainty which can also (usually) be calculated, and
>> as a result the answer has a definite number of significant 
>> figures, and any beyond those are meaningless. 
> 
> An example: You might think that a procedure to compute the
> square root of a number,  say  1+d,   (d much smaller than 1)
> would find a result that had a larger error. say 1+d'  with |d'| >
> |d|.

Yes, this would have been my first guess.

> But in fact the square root should have a SMALLER error, more like
> 1+d/2.
> 
> (1+d/2)^2 =  1+d+  O(d^2 )..

It should have this in "reality" or as a consequence of a proper
implimentation of sqrt computations in a CAS?

> If you run a newton iteration to compute square root, using interval
> arithmetic, you will not get 1+d/2+..
> You might get 1+2d or worse.

I'm not following - you're saying the actual error you would get, doing
a sqrt calculation, is greater than you would expect?  Maxima should
then update the d of the result to reflect this reality, not make an
"assumption" based on it having just done a sqrt on a number.

> So the number of digits of accuracy does not follow simple
> calculations, step by step.

No, but if the Newton iteration is how you solved the sqrt, then Maxima
could propagate this back to the result (in fact that's the whole
point, if I'm understanding you correctly - the error associated with a
sqrt calculation was different in a CAS than in the "normal" case, and
this should be reflected in the error tracking.)  For example, let's
say I do 13+-(1)sec * sqrt(15+-(1))*m/s^2 and want the result in
inches/minutes.  Computing the uncertainty of this answer will be quite
complex, and since sqrt is involved how Maxima does the sqrt will also
introduce error not present in the input (which is in effect not the
real equation, but the instructions to tell Maxima how to run a series
of lower level routines).  In this case of course the uncertainties
defined by the user would utterly overwhelm any Maxima induced error.

There are other fun issues to think about, such as fundamental limits
of nature on accuracy of physical quantities (Heisenberg Uncertainty). 
It would be fun to teach Maxima about those things, but I have no idea
if it could handle them or not.

CY


		
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html