The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

Best statistical fit
Message #1 Posted by Richard Berler on 29 Oct 2013, 10:36 p.m.

Is there a way to have the Prime choose the best model fit of a 2 Var statistical data set as on the HP 30b?

Thanks for including trig fit model and user created fit option!

      
Re: Best statistical fit
Message #2 Posted by Walter B on 30 Oct 2013, 12:02 a.m.,
in response to message #1 by Richard Berler

I don't own a Prime for reasons explained elsewhere, but I'd recommend writing a little program using alll the fit models applicable and then choosing the one which returns the maximum r^2. At least that's what the BEST setting in the HP-42S does - and BESTF in the WP 34S. It's an automatic 'brute force' approach though, so watch the result.

d:-)

            
Re: Best statistical fit
Message #3 Posted by Joe Horn on 30 Oct 2013, 12:48 a.m.,
in response to message #2 by Walter B

While we're on the subject, are the EXPONENTIAL and EXPONENT fits just two different ways of expressing the same fit? Everything data set I've tried gets the same r^2 for both fits.

                  
Re: Best statistical fit
Message #4 Posted by Dieter on 30 Oct 2013, 6:10 a.m.,
in response to message #3 by Joe Horn

Yes, EXPONENTIAL and EXPONENT are essentially the same regression model. Take a look at the manual, p. 231:

In EXPONENTIAL mode, y equals  b · em·x

In EXPONENT mode, y equals b · mx

Since mx = eln m · x both ways describe the same regression curve. Parameter b is the same in both cases, and the value for m in EXPONENTIAL mode simply is the natural logarithm of the m returned in EXPONENT mode.

Dieter

                        
Re: Best statistical fit
Message #5 Posted by Joe Horn on 30 Oct 2013, 1:07 p.m.,
in response to message #4 by Dieter

Thanks, Dieter!

      
Re: Best statistical fit
Message #6 Posted by Tim Wessman on 30 Oct 2013, 1:32 p.m.,
in response to message #1 by Richard Berler

Just a note - the user fit is not really for fitting, rather for editing and adjusting the line in the plot more then anything.

There is not a best fit because the trig/logarithm ones can go so awry and take way too long. I suppose it could be limited to the well behaved fits or something...

TW

            
Re: Best statistical fit
Message #7 Posted by Harold A Climer on 30 Oct 2013, 4:07 p.m.,
in response to message #6 by Tim Wessman

Quote:
Just a note - the user fit is not really for fitting, rather for editing and adjusting the line in the plot more then anything.

There is not a best fit because the trig/logarithm ones can go so awry and take way too long. I suppose it could be limited to the well behaved fits or something...

TW


In my years of teaching, I have always thought that the best fit selection on previous HP calculators was not the best way to fit data .

It is sometimes misleading to students to use this selection when fitting data. Sometimes it is possible to get a higher regression coefficient or a smaller RMSE using the best fit of data to a linear function when the student is supposed to know(Since they have already been told this by their instructor or it is in the lab handouts,[which most of them do not read] that the phenomena should behave as a natural exponential function. This the same kind of idea that Tim talked about as regards the CAS not being a Black Box, I have students every semester that do not know that a numerical result is incorrect,even when they are told up front the possible range of values they should expect to get beforehand. Charles Dickens had a quote about Medical Students,but I think it applies to students in general.

                  
Re: Best statistical fit
Message #8 Posted by Richard Berler on 30 Oct 2013, 8:06 p.m.,
in response to message #7 by Harold A Climer

I agree!

I was initially disappointed that some HP 50g integrations required substitutions in order to accomplish the integration. Yet, I find that I feel a bit more in touch with the problems when I carry out the substitutions, and get the correct solutions.

In my field, meteorology, folks will see a digital bank thermometer display or car thermometer display that is far from the true air temperature, and accept it as true simply because a digital display seems authoritative...

In statistics, the normal distributions are often blindly applied to data that is not truly normally distributed. With the statistic apps on calculators and computers, it's easy to come up with nice tables of standard deviations and so on, and folks will make probabilistic statements that are inaccurate (especially for the tails of the distributions)...

                        
Re: Best statistical fit
Message #9 Posted by Walter B on 30 Oct 2013, 11:25 p.m.,
in response to message #8 by Richard Berler

Please see the footnote on p. 229 of the WP 34S Owner's Manual (print edition). Its predecessor is on p. 204 of the pdf (v3.1). You'll find a lot of statistics in the WP 34S.

d:-)


[ Return to Index | Top of Index ]

Go back to the main exhibit hall