Unit 3, lesson 45

Choosing and Interpreting Function Models

How to read the variables, parameters and units of a model, compare a linear and an exponential fit with residuals, and judge when an estimate from data deserves trust.

  • Theory part 89
  • Practice part 90
  • Models

A table of measurements tells you what happened at a few moments. A formula that fits the table lets you ask about every moment in between and beyond. Before you trust its answers, you need to know what the formula assumes, how far it misses the data, and where the data run out.

Key terms

Variables and parameters

Definition A function model y=f(x)y = f(x) describes how one quantity depends on another. The input xx (the independent variable) and the output yy (the dependent variable) are the quantities that change within one situation. A parameter is a constant in the formula that stays fixed within one situation but may take a different value in another, so one formula with parameters describes a whole family of functions. In the linear model y=mx+by = mx + b the parameters are mm and bb, and in the exponential model y=abxy = ab^x they are aa and bb. Parameters are found from given facts or from data, and each one usually has a meaning in the situation.

In plain words Variables are what you plug in and read off. Parameters are the settings that make the general formula fit one particular case.

Example One shop rents bikes for C(h)=4+2.5hC(h) = 4 + 2.5h dollars for hh hours. Here hh is the input and CC the output. The parameter 44 is a fixed fee and 2.52.5 is the charge per hour. A second shop with C(h)=6+2hC(h) = 6 + 2h uses the same linear form with different parameters, and for a ride of h=5h = 5 hours the costs are 16.516.5 and 1616 dollars.

Units

Definition Every variable in a model is measured in a unit, and every parameter carries the unit that makes the formula consistent. Quantities that are added or subtracted must have the same unit, and both sides of an equation must have the same unit. In y=mx+by = mx + b the parameter bb has the unit of yy and the slope mm has the unit of yy per unit of xx, which is also the unit of any average rate of change of the model. An exponent must be a pure number, so in y=abty = ab^t the input tt counts units of time, for example the number of years. Then aa has the unit of yy, and bb has no unit and is the growth factor per unit of time, per year in that example. Changing the unit of the input changes every parameter that refers to it, such as the slope of a line or the growth factor of an exponential model.

In plain words Units tell you what each number in the formula means. Checking them catches many mistakes before any arithmetic does.

Example A tank holds V(t)=500−12tV(t) = 500 - 12t liters of water tt minutes after a drain opens. The 500500 is in liters, the starting volume. The −12-12 is in liters per minute, the rate of change. If time is measured in hours TT instead, then t=60Tt = 60T and

V=500−12(60T)=500−720T,V = 500 - 12(60T) = 500 - 720T,

so the same rate now reads −720-720 liters per hour.

Model assumptions

Definition The assumptions of a model are the statements about the situation that the model takes as true. They decide the form of the function, its domain and the inputs where its answers can be trusted. A linear model assumes the output changes by the same amount over every input interval of the same length. An exponential model assumes it changes by the same factor, that is the same percent, over every input interval of the same length. Every model also assumes that the conditions behind the data stay the same.

In plain words A model is a bet about how the world behaves. Write the bet down, because the answers are only as good as the bet.

Example A phone battery at 100100 percent drops 88 percentage points per hour of video, so B(t)=100−8tB(t) = 100 - 8t. This assumes steady use and a battery that drains evenly. Setting B(t)=0B(t) = 0 gives t=12.5t = 12.5 hours. For larger tt the formula gives negative charge, which is impossible, so the model only makes sense on the domain 0≤t≤12.50 \le t \le 12.5.

Linear versus exponential growth

Definition Take equally spaced inputs x,x+h,x+2h,…x, x + h, x + 2h, \dots with h>0h > 0. A linear function, written here as f(x)=mx+cf(x) = mx + c because bb is needed for the base below, has constant differences,

f(x+h)−f(x)=mh.f(x + h) - f(x) = mh.

An exponential function f(x)=abxf(x) = ab^x with a≠0a \ne 0, b>0b > 0 and b≠1b \ne 1 has constant ratios,

f(x+h)f(x)=bh.\frac{f(x + h)}{f(x)} = b^h.

So for data with equally spaced inputs, nearly constant differences suggest a linear model and nearly constant ratios suggest an exponential one. If a>0a > 0 and b>1b > 1, exponential growth eventually overtakes every linear function. For any mm and cc there is a number XX with abx>mx+cab^x > mx + c for all x>Xx > X.

