HP Forums
WP34s: statistical distributions (reminder) - Printable Version

+- HP Forums (http://www.hpmuseum.org/forum)
+-- Forum: Not HP Calculators (/forum-7.html)
+--- Forum: Not quite HP Calculators - but related (/forum-8.html)
+--- Thread: WP34s: statistical distributions (reminder) (/thread-2963.html)



WP34s: statistical distributions (reminder) - Dieter - 01-29-2015 08:07 PM

Since the 34s project recently got some nice improvements and fixes, maybe it's time to humbly remind of an older thread from last May/June where some flaws in the Student CDF – function "t(x)" – and the Student/Chi² quantile functions have been discussed: cf. this thread.

The fix for t(x) is quite simple and straightforward, so that it could be applied immediately (cf. post #9 in the old thread). To see the problem, try t(1E–17) with 10 degrees of freedom: the current firmware returns a plain 0.5 while the exact result is 0.50000 00000 00000 00389 10838 39660 31050 61705..., i.e. there are just 17 valid digits. That's fine for SP, but not for DP. And it also affects the quantile function.

Last year I proposed an improved algorithm for the Student and Chi² quantiles (as well as a slightly modified Normal quantile so that all three distributions share the same Normal estimate). These versions converge well and return good results even in border cases where the current firmware gives up ("No root found"), e.g. at the Student quantile for 1E–1080 and 1000 degrees of freedom. Pauli: if you're still interested I could offer a wp34s.dat file for the emulator with all relevant code, so that you can easily try and test these algorithms. They are based on what was discussed in last year's thread.

Dieter

Edit: typo corrected


RE: WP34s: statistical distributions (reminder) - Paul Dale - 01-30-2015 12:34 AM

Dieter,

This improved code probably should go into the firmware, so please send it.

Not sure when I'll get it doing it however.


Pauli


RE: WP34s: statistical distributions (reminder) - Dieter - 02-01-2015 02:44 PM

(01-30-2015 12:34 AM)Paul Dale Wrote:  This improved code probably should go into the firmware, so please send it.

OK - is your gmal address still valid? I last used it in 2012. ;-) Or would you prefer a PM via the forum? This way or the other it may take a few days.

Dieter


RE: WP34s: statistical distributions (reminder) - Paul Dale - 02-01-2015 09:24 PM

Both are fine, the gmail has more space I suspect.

Pauli


RE: WP34s: statistical distributions (reminder) - Dieter - 02-01-2015 10:35 PM

(02-01-2015 09:24 PM)Paul Dale Wrote:  Both are fine, the gmail has more space I suspect.

Well, a wp34s.dat file is about 2 KB, so space is not an issue. The text with some comments on the algorithms probably will be longer. ;-)

I'll send something within the next days.

Dieter