8 Parameters
The variety of shapes of the nine pattern-book functions means that, often, one or another will be suitable for the modeling situation in hand. But, even if the shape of the function used is appropriate, the pattern still needs to be “adjusted” so that the units of output and input are well matched to the phenomenon being modeled. Let’s consider data from the outbreak of COVID-19 as an example. Figure 8.1 shows, day-by-day, the number of officially confirmed COVID-19 cases as the in the US in March 2020.
During the outbreak, case numbers increased with time. As time went on, the rate of case-number increase itself grew faster and faster. This is the same pattern provided by the exponential function.
Alongside the case-number data Figure 8.1 shows the function
There is an obvious mismatch between the data and the function
This chapter will introduce how modelers stretch and shift the individual patter-book functions so that they can be used in models of real-world situations such as the outbreak of COVID-19.
8.1 Matching numbers to quantities
The coordinate axes in Figure 8.1 represent quantities. On the horizontal axis is time, measured in days. The vertical axis is denominated in “10000 cases,” meaning that the numbers on the vertical scale should be multiplied by 10000 to get the number of cases.
The exponential function takes as input a pure number and produces an output that is also a pure number. This is true for all the pattern-book functions. Since the graph axes don’t show pure numbers, it is no surprise then that the pattern-book exponential function doesn’t align with the COVID case data.
If we want the input to the model function
The standard parameterization for the exponential function is
8.2 Parallel scales
At the heart of how we use the pattern-book functions to model the relationship between quantities is the idea of conversion between one scale and another. Consider these everyday objects: a thermometer and a ruler.
Each object presents a read-out of what’s being measured—temperature or length—on two different scales. At the same time, the objects provide a way to convert one scale to another.
A function gives the output for any given input. We represent the input value as a position on a number line—which we call an “axis”—and the output as a position on another output line, almost always drawn perpendicular to one another. But the two number lines can just as well be parallel to one another. To evaluate the function, find the input value on the input scale and read off the corresponding output.
We can translate the correspondance between one scale and the other into the form of a straight-line function. For instance, if we know the temperature in Fahrenheit (
Section 8.3 will use the
Section 8.4 introduces a second scale conversion function, for the output from pattern-book functions. That scaling will also be in the form of a straight-line function:
8.3 Input scaling
Figure 8.4 is based on the data frame RI-tide
, a minute-by-minute record of the tide level in Providence, Rhode Island (USA) for the period April 1 to 5, 2010. The level
variable is measured in meters; the hour
variable gives the time of the measurement in hours after midnight at the start of April 1.
The pattern-book
To model the tide with a sinusoid, we need to modify the sinusoid to change the scale of the input and output. First, let’s look at how to accomplish the input scaling. Specifically, we want the pure-number input
The challenge is to find values for the parameters
By comparing the two axes, we can estimate that
You can calculate for yourself that the function that relates
Replacing the pure number
8.4 Output scaling
Just as the natural input needs to be scaled before it reaches the pattern-book function, so the output from the pattern-book function needs to be scaled before it presents a result suited for interpreting in the real world.

The overall result of input and output scaling is to tailor the pattern-book function so that it is ready to be used in the real world.
Let’s return to Figure 11.6 which shows that the function
This is the job for output scaling, which takes the output of
We can figure out parameters
You can confirm for yourself that the function that does the job is
Putting everything together, that is, scaling both the input to pattern-book
8.5 A procedure for building models
We’ve been using pattern-book functions as the intermediaries between input scaling and output scaling, using this format.
Pick the specific pattern-book function whose shape resembles that of the relationship you are trying to model. For instance, we picked
for modeling COVID cases versus time (at the start of the pandemic). We picked for modeling tide levels versus time.Find numerical values for the parameters
, , , and . Chapter 11 shows some ways to make this part of the task easier.
It is remarkable that models of a very wide range of real-world relationships between pairs of quantities can be constructed by picking one of a handful of functions, then scaling the input and the output. As we move on to other Blocks in MOSAIC Calculus, you will see how to generalize this to potentially complicated relationships among more than two quantities. That is a big part of the reason you’re studying calculus.
8.6 Other formats for scaling
Often, modelers choose to use input scaling in the form
For the COVID case-number data shown in Figure 8.2, we found that a reasonable match to the data can be had by input- and output-scaling the exponential:
You might wonder why the parameters
Another reason has to do with the algebraic properties of the exponential function. Specifically,
In the case of exponentials, writing the input scaling in the form
A bit of symbolic manipulation of the model can provide some additional insight. As you know, the properties of exponentials and logarithms are such that
8.7 Parameterization conventions
There are conventions for the symbols used for input-scaling parameterization of the pattern-book functions. Knowing these conventions makes it easier to read and assimilate mathematical formulas. In several cases, there is more than one conventional option. For instance, the sinusoid has a variety of parameterization forms that get used depending on which feature of the function is easiest to measure. Table 8.1 list several that are frequently used in practice.
Function | Written form | Parameter 1 | Parameter 2 |
---|---|---|---|
Exponential | Not used | ||
Exponential | Not used | ||
Exponential | Not used | ||
Exponential | Not used | ||
Power-law | exponent | ||
Sinusoid | |||
Sinusoid | |||
Sinusoid | |||
Gaussian | dnorm(x, mean, sd) | “mean” (center) | sd “standard deviation” |
Sigmoid | pnorm(x, mean, sd) | “mean” (center) | sd “standard deviation” |
Straight-line | |||
Straight-line |