HP Forums

Full Version: New HP 39gII programs on my web site
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Hi All,

I have posted four articles about statistical regression calculations for the HP 39gII on my web site.



Very nice. Printed and to be studied in due course.

Should the 43S do statistics in a similar way -- i.e. storing the data as a matrix and doing matrix operations to interpolate etc? Or should we stick with the older fixed accumulation methods?

- Pauli

I think list based statistics are advantageous over summation as long as memory permits. We should consider a mechanism like in the high end pioneers (17b, 27s). Whether we use named lists or matrices is just a matter of taste. BTW, this would free another key location because entering sample data wouldn't need an extra key.

The advantage depends on the data editing features. OTOH, I'm quite content with the way the HP-42S or WP 34S handle this topic.


These really are excellent. Thank you!

I suspect we'll be using them in testing scripts for the system as they cover a lot of areas quite nicely.

The HP39gII programs that I posted show that the machine has a lot teeth to do powerful regression calculations.

I definitely agree. I'm toying with using the Eigen library for the 43S matrix support which provides lots of very easy to use options and includes least square solving, eigen vectors, SVD, decompositions etc. Writing robust and solid matrix code is very difficult.

- Pauli

Aside from function LSQ on the HP 39gII, I found Excel's LINEST function to be very powerful. I have also posted Excel VBA routines, on my web site, that perform calculations for best regression models using Excel's LINEST function. The function returns the regression coefficients, their standard errors, Rsqr, F statistic, and degrees of freedom. If you can mimic LINEST you have a real winner!!


I'm a little skeptical about performance and code size of C++ template based linear algebra code. Templates certainly have their place; I'm just not sure that this is it.

Is Eigen better than other open-source linear algebra libraries?

I too was very skeptical about performance and code size until I used Eigen for real problems. Its code size and speed aren't bad if it is applied sensibly and its ease of use is unparalleled in my experience. Compilation times do increase however -- but these can be mitigated by carefully selecting where the template library is actually compiled and linked against.

Time till tell I guess.

- Pauli

Thanks Namir. :) Much appreciation.