In plain words Linear growth adds the same amount each step. Exponential growth multiplies by the same factor each step, and when that factor is greater than 11 it always pulls ahead in the end.

Example Start two savings plans at 100100 dollars. One adds 3030 dollars a year, the other grows by 2020 percent a year.

Year tt100+30t100 + 30t100(1.2)t100(1.2)^t
00100100100100
22160160144144
44220220207.36207.36
55250250248.83248.83
66280280298.60298.60

The linear plan leads for five years. The exponential plan passes it between year 55 and year 66 and stays ahead from then on.

Residual

Definition Let a model y=f(x)y = f(x) be fitted to data points (x1,y1),(x2,y2),…,(xn,yn)(x_1, y_1), (x_2, y_2), \dots, (x_n, y_n). The residual at the iith point is the observed value minus the predicted value,

ri=yi−f(xi).r_i = y_i - f(x_i).

It is positive when the point lies above the graph of ff, negative when it lies below, and zero when it lies on the graph. A model fits well when its residuals are small compared with the data and show no systematic pattern. A long run of residuals with the same sign, or residuals that rise and fall in a curve, means the form of the model misses a trend in the data.

In plain words A residual is how far a data point sits above or below the model’s curve. Small and random is good. Lined up in a pattern means the curve has the wrong shape.

Example A town counted its residents, in thousands, every two years. The ratios of successive counts are all close to 1.211.21, and 1.12=1.211.1^2 = 1.21, which suggests the exponential model E(t)=20(1.1)tE(t) = 20(1.1)^t. For comparison take the line through the first and last points, L(t)=20+2.875tL(t) = 20 + 2.875t.

ttCountL(t)L(t)Residual for LLE(t)E(t)Residual for EE
0020.020.0202000202000
2224.124.125.7525.75−1.65-1.6524.224.2−0.10-0.10
4429.429.431.531.5−2.10-2.1029.2829.280.120.12
6635.335.337.2537.25−1.95-1.9535.4335.43−0.13-0.13
8843.043.043430042.8742.870.130.13

The line sits above every middle point, and its residuals dip and come back up. The data bend upward and the line cannot. The exponential residuals are all smaller than 0.150.15 in size, under one percent of each count, and their signs are mixed with no long run of one sign and no curve, so EE is the better choice.

Interpolation

Definition Let the data inputs run from x1x_1 to xnx_n, the smallest and largest. Interpolation is using a model to estimate the output at an input xx with x1<x<xnx_1 < x < x_n that is not one of the data inputs. Data on both sides hold the model in place, so a model with small residuals and no pattern usually gives reliable estimates inside this range.

In plain words Interpolation fills a gap between measurements you already have.

Example The town was not counted at t=5t = 5. The exponential model gives

E(5)=20(1.1)5≈32.2 thousand residents,\begin{aligned} E(5) &= 20(1.1)^5 \\[0.4em] &\approx 32.2 \text{ thousand residents,} \end{aligned}

which lies between the counts 29.429.4 at t=4t = 4 and 35.335.3 at t=6t = 6. The line gives L(5)=34.375L(5) = 34.375, about 2.22.2 thousand more, which matches its habit of running too high in the middle of the data.

Extrapolation

Definition Extrapolation is using a model to estimate the output at an input x<x1x < x_1 or x>xnx > x_n, outside the range of the data. No measurements lie there, so the estimate rests entirely on the assumption that the same pattern continues. The farther xx lies from the data, the more two models that fit the same data can disagree.

In plain words Extrapolation predicts where no one has measured. It is often necessary, but treat the answer as a guess that gets weaker with distance.

Example Here is the town tt years after the first count, according to each model.

ttL(t)L(t)E(t)E(t)
101048.7548.7551.8751.87
202077.577.5134.55134.55
4040135135905.19905.19

Two years past the data the models differ by about 33 thousand. At t=40t = 40 the exponential model, the one that fit best, predicts more than 900900 thousand residents. Very few towns keep growing 1010 percent a year for forty years, because housing, jobs and land run out. The fit inside the data cannot warn you about that.

Exact and approximate values

