1. ## Mathematical Modelling

Hey guys
I'm so close to finishing this course I can taste it!
I've been stuck on this question forever because I just don't even know what I'm supposed to do. I have a feeling I'm overthinking it...

We're given a table of values and asked to "use graphing technology to determine an equation that fits:
a. the linear model
c. the exponential model"

for a. I used the first and last point given in the table of values to get the slope and subbed those points and the slope into y=mx+b to get the value of b.
I have a feeling that's wrong though... And I'm not sure how I'm supposed to do it.
I'm pretty much completely lost for b and c.

Any input would be really appreciated. Thanks a lot, guys!

2. For the first part, sounds like you did the right thing. If you have a value in your table where x is at or near 0, you can always evaluate your model at x=0 to make sure your model is reasonable. For the other two parts, the process is similar. Just keep in mind the generic forms of quadratic and exponential models and what the constants represent and you'll reason it out in no time.

For the quadratic, in general these models look like y=a(x-h)^2 +k. First things first, the vertex of such a graph is at the point (h,-k). So, plot your table of values using a graphing calculator and look for a good place to for the vertex. You've already got 2/3 of your necessary variables accounted for. Now you can trial-and-error to find your a-value, or use a point from the table to solve for your a-value (keep in mind that a positive a-value will make the parabola open up, a negative a-value will make it open down). Don't forget to graph your model and check that it is a reasonable representation of your data! Also, unless the table of values is very close to a parabola to begin with, the model will only be reasonable for a certain range of x-values, but this is okay as long as the vast majority of your data points are reasonably accounted for.

For the exponential, use the generic form y=a*e^(bx). If you have an x-value in your table at or near 0, whatever the corresponding y-value is will be your a-value. Smaller "b" (between 0 and 1) will essentially horizontally stretch your graph, bigger "b" will make it increase faster (with respect to x). Again, guess-and-check, or pick a point and solve for b-value.

Yay math!

3. Hi

Are you familiar with least-squares solutions?

If you have a table of data, say (-1,2), (0,3), (1 6), (2,7) and (4,11), then
maybe you wish to approximate by a linear model y = kx + m.

Note that in y=kx + m we have two parameters k and m, that we need to decide. The classical name for parameters are $\beta_{0} \mbox { and } \beta_{1}$ here.

So, let X be the design matrix. (classic name), and Beta the parameter vector.
$\left[ \begin{matrix} 1 & -1 \\ 1 & 0 \\ 1 & 1 \\ 1 & 2 \\ 1 & 4 \end{matrix}\right]$ $\left[\begin{matrix} \beta_{0} \\ \beta_{1} \end{matrix}\right]$ = $\left[ \begin{matrix} 2 \\ 3 \\ 6 \\ 7 \\ 11 \end{matrix}\right]$

Solving this using least squares method, (in MATLAB, simply b=X\y), will give you the best least-squares fit of your parameters.

Note here, that the second column of the matrix X, is just the x-values of the data points, since we approximate with y = kx + m.
If we had had an $x^2$ term, a column would be all the x-values squared.