So far we have studied how to find a linear equation or exponential
equation if we are given some initial value and a rate of change
(absolute or relative). Often times you have a set of points (data)
for which you want to create a model which best represents those
points. The only models we have studied in this class are linear and
exponential. Many times a much more complicated model is needed to do
the job. Here we will only consider the linear and exponential
models.
Creating a formula for a linear model
To create a linear equation we need to find the slope and the
intercept (rate of change and the initial value). The first thing to
do is to plot the data as points. Remember linear equations have
graphs which are lines. Often the points will not fall exactly on a
line, but if it looks like a line is a ``good approximation'' to a
graph representing those points, then a linear model may be
appropriate.
Once you have a plot of the points and have decided that a linear
model is appropriate, we need to find the model. You want a line
which best approximates all the points. Recall that if you knew two
points on the line you could calculate the line that passes through
them (calculate the slope and then solve for
in
where
using one of the
points on the line for
and
). The line that best approximates
the data points will not always pass through all of the points, or any
of them. Therefore you cannot simply pick two data points and
calculate the line passing though them. You want to draw a line on
your plot which best represents your points, which will will call the
``best fit line''. You may want to draw a few lines to try to get
what appears to be the best fit. (note: there are statistical methods
to determine this line, but this is beyond the scope of this class.
We will stick to drawing a line which looks best.)
Once you have drawn the best fit line you need to determine its
equation. We need to determine the slope and the intercept. It is
important that you make this plot on graph paper and scale your axes
so that you get the best precision possible on your graph. Look for
two points on the graph of the line which are exactly on your best fit
line. These points do not have to be data points. You want two
points for which you can read their coordinates as accurately as
possible. Use the graph paper, and record the coordinates of the
points. Now you have two points, and you can get the equation.
Sometimes the intercept will appear on your graph, and other times
your points are too far away from the vertical intercept to be able to
read it from the graph. If the intercept is available, choosing it as
one of your points makes determining the equation much easier.
Creating a formula for a exponential model
Creating an exponential model is not as straightforward as creating a
linear model. You cannot simply look at a plot and draw a ``best
fit'' exponential curve. You should still begin by making a plot of
your points. This will help you decide if an exponential model is
appropriate.
Let's call the dependent variable
and the independent variable
. If you think that an exponetial equation models the data, make a
plot of
vs.
. This is called a log plot. If there is an
exponential relationship, this graph should be a line. (see below)
[Here we
use the rule:
]
Let
and
, and this becomes the equation
.
You have reduced the problem to finding a linear equation. On the log
plot, draw the best fit line as you would for a linear model.
Calculate the slope and intercept from your graph (see liner model
section). Finally you need to calculate the values for the initial
value and rate of change for your exponential equation (
and
). Solve for
and
and get
. (Recall how to undo a log,
)
Deciding whether to use a linear or exponential model
Sometimes just looking at a plot of the data is not enough to decide which model is more appropriate. Some knowledge of what your data means, or statistics may help you make the decision. However we will not do this for this class. I suggest looking at both the plot of the data and the log plot of the data. Decide which one looks more like a straight line. If your original data is linear, the log plot should look curved downward. If you original data is exponential, your log plot should look like a straight line, and your original data should looked curved upward. However sometimes it is not clear that one model is better than the other. On the graph below it is unclear whether it is linear or exponential.
Homework
| degrees F | beats/min |
| 68 | 2 |
| 65 | 5 |
| 70 | 1 |
| 60 | 9 |
| 55 | 13 |
| 58 | 10 |
| 65 | 3 |
| 63 | 6 |
| t | Q |
| -10 | 3.22 |
| 2.3 | 10 |
| 5 | 17.62 |
| 7.5 | 23.5 |
| 20 | 96.46 |