[WP-34S] Chi-Square Distribution
01-11-2014, 11:11 PM
Post: #4
 Paul Dale Senior Member Posts: 1,839 Joined: Dec 2013
RE: [WP-34S] Chi-Square Distribution
The distribution code hasn't changed since we did all that work on it. Looking at the code, it boils down to doing the initial estimate and then running the Newton solver. The internal code will be running in double precision, although the convergence criteria is precision mode dependent.

Is it possible your 34S is in one of the slow clock states?

- Pauli

Code:
                XLBL"QF_CHI2"                         xIN MONADIC                         GSB chi2_param                         GSB qf_check_probability                         GSB qf_chi2_est                         _INT DIST_CHI2                         XEQ qf_newton                         xOUT xOUT_NORMAL #define R_P     .00 #define R_T     .01 qf_chi2_est::           LocR 2                         STO R_P                         _INT 15                         x<? J                                 JMP qf_chi2_est_ll                         _INT 1                         JMP qf_chi2_est_ld qf_chi2_est_ll::        _INT 85                         SDR 2 qf_chi2_est_ld::        +/-                         RCL[times] J                         e[^x]                         x[<=]? R_P                                 JMP qf_chi2_large                         Num 1/2                         RCL[times] J                         ENTER[^]        // n/2 n/2 ? ?                         LN[GAMMA]                         RCL/ Y                         e[^x]                         RCL Y           // n/2 exp n/2 ?                         RCL[times] R_P  // pn/2 exp n/2 ?                         RCL Z                         [^x][sqrt]y     // xroot exp n/2                         [times]                         RCL+ X                         JMP qf_chi2_est_exit qf_chi2_large::         RCL R_P                         GSB qf_q_est                         _INT 97                         SDR 2                         [times]         // .97q                         Num Chi2        // 0.2214                         RCL/ J          // .2214/n .97q                         ENTER[^]        // .2214/N .2214/N .97q                         [sqrt]                         RCL[times] Z    // sqrt(.2214/N)*.97q .2214/N .97q                         RCL- Y          // sqrt(.2214/N)*.97q-.2214/N .2214/N .97q                         INC X                         x[^3]                         RCL[times] J    // ch3 .2214/N .97q                         _INT 6                         RCL[times] J                         _INT 16                         +                         SWAP                         x[<=]? Y                                 JMP qf_chi2_est_exit                         RCL R_P                         GSB log1m                         _INT 150                         RCL[times] J                         /                         INC X                         [times] qf_chi2_est_exit::      RCL R_P                         RTN
 « Next Oldest | Next Newest »

 Messages In This Thread [WP-34S] Chi-Square Distribution - Sanjeev Visvanatha - 01-11-2014, 01:37 PM RE: [WP-34S] Chi-Square Distribution - walter b - 01-11-2014, 03:02 PM RE: [WP-34S] Chi-Square Distribution - Dieter - 01-11-2014, 06:18 PM RE: [WP-34S] Chi-Square Distribution - Sanjeev Visvanatha - 01-12-2014, 03:16 PM RE: [WP-34S] Chi-Square Distribution - Sanjeev Visvanatha - 01-12-2014, 03:13 PM RE: [WP-34S] Chi-Square Distribution - walter b - 01-12-2014, 05:57 PM RE: [WP-34S] Chi-Square Distribution - Sanjeev Visvanatha - 01-12-2014, 07:23 PM The sheet (was: RE: [WP-34S] Chi-Square Distribution) - walter b - 01-13-2014, 07:55 PM RE: [WP-34S] Chi-Square Distribution - Sanjeev Visvanatha - 01-14-2014, 03:04 AM RE: [WP-34S] Chi-Square Distribution - Paul Dale - 01-11-2014 11:11 PM RE: [WP-34S] Chi-Square Distribution - Dieter - 01-12-2014, 02:37 PM RE: [WP-34S] Chi-Square Distribution - Paul Dale - 01-12-2014, 09:38 PM RE: [WP-34S] Chi-Square Distribution - Dieter - 01-12-2014, 10:21 PM RE: [WP-34S] Chi-Square Distribution - Paul Dale - 01-13-2014, 01:08 AM RE: [WP-34S] Chi-Square Distribution - Dieter - 01-14-2014, 02:33 PM RE: [WP-34S] Chi-Square Distribution - walter b - 01-14-2014, 02:46 PM RE: [WP-34S] Chi-Square Distribution - Dieter - 01-14-2014, 03:11 PM RE: [WP-34S] Chi-Square Distribution - Paul Dale - 01-14-2014, 10:07 PM RE: [WP-34S] Chi-Square Distribution - Dieter - 01-14-2014, 11:05 PM RE: [WP-34S] Chi-Square Distribution - Paul Dale - 01-16-2014, 01:41 AM

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