Post Reply 
[WP-34S] Chi-Square Distribution
01-11-2014, 06:18 PM
Post: #3
RE: [WP-34S] Chi-Square Distribution
(01-11-2014 03:02 PM)walter b Wrote:  
(01-11-2014 01:37 PM)Sanjeev Visvanatha Wrote:  Degrees of freedom = 19
Upper tail probability = 0.001

5.4068 is correct for 0.1%, while 43.8202 is correct for 99.9% Smile Integrating form zero to p, the value returned must increase for growing p (see pp. 54f of the manual quoted). The HP-21S calculates with the error probability instead.

I tried this example on my 34s (v. 3.2 3405) and was puzzled about the execution time: about 25 seconds. So I wrote a short quick-and-dirty program based on my original contributions for the chi-square quantile (providing a decent initial guess, followed by a slightly modified Newton iteration), and even this simple user-code program got the result in not much more than four (!) seconds (SP), resp. 5-6 seconds in DP mode. The initial guess is approx. 5,6 (resp. 42,8 for p=0,999) and requires four or five iterations for SP accuracy and one or two more for DP.

Another example:
n = 20, p = 0,05 requires 17 s with the internal function and about 4 resp. 5 s in user code.

Which leads to the question: what's going on there?

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


Messages In This Thread
RE: [WP-34S] Chi-Square Distribution - Dieter - 01-11-2014 06:18 PM



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