(35S) Statistical Distributions Functions
|
10-31-2015, 09:05 PM
(This post was last modified: 10-31-2015 09:45 PM by Dieter.)
Post: #43
|
|||
|
|||
RE: HP 35s Statistical Distributions Functions
(10-29-2015 07:18 AM)Dieter Wrote: I am not quite happy with the initial guess of the Chi² quantile. This is a very stripped down version of what's implemented in the 34s. But a more sophisticated version that usually converges within 3...5 iterations would require an estimate for the Normal quantile, which is also true for the Student inverse. So this can be done in a unified package that includes all three (or four) distributions. Status report: I am currently working on such a package, and I think it looks not too bad. The package can evaluate the Normal, Student, Chi² and partially F distribution's PDF, CDF and their inverses (except F). The inverse usually requires just a few iterations since the initial guesses are close to the true result. Switching between CDF/PDF and inverse is done by setting Flag 1 (think of "1nverse" ;-)). There are common input routines for the degrees of freedom (with error checks), the random variable X and the probability p. Numerically the major limits are the far Student's distribution tails, so if you need accurate CDFs below, say, 1E–10 a more sophisticated algorithm has to be used. That's why I am trying to implement the regularized Beta function. Which currently works fine with a series expansion for most practical cases of the F distribution. Here are some results: Code: Normal distribution The F distribution is evaluated via an (experimental) regularized Beta function. Once this runs sufficiently fast and accurate, this can also be used for the Student case. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)