Most of this studio is d one with a java applet online. There is one problem
where you need to carry out
a quadratic regression. Unfortunately, Open Office Calc does not include
quadratic (or general
polynomial) regression. It is probably best that you do problem 3 with a
friend who has Excel. But for
those of you who have no other option, we’ve designed an Open Office spreadsheet
that will let you get
the result you need for problem 3.
This sheet includes both instruction sections (labeled with letters) and
problem sections (labeled with
numbers). Please work through the instructions and answer the questions in the
problem sections. Turn
in your answers to the italicized prompts, written in complete sentences to the
appropriate studio box.
You may turn in your work on this sheet.
We fit lines to data in the second studio. Unfortunately, as we saw with the
population data, lines don’t
fit all data sets well. In this lab we will look at a situation where a parabola
is the appropriate curve to
describe the data, and go through how to find a quadratic function that models
such a data set.
A. Open your web browser and go to the main course website. Click on the link
Describe the Squirt,
which will take you to the URL:
You will see a squirt, that is, a snap-shot of water f lowing from a fountain .
We are going to
describe the shape of the water’s flow. The shape resembles a parabola, and so
we will try to
model it with a quadratic function. We have learned that a quadratic function is
de termined by its
vertex (h,k) and another distinct point on the graph. Together they determine
the equation of the
parabola, y = a(x − h)^2 + k . To model the shape of the water with this
equation, we first need data
describing its shape.
B. To collect the data we need to plot points . Click on a point on the
picture of the squirt and the
coordinates will be listed at the right. If you click on the blue “Mark point”
button, the applet will
draw a small black triangle at the point so you can see which points you marked.
The black “Clear
points” button will erase all these black triangles.
1. Click on the vertex of the parabola and record the coordinates in the form
at the top of the next
page. Then click on another point on the parabola (preferably well away from the
vertex) and enter
that point into the form as well. Solve for the coefficients of the parabola in
the form
y = a(x − h)^2 + k .
| |
Coordinates |
| Vertex |
|
| Another Point |
|
C. Enter the quadratic function you just found into the box labeled “The
function f(x)” on the
webpage. You must use * for multiplication on this page, and ^ for raising to a
power . Also note
that you may enter the formula in any correct form you wish, not only the
standard form. Next,
enter the lower and the upper bounds for x. To determine these, click on the
left most part of the
squirt and read off the x value and then click on the right most part of the
squirt and read off the x
value. Hit ENTER, or click on the button labeled “Try it!!”
2. How close is the model to the actual shape? In other words, does it appear
to be a good fit or not.
If it is not a good fit, try a different second point, further away from the
vertex. Also, you may
have rounded too far; that is, left off significant digits . Be sure to have at
least 2 significant digits
(non- zero digits after the decimal point , in this case) for the value of a.
Note, if you modify the
formula and try again, it will modify the image in a new window. However, it may
not bring this
new window to the foreground; which means you may have to bring the window to
the front. If you
had to make adjustments ( change a point , include more digits, etc.), then write
what you did to get
a good fit and the new equation.
If we just pick out a vertex and one other point, we can draw a parabola. But
our answer will be very
sensitive to the points we choose. Clicking just a little bit off from the
vertex may give us a poor fit. As
in the earlier studio about fitting lines, we can do better (or at least safer)
by picking a collection of
points along the parabola and letting the spreadsheet find the best fit to the
whole set of points at once.
D. As before, we will mark points on the squirt. But this time, we will do so
from the far left all the
way to the right, getting exactly 15 points.
a. Click on the black button to clear the points that may be already marked.
b. Click on the image at a point on the far left.
c. Click on the blue button to mark the point.
d. Repeat steps b and c to mark fifteen distinct points on the image of the
water.
e. Click on the red button to list the coordinates of the points you have
marked.
E. A “Java Applet Window” will open when you click the red button to list the
points. Scroll down
and you will see an array of points. The numbers in the first column are the
x-coordinates and the
numbers in the second column are the y-coordinates. Highlight and copy these
numbers. To copy
the number type CTRL-C after they are highlighted.
F. Open the spreadsheet squirt.ods. Copy your data into cells A2 through B16.
Note that you need
exactly 15 points to fill this region. The spreadsheet will automatically
compute the best fit
quadratic (in standard form) along with a graph showing the data points you
collected in blue and
the trendline in red.
G. With the trendline plotted in Excel, you can see how well it fits the
specific points you picked. But
what we are really interested in is how well it fits the picture. Enter the
formula for the quadratic
model into the website and see how well it fits. Remember to make sure you have
enough decimal
places for the coefficients a, b, and c. Also remember to enter in the largest
and smallest values of
x into the website, and to use the * key for multiplication.
3. What is the function the spreadsheet produced for the curve? How well does
this function fit the
actual picture of the squirt?
4. Using the formula for finding the vertex of a quadratic function, find the
vertex of the function you
found in question 3. How does this compare to where you placed the vertex by
“eye-balling” it?
5. Write both the function you found in problem 2 and the function you found
in problem 3 in the
same format, either both in vertex form, y = a(x − h)^2 + k , or both in
standard form,
y = ax^2 + bx + c . How do the two functions compare?
BONUS
We’ve seen that if we know the vertex and one additional point , we can find a
parabola. But what if we
don’t know the vertex? If we know (for certain) any three points on the curve,
we can find the formula
for the parabola. We do this by plugging the three points into the formula for
the parabola, and then
realizing we have 3 linear equations in 3 unknowns. We can solve this using the
same sorts of
techniques as we used in solving 2 linear equations in 2 unknowns.
Suppose we are given three points on an unknown quadratic curve (x1, y1),
(x2, y2), and (x3, y3). We get
three linear equations in the three unknowns a, b, and c by substituting the
known x and y values from
the three points into the quadratic equation y = ax^2 + bx + c to get

For example, if we are given the points (-1,6), (0,1), and
(2,3), then we have the equations

6. Solve this system of equations to find the parabola
passing through the three points, (-1,6), (0,1),
and (2,3).
7. Suppose instead of using standard form, we used vertex
form, y = a(x − h)^2 + k . Just as above, we
could plug in three points, (-1,6), (0,1), and (2,3), to get three equations in
the unknowns a, h, and
k. Write the three equations for a, h, and k you get by substituting these three
points into the vertex
form. Why would these equations be more difficult to solve that the equations
for problem 6?
Since vertex form is easier to use for drawing graphs (and
also for solving equations) than standard
form, you may have wondered why we bothered with standard form at all. This
should give you an idea
of why standard form can be useful. Of course, the situation is more complicated
still if you are looking
for the best fit through a dozen or more points, but the fundamental point will
remain, in fact the
greater complexity will make it even more true. Using standard form leads to
much simpler equations
when you are trying to find the parameters of a parabola and you don’t have the
vertex specified.
Acknowledgements: The applet used in this lab was
published in the Journal of Online Mathematics and
its Applications by Frank Wattenberg, Bart Stewart, and Suzanne Alejandre.
These instructions, and
especially any errors in the instructions, are the responsibility of Andrew
Bennett working with the
fellows of the Center for Quantitative Education at Kansas State University.