Welcome to a lesson on how to determine
the parabola of best fit using the least squares solutions.
Suppose we want to find the parabola of best fit
in the form y equals ax square plus bx plus c
for the points one comma seven, three comma two,
six comma one and seven comma two
which I've already graphed
on the coordinate plane here on the right.
If all the points were on the same parabola
the the ordered pairs would satisfy the equation,
y equals ax squared plus bx plus c
and using the four points we can form the following
system of equations.
We're using the ordered pair one comma seven,
we substitute seven for y and one for x
which gives us seven equals a times one square
plus b times one plus c,
which we can write as a plus b plus c equals seven.
Using the ordered pair three comma two,
we would have the equation two equals
a times three squared plus b times three plus c,
which we write as nine a plus three b plus c equals two.
Using the third ordered pair, we would have the equation,
one equals a times six squared plus b times six plus c
which we write as 36 a plus six b plus c equals one.
And then finally using the ordered pair seven comma two,
we would have the equation
two equals a times seven squared
plus b times seven plus c,
which we write as 49 a plus seven b plus c equals two.
So again from here,
if all the points are on the same parabola
all the ordered pairs would satisfy
the system of equations for the same values of a, b, and c.
Let's also notice that we could write
this system of equations
in the form of matrix a times vector x equals vector b
where matrix a would be the coefficient matrix.
Notice from the first equation,
the first row was one, one, one
using the second equation the second row is nine, three, one
using the third equation, the third row
is 36, six, one, and using the fourth equation
the fourth row is 49, seven, one.
Vector x would be the three by one matrix
containing the entries of a, b and c,
and vector B would be the four by one matrix
containing the constants seven, two, one, two.
So solving the system of equations
is the same as solving the equation
matrix a times vector x equals vector b.
let's go ahead and solve the system
where the matrix equation
by writing an augmented matrix
and writing an augmented matrix in reduced echelon form.
The system will have a solution,
if all the points would fall on the same parabola,
if there's no solution
then all the points would not fall on the same parabola,
and we would have to find the parabola of best fit,
in this case, using the least squares solutions.
So let's go into that, the augmented matrix
where the first row would be one, one, one, seven
the second row nine, three, one, two,
the third row 36, six, one
and the fourth row of 49, seven, one, two.
Writing the augmented matrix in reduced echelon form,
notice how we have a contradiction in row four.
Row four indicates zero equals one,
which of course is not true, and because there's no solution
to the system or the matrix equation,
we know all four points will not fall on the same parabola
and therefore we'll have to find the parabola of best fit.
And again, in this lesson
we'll use the method of least squares solutions.
Let's set this up on the next slide.
For review when finding the least squares solution
to the equation matrix a times vector x equals vector b,
step one, we compute a transposed times a
and a transposed times vector b,
step two, we form an augmented matrix
for the matrix equation transposed times a times vector x
equals a transposed times vector b
and write the augmented matrix in reduced echelon form.
The solution is a least square solution,
which in our case will give us
the values of a, b and c for the parabola of best fit.
Let's go ahead and find a transpose.
To find a transpose
the columns in matrix a, become the rows in a transpose.
And now we need to find a transpose times a
which I've already done.
The result is a three by three matrix
shown here on the right.
You may want to pause video and check this.
We also need to find a transposed times vector b
which again, I've already done here.
The result is a three by one matrix.
Again, shown here on the right.
And again, you may want to pause the video and verify this.
And now we need to solve the equation,
a transposed times a times vector x
equals a transposed times vector b
which would be this matrix equation here.
The next step is to write the augmented matrix
and write the augmented matrix in reduced echelon form.
The first row indicates a equals 24, 50 ninths,
the second row indicates B equals negative 240, 50 ninths,
and the third row indicates that c equals 627, 50 ninths.
And therefore the parabola a best fit
in the form of y equals ax squared plus bx plus c
is y equals 24, 50 ninths x squared
minus 240, 50 ninths x plus 627, 50 ninths.
Let's go ahead and graph this on the coordinate plane
containing the four points we were given.
Notice how the parabola is an excellent fit.
nor parabola is an excellent fit for the given four points.
I hope you found this helpful.