F distribution on the 41C
|
12-18-2015, 10:25 PM
(This post was last modified: 12-18-2015 10:41 PM by Dieter.)
Post: #17
|
|||
|
|||
RE: F distribution on the 41C
(12-17-2015 12:52 AM)Namir Wrote: Here is a Visual Basic implementation for the cumulative distribution function for the F statistics. It is based on the Handbook of Mathematical Function. Namir, thank you very much for this extensive implementation. But why do you do it this complicated instead of a simple regularized Beta function? Which could be used for other distributions as well. Could you try x=3 with 1 and 5 degrees of freedom? I tried your code in Excel VBA (with the usual syntax modifications for my older version) and got a result of 0,535... while the correct result is 0,856... The problem occurs for df1=1 and df2 odd. Maybe I did something wrong here? BTW I like the Gamma implementation which seems very exact. It seems to use a polynomial approximation for x=0...1. For comparison, here's my humble Gamma(k) function which I use for the distributions – after all only integers and half-integers have to be handled: Code: If k = Int(k) Then g = 1 Else g = sqrt(Pi) ;-) Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)