Post Reply 
F distribution on the 41C
12-16-2015, 06:05 PM (This post was last modified: 12-16-2015 06:06 PM by Dieter.)
Post: #2
RE: F distribution on the 41C
(12-16-2015 05:02 PM)quantalume Wrote:  I've been looking for a good implementation of the F distribution on the 41C, and the only one I could find is from the HP Business Stat User's Library book (can be found on TOS). The author gives this equation for P value:

Yes, that's the upper tail F integral.

(12-16-2015 05:02 PM)quantalume Wrote:  but actually doesn't use it at all in the implementation. Instead, he uses 26.6.4 and 26.6.5 from Abramowitz and Stegun:

Of course the program *does* use the P(x) formula, but since an integral has to be computed and there is no Integrate function on the 41, this integral is evaluated by means of the series expansions you mentioned.

(12-16-2015 05:02 PM)quantalume Wrote:  The problem is that he doesn't bother to check for the case of v1 and v2 both odd, and the program gives wildly inaccurate results.

The usual mix of poor choice of method and sloppy implementation. #-\

(12-16-2015 05:02 PM)quantalume Wrote:  This looks a bit messy for 41C implementation. Does anyone know of a better F distribution program for the 41C before I dive in on this? Thanks.

Simple. Just write a routine that implements the regularized Incomplete Beta function Ix(a, b) and calculate the F integral with j and k d.o.f. by setting x = k/(j·F+k), a=k/2 and b=j/2 – cf. A&S 26.6.2. Ix can be evaluated with a continued fraction approach, using the (modified) Lentz method. For best accuracy use the reflection formula (let x := 1–x, exchange a and b, result is 1–Ix). This method universally works for odd and even d.o.f.

If you add an implementation of the regularized Incomplete Gamma function you can evaluate all major distributions (Normal, Student's t, Chi², Fisher's F, Binomial, Poisson) by means of these two functions. This is the way my distributions pack for the 35s works. You will find the respective thread in the General Software Library, especially note post #54 ff. and the last post which contains a status file for the 35s emulator.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
F distribution on the 41C - quantalume - 12-16-2015, 05:02 PM
RE: F distribution on the 41C - Dieter - 12-16-2015 06:05 PM
RE: F distribution on the 41C - quantalume - 12-16-2015, 07:55 PM
RE: F distribution on the 41C - Dieter - 12-16-2015, 08:22 PM
RE: F distribution on the 41C - quantalume - 12-16-2015, 09:03 PM
RE: F distribution on the 41C - Dieter - 12-16-2015, 09:08 PM
RE: F distribution on the 41C - Namir - 12-17-2015, 12:52 AM
RE: F distribution on the 41C - quantalume - 12-17-2015, 03:31 PM
RE: F distribution on the 41C - Dieter - 12-18-2015, 10:25 PM
RE: F distribution on the 41C - Namir - 12-19-2015, 02:37 PM
RE: F distribution on the 41C - Dieter - 12-20-2015, 05:02 PM
RE: F distribution on the 41C - Namir - 12-20-2015, 11:15 PM
RE: F distribution on the 41C - Dieter - 12-21-2015, 07:24 PM
RE: F distribution on the 41C - Namir - 12-21-2015, 09:52 PM
RE: F distribution on the 41C - Dieter - 12-25-2015, 02:54 PM
RE: F distribution on the 41C - quantalume - 12-17-2015, 03:36 PM
RE: F distribution on the 41C - Dieter - 12-17-2015, 07:37 PM
RE: F distribution on the 41C - Dieter - 12-17-2015, 09:32 PM
RE: F distribution on the 41C - quantalume - 12-17-2015, 10:35 PM
RE: F distribution on the 41C - Dieter - 12-17-2015, 10:53 PM
RE: F distribution on the 41C - quantalume - 12-17-2015, 11:05 PM
RE: F distribution on the 41C - Dieter - 12-18-2015, 08:38 PM
RE: F distribution on the 41C - quantalume - 12-18-2015, 11:26 PM
RE: F distribution on the 41C - rprosperi - 12-19-2015, 01:39 AM
RE: F distribution on the 41C - Dieter - 12-19-2015, 09:00 AM
RE: F distribution on the 41C - Dieter - 12-19-2015, 09:18 AM
RE: F distribution on the 41C - quantalume - 12-19-2015, 06:22 PM
RE: F distribution on the 41C - Dieter - 12-19-2015, 09:16 PM
RE: F distribution on the 41C - quantalume - 12-20-2015, 12:28 AM
RE: F distribution on the 41C - Dieter - 12-20-2015, 01:17 PM
RE: F distribution on the 41C - Gene - 12-26-2015, 03:38 PM
RE: F distribution on the 41C - Dieter - 12-26-2015, 04:56 PM
RE: F distribution on the 41C - Gene - 12-26-2015, 06:04 PM
RE: F distribution on the 41C - Namir - 12-22-2015, 05:54 AM
RE: F distribution on the 41C - Dieter - 12-22-2015, 07:00 AM
RE: F distribution on the 41C - Paul Dale - 12-22-2015, 07:30 AM
RE: F distribution on the 41C - Dieter - 12-22-2015, 07:50 PM
RE: F distribution on the 41C - Paul Dale - 12-22-2015, 09:34 PM
RE: F distribution on the 41C - Dieter - 12-26-2015, 10:09 PM
RE: F distribution on the 41C - Namir - 12-26-2015, 03:03 PM
RE: F distribution on the 41C - Dieter - 12-26-2015, 05:19 PM
RE: F distribution on the 41C - Gene - 12-30-2015, 05:54 PM



User(s) browsing this thread: 2 Guest(s)