For this page, you’ll need to open the Fuel Efficiency Starter File on your computer. If you haven’t already, select Save a Copy from the "File" menu to make a copy of the file that’s just for you. Read the comments at the top of the file, which describe what each column in the dataset means.

Fitting Linear Models

1 Evaluate A15, A45 and A75 in the Interactions Area. What model of car is used in all three rows?

2 At what three speeds is this model being tested in these rows?

3 Does there appear to be a relationship between speed and miles-per-gallon? .

4 If so, describe its form (e.g. - linear or curved) and strength (strong, moderate, or weak).
If it appears to be linear, what is the direction? If it does not appear to be linear, describe its shape.

5 Use lr-plot​(​mpg-table, "model", "speed", "mpg"​) to find the optimal linear model. What is the 𝑅2?

Write the model below, in both math and Pyret notation.

𝑓(𝑥) = slopex + y-intercept fun f​(​x​): (​  ​* x​) +   end

6 Is the best-possible linear model good? . Why or why not?

Fitting Curves

7 Sketch your lr-plot in the space below, showing the relationship between speed and mpg. Be sure to label your axes, and draw the linear model!

a tight cluster of points around a parabola, with a quadratic curve fit to the points

8 What do you Notice?

9 What do you Wonder?

10 Do you think a curve would fit better?

11 Draw a curve on your scatter-plot, which shows the overall shape in the data.

12 At what speed does your curve "peak"?

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927). CCbadge Bootstrap by the Bootstrap Community is licensed under a Creative Commons 4.0 Unported License. This license does not grant permission to run training or professional development. Offering training or professional development with materials substantially derived from Bootstrap must be approved in writing by a Bootstrap Director. Permissions beyond the scope of this license, such as to run training, may be available by contacting contact@BootstrapWorld.org.