Presentation is loading. Please wait.

Presentation is loading. Please wait.

Polynomial Regression Section 4.1.3. Starter 4.1.3 Johnny’s Pizza Shack sells pizzas in seven different sizes. The diameters and costs are shown in the.

Similar presentations


Presentation on theme: "Polynomial Regression Section 4.1.3. Starter 4.1.3 Johnny’s Pizza Shack sells pizzas in seven different sizes. The diameters and costs are shown in the."— Presentation transcript:

1 Polynomial Regression Section 4.1.3

2 Starter 4.1.3 Johnny’s Pizza Shack sells pizzas in seven different sizes. The diameters and costs are shown in the table. Use regression analysis, including residual plots, to argue whether these data are linear, exponential, or neither. Diameter (in)57912151824 Cost ($)1.001.502.754.257.0010.0016.00

3 Objectives Convert polynomial data to linear data by use of logarithm principles Perform linear regression on linearized data Evaluate linear fit by using a residual plot Convert linear results to a polynomial function that models the original data

4 Starter Continued Consider a polynomial function of the form y=ax b The shape of the graph is controlled by b –If b = 2 the function is a quadratic –If b = 3 the function is a cubic, etc. The growth of y is controlled by a –Last year we discussed this as vertical stretch or shrink

5 Linearizing Polynomial Data For the function y=ax b, start by taking logs of both sides –log y = log (ax b ) –log y = log a + log x b product rule –log y = log a + b log xpower rule Now define A = log a Then we have a linear function: –log y = A + b log x(where A and b are unknown) Note that in this case we have the linear association between log y and log x instead of just plain x

6 Starter Concluded You already have the x values in L 1 and the y values in L 2 and the log y values in L 3 Now paste the logs of the x values into L 4 Perform linear regression on L 4 and L 3 –Note the order: L 4 has log x and comes first –Check the residual plot to see if this is a good model It does not matter whether you use x or log x. Why? Note the intercept and slope values you get –These are A and b as previously defined –Find a by evaluating 10 A as before –You already found b: No conversion is needed Look at the equation again to see why: log y = A + b log x

7 The Pizza Model You should have found A = -1.317 –Calculate “little a” –So a = 10 A =.048 You should have found b = 1.829 –So b = 1.829 (No conversion needed) Now write the polynomial model into Y 2 and draw the graph on top of the scatterplot of the data –The equation isy =.048 x 1.829 –If you did it right, they should match

8 Why are the data polynomial? Notice that the exponent was close to 2 –So the function is roughly quadratic. –In other words, price varies as the square of diameter. Why would you expect this association? –Price should depend on area because larger area needs more ingredients. But area varies as the square of radius. –So price should also vary as the square of radius and diameter is just radius / 2. Conclusion: For area problems, expect a quadratic association between explanatory and response variables.

9 Objectives Convert polynomial data to linear data by use of logarithm principles Perform linear regression on linearized data Evaluate linear fit by using a residual plot Convert linear results to a polynomial function that models the original data

10 Homework Read pages 190 – 195 Do Example 4.3 (NOT problem 4.3 !!!)


Download ppt "Polynomial Regression Section 4.1.3. Starter 4.1.3 Johnny’s Pizza Shack sells pizzas in seven different sizes. The diameters and costs are shown in the."

Similar presentations


Ads by Google