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 Looking at the numbers in the mpg-table
, describe its form (e.g. - linear, non-linear, or none) 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 S for this model?
Write the model below, in both math and Pyret notation.
y = slopex + y-intercept / vertical shift fun y(x): ( * x) + end
6 Is the best-possible linear model a good fit? . Why or why not?
Fitting Curves
7 Sketch your lr-plot in the space below, showing the relationship between
|
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. At what speed is the "peak"?
12 Based on your best-guess curve, what do you predict mpg
would be for a new test run at 25mph ? 60mph ? 90mph ?
These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, 1738598, 2031479, and 1501927). 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.