1 Record the pct-college-or-higher and median-income values for the alabama and alaska rows, as (𝑥,𝑦) pairs below:

(AL pct-college-or-higher, AL median-income) (AK pct-college-or-higher, AK median-income)

2 Using the space below, compute the equation of the line passing between these two points. This line will be your linear model (also known as the "predictor function", or "line of best fit"), which predicts median-income as a function of pct-college-or-higher.

3 Write the complete model below (in both Function and Pyret notation):

al-ak(𝑥) = slopex + y-intercept fun al-ak​(​x​): (​  ​* x​) +   end

  • Return to your copy of the starter file and add the code you just wrote to the Definitions Area.

  • Click "Run". (If there are any errors or warnings, fix them and click "Run" again.)

  • In the Interactions Area, try plugging in the pct-college-or-higher value for Alabama by typing al-ak(22.6)

4 How well does it predict the correct median income for Alabama? What about Alaska?

Consider: If it doesn’t predict it perfectly, why might that be?

Try different pct-college-or-higher values from other states, to see how well our Alabama-Alaska model fits the rest of the country.

5 Identify a state for which this model works well:

6 Identify a state for which this model works poorly:

7 What median income does this model expect a state without ANY college graduates (0%) to earn?

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.