Modeling Data with Lines and Quadratic Functions Before you start: RESET YOUR CALCULATOR: yìÀÁ Data that has both an x and a y can be modeled using linear and/or quadratic functions. Sometimes a linear model is better, sometimes a quadratic model is better. If it seems like the data is in a straight line, then a linear model will be better. If it seems like the data is curved, a quadratic model might be better. In this activity we will try modeling a data with both linear and quadratic models. Suppose a person opens a store that sells cell phones and accessories. Consider the following information about the dollars worth of sales in each of the following months (some months are skipped): Month ( ) Feb (2) Total sales ( ) $1100
Mar (3) $1389
May (5) $2115
July (7) $3392
Oct (10) $5871
What is the independent variable? _____________________ (put an x by it) What is the dependent variable? ______________________ (put a y by it) Okay, now we are going to put this data into our calculator. Push …and then choose “Edit…”. Now enter the data in the two columns, x in the L1 column, y in the L2. I have shown the first three data points, but you should do all five. Now, we want to graph this data. Press yo which brings you into STAT PLOT mode. Hit enter to select Plot1 and hit enter again to turn it to “On” mode. Now press q and go down to ZoomStat and hit enter. You should see something like this: Question #1: Do these points look really straight or do you think that there is a bit of a curve to them?
Now we need to find both a linear regression of this data and a quadratic regression of this data. A regression is just a line or parabola that tries to get as close as possible to the data points. Press … and go over one tab to the right and then choose LinReg(ax+b) and hit enter. What is the equation of the linear regression? Y = Now also do a quadratic regression by pressing … and go over one tab and then choose QuadReg and hit enter. What is the equation of the quadratic regression? Y = Now push the o button and then enter the linear regression into Y1 and the quadratic regression into Y2. Then press s. (Flip to back side)
You should now see both a line and a part of a parabola. It might not look like a parabola to you, but it is (you are only seeing a part of it, and if you zoomed out you would see the whole thing). Question #2: Which one seems to “fit” the data better: the line or the parabola?
Now, if you press ys you can go into TABLE mode and see what the two models predict. Fill in the rest of this table below. Month (x) Feb Mar Apr (2) (3) (4) Actual $1100 $1389 ------Sales LinReg (Y1) QuadReg (Y2)
May Jun (5) (6) $2115 -------
Jul Aug (7) (8) $3392 -------
Sep (9) -------
Oct Nov (10) (11) $5871 -------
Question #3: Which one gets closer to the actual sales, LinReg or QuadReg? Which models the data better, a linear regression or a quadratic regression (parabola)?
Question #4: Even though we don’t have the data for what April, June, August, September and November sales were, we can estimate them using whichever model seems to do a better job. What does our model predict were the sales in each of these months?
Interpolation is using a model to estimate a data point between given data points. Extrapolation is using a model to estimate a data point outside of the range of given data points. (Hint: you can remember these because the first three letters are like Interior and Exterior) Question #5: For each of the following months, when you estimated the sales in Question #4, were you interpolating or extrapolating? April June August September November