Wednesday, November 18, 2020

Real Life Data = Piecewise Functions

Another talk I attended discussed the use of real life data and then figuring out an equation using one of the regressions for line of best fit.  Unfortunately most text books focus only on using linear regression to find an equation for the line of best fit for a scatter plot.  

This talk was so interesting because the presenter used more than linear regression to find an equation for the data points.  This person provided real life data from the CDC on the number of opioid deaths over the years.  

Once he had the data inputed and the stat plot up on the screen, he began using various regressions to see which produced a line that fit the data as well as possible.  It was obvious the standard y = ax + b created a line that had an r^2 indicating it wasn't that accurate.  Furthermore, the end of the data showed a steeper curve indicating the equation needed might be an exponential one. 

I loved the way he showed us how equations created by quadratic, cubic, quintic regression matched the data.  This lead us to seeing how different parts of each equation matched up with the curve of the data.  It showed a real visual reason for using piecewise functions to end up with a series of functions to match the data.  In the past I have taught piecewise functions but I never had a context for why one would use it but now I understand a good application of it.

After watching the presentation, I realized that I need to include this type of information when teaching either linear regression or piecewise functions.  My pre-calc students are taught linear regression in the first chapter without a proper context so I think I'll expand that lesson the include other types of regression applied to the same data so students understand the line of best fit might be made up of sections of a variety of equations.

The presenter used the TI-84 to show how to do each regression and the piecewise.  He used a newer one that had the piecewise function choice.  The ones I have do not have that choice and as much as I like the TI-84, Desmos is easier to read for discontinuities, find the values for intersections, and other pieces of information.  I actually have students use both so they have the ability to use both applications. 

This gives students the experience to use a variety of tools depending on the circumstances.  They have to be able to use both because they may not have access to a handheld calculator but they do to the other.  It is important they exposed to a variety of tools.  It appears that Geogebra can also be used to create a variety of regressions. 

The gentleman also had data for the coronavirus and a few other things which makes it easier to start teaching the topic with something more relatable for my students. Furthermore, I don't think I've done any regression other than linear regression since college and even then it was by hand because they wanted us to know how it worked.

So next time I teach linear regression I am going to use this information and the different programs to create a piece wise equations. I'll be looking for some nice reliable data for other activities.  Let me know what you think, I'd love to hear.  Have a great day.


No comments:

Post a Comment