Definition An exact value is a number written without rounding, such as 20(1.1)520(1.1)^5, 2\sqrt{2} or ln⁡2ln⁡1.1\frac{\ln 2}{\ln 1.1}. An approximate value is a rounded decimal, written with ≈\approx. Keep exact expressions, or the full precision of your calculator, through every step and round only the final answer. Report that answer to a precision the data can support, since a model built from measurements is itself an approximation.

In plain words Round once, at the end, and not more finely than your data were measured.

Example The town model doubles when 20(1.1)t=4020(1.1)^t = 40, so (1.1)t=2(1.1)^t = 2 and

t=ln⁡2ln⁡1.1≈7.27 years.t = \frac{\ln 2}{\ln 1.1} \approx 7.27 \text{ years.}

Rounding too early with ln⁡2≈0.69\ln 2 \approx 0.69 and ln⁡1.1≈0.10\ln 1.1 \approx 0.10 gives 6.96.9 years instead, off by more than four months. The counts have three significant digits and the factor 1.11.1 is itself an estimate from them, so report about 7.37.3 years. More digits would claim an accuracy the data do not have.

Data limitations

Definition A data set is a finite list of measurements taken over a limited range of inputs, under particular conditions and with limited precision. Infinitely many functions pass through any finite set of points with different inputs, so data can support a model but never prove it. A good fit says nothing about inputs outside the range of the data, and differences smaller than the precision of the measurements carry no information.

In plain words Numbers that fit a pattern are evidence, not proof. Another curve can match every point you have and still go somewhere else.

Example The points (0,1)(0, 1), (1,2)(1, 2) and (2,4)(2, 4) lie exactly on both

y=2xandy=x2+x+22.\begin{gathered} y = 2^x \\[0.4em] \text{and} \\[0.4em] y = \frac{x^2 + x + 2}{2}. \end{gathered}

At x=6x = 6 the first gives 6464 and the second gives 2222. Three points cannot decide between them. More data or a reason from the situation can, for example knowing that a quantity doubles every step because each cell splits in two.

Check yourself

  1. A sample has mass 8080, 6060, 4545 and 33.7533.75 grams at t=0,1,2,3t = 0, 1, 2, 3 hours. Is a linear or an exponential model the better fit? Give the model and use it to estimate the mass at t=5t = 5.
Show the answer

The differences are −20-20, −15-15 and −11.25-11.25, which are not constant. The ratios are all 0.750.75, so the model is exponential,

M(t)=80(0.75)t.M(t) = 80(0.75)^t.

Then M(5)=80(0.75)5≈19.0M(5) = 80(0.75)^5 \approx 19.0 grams. Since t=5t = 5 lies outside the data, this is an extrapolation and assumes the same rate of decay continues.

  1. The model f(x)=3x+2f(x) = 3x + 2 was fitted to the points (1,5.4)(1, 5.4), (2,7.7)(2, 7.7) and (4,13.5)(4, 13.5). Find the three residuals and say which points lie above the line.
Show the answer

The predictions are f(1)=5f(1) = 5, f(2)=8f(2) = 8 and f(4)=14f(4) = 14, so the residuals are 5.4−5=0.45.4 - 5 = 0.4, then 7.7−8=−0.37.7 - 8 = -0.3, then 13.5−14=−0.513.5 - 14 = -0.5. Only the point (1,5.4)(1, 5.4) has a positive residual, so it is the only one above the line.

  1. The height of a young tree is modeled by h(t)=1.2+0.45th(t) = 1.2 + 0.45t meters, tt years after planting, fitted to measurements taken at t=0,3,7t = 0, 3, 7 and 1010. Give the units and meaning of 1.21.2 and 0.450.45. Then decide whether estimating the height at t=6t = 6 and at t=60t = 60 is interpolation or extrapolation, and which estimate deserves more trust.
Show the answer

The number 1.21.2 is in meters and is the height at planting. The number 0.450.45 is in meters per year and is the growth per year. The estimate h(6)=3.9h(6) = 3.9 meters is an interpolation, between the measurements at t=3t = 3 and t=7t = 7. The estimate h(60)=28.2h(60) = 28.2 meters is an extrapolation far beyond the data and assumes the tree keeps growing at the same rate for sixty years, which trees do not do. Trust the first and treat the second with suspicion.

How this lesson connects