For this page, you’ll need to have the Covid Spread Starter File open 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.
Find the definition of is-MA
in your starter file. The code is shown here:
# is-MA :: Row -> Boolean
# consumes a Row, and checks if state == "MA"
fun is-MA(r): r["state"] == "MA" end
1 Under the definition of is-MA
, define a new function called is-VT
, which tests to see if the state
value is equal to "VT." Click run and try it out!
Find the definition of MA-table
in your starter file. The code is shown here:
#########################################################
# Define some grouped and/or random samples
MA-table = filter(covid-table, is-MA)
2 Under the definition of MA-table
, define a new grouped sample called VT-table
containing all the rows for the state of Vermont.` Click run and try it out!
3 Use lr-plot
to obtain the best-possible linear model for the relationship between day
and positive
in the VT-table
, then fill in the blanks below:
The optimized linear model for this dataset predicts an increase / decrease of about slope y-variable per x-variable.
The error in the model is described by an S-value of about Sunits. I
strongly agree, agree, disagree, strongly disagree that this model is a good fit considering that y-variable in this dataset range from
lowest y-value to highest y-value.
Exponential Model for Vermont (VT)
For this section, in addition to Pyret, open Slide 5: Exponential Model for VT of Modeling Covid Spread (Desmos).
4 Turn to Slide 5: Exponential Model for VT of Modeling Covid Spread (Desmos) and adjust the sliders until you’ve come up with the best exponential model you can for the Vermont dataset. Record your model below:
5 Return to Covid Spread Starter File. At the bottom of the Definitions Area, define exponential-VT
to be the model you just found.
Click "Run" to load your definition, then fit the model using VT-table
.
According to this model, on June 9, 2020day zero there were about
a + k y-units in VT, for a total of about
a + k. This number grew exponentially, increasing by a factor of
Growth Factor: b, or Growth Rate: (b - 1) × 100% every day.
The error in the model is described by an S-value of about
Sunits.
I
strongly agree, agree, disagree, strongly disagree that this model is a good fit considering that
y-units in this dataset range from
lowest y-value to
highest y-value.
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.