Build a Model Computationally

lr-plot computes the optimal linear model using all of the data points.

1 Evaluate lr-plot​(​states-table, "state", "pct-college-or-higher", "median-income"​). What is 𝑆?

2 On the line below, write the optimal linear model that was computed through linear regression:

𝑜𝑝𝑡𝑖𝑚𝑎𝑙(𝑥) = slopex + y-intercept fun optimal​(​x​): (​  ​* x​) +   end

Interpret the Model

We started with a model based on Alabama and Alaska. We can interpret the slope and 𝑆-value below:

The Alabama-Alaskasensible name model predicts that a 1 percent[x-axis units] increase in percent college degrees[x-axis] is associated with a 5613 dollar[slope, y-units] increaseincrease / decrease in median household income[y-axis]. Based on the 𝑆 - 𝑣𝑎𝑙𝑢𝑒 of ~36,164.68S-value, this model fits really, really poorlyreally well, decently, poorly, etc..

3 Describe the optimal model YOU created via linear regression:

The linear-regressionsensible name model predicts that a 1 percent[x-axis units] increase in percent college degrees[x-axis] is associated with a [slope, y-units] increase / decrease in median household income[y-axis]. With an 𝑆-value of S-value, this model fits really well, decently, poorly, etc..

4 What does the slope of this linear model tell us?

5 What does the y-intercept of this linear model tell us?

6 Suppose a state goes from 10% to 11% college graduation. According to this model,

  • What kind of change would we expect to see in the median household income?

  • What if it goes from 50% to 51%?

  • What if it goes from 90% to 91%?

7 Does this model predict the same increase in income for every additional 1% college-or-higher? Why or why not?

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.