Re: New test spreadsheet for normal distribution



I'm slightly worried that what you are testing is more the
number space used than anything having to do with the
normal distribution.

Case in point: inverses1!C17.  This computes the intermediate
result normsdist(8.2) which is so close to 1 that computing with
about 14 digits of precision (which is what gnumeric will do
unless you compile it specially) doesn't work.  normsdist
probably produces the number closest to the desired result.

If you wanted to avoid this catastrophic lost of precision, you
would have computed the right tail directly:

    =r.qnorm(r.pnorm(A17,0,1,FALSE),0,1,FALSE)-A17

This results in an error -1.8e-15.  That is bigger than your
threshold of 1e-15, but you need to use a relative error
threshold.  (And if you did, some of the J-column tests
would get a chance of failing too.)

Note, btw., that with the r.foo functions you could test
much larger z values.  Try 100, but go via log-space:
     =r.qnorm(r.pnorm(A17,0,1,FALSE,TRUE),0,1,FALSE,TRUE)-A17

Morten



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]