Regression Analysis II

MME 523

October 28, 2003

 

Part One   Generalizing on Polynomial Fits

 

Look at the system of equations for linear, quadratic and cubic fits.  Can you predict what the system will look

like for a general, kth order, polynomial fit??

 

Part Two    Exponential Fits

 

Consider the data   {  (1, 1.5),  (2, 2.5),  (3, 4.5),  (4, 7.8), (5, 12), (6, 22), (7, 35), (8, 54),  (9, 87)  }

 

            1)  get Maple to plot this  via  display

 

            2)  assume it to be exponential  we seek a good fit to this  of the form  y = Aebx

 

            3)  set up the error function for least squares as last week.  What goes wrong here algebraically?

 

            4)  Different method of attack:

 

                        a)  re compute the data:  (x, ln(y) )  instead of   (x,y)

                        b)  plot THIS data.  What does it suggest?

                        c)   algebraically show that if you begin with   y = Aebx  and take the ln of both sides you get

                                    an equation that is now linear!!! 

                        d)  this suggests a plan of attack consisting of

 

        • look at (x, ln(y) ) 
        • if linear then fit a linear equation  - say   rx  + s   to it
        • now get a fit to the original data by  exponentiating and using

 

                                                                        y =  erx + s

 

                        e)  try this out on the data given and report how you make out

 

 

            comment:  many real applications behave exponentially. These include

 

        • populations
        • bacteria
        • bank interest
        • cooling of objects
        • drug concentrations in the blood

 

            comment 2:  the procedure above produces a good fit to data which works well for interpolating but

                        cannot be at all guaranteed to extrapolate well. Caution urged!!!

 

 

 

Part Three   Housing Costs in Massachusetts

 

                        Please share any data you have collected on this. Feel free to work in pairs!

 

                        Discuss and decide on what you feel is an appropriate fit for it

 

                        Do it!!  (fit a function to it)

 

                        Use it to predict costs in 3 years

 

Part Four    R and R2

 

                        Using the web or books,  report on what R and R2 mean in a regression context

 

                        Generate three examples generating high, low and negative R values via linear fits. You

                        may first wish to answer the following:

 

                        How do I compute R or R2?”          The answer will come from a little work

                        in the Maple Help resources on your part.  Specifically look in the Stat library

                        (get into it by issuing   >with(stats);   )        and then  look at the function describe          

                        and see if you can get it to work for you!  Talk to other people!!