00:01
We have endpoints on the plane x1, y1, x2, y2, up to xn, y, n, not all the x of us are the same.
00:12
The regression line is given as y equals m x plus b, where m and b were calculated in exercise 49, using the least squares method, which consists on minimizing the function g of mb equals the sum from 1 to n of m xy plus p minus y of i square which is the sum of the squares of the residuals and the residuals are the difference between the image of the regression line on the x of i's minus the corresponding y of i in x o 'n we proved that the equations partial derivative of g respect to m equals zero and partial derivative of g with respect to b equal zero have a unique solution under the assumption that not all the x -o -is are the same the solution of the linear system coming from those equations were resolved and we calculate the expressions for m and b in exercise 49 so here so what we did in exercise was really a show that the function g of the variables m and b has only one critical point and we gave the expressions to calculate that critical point.
01:48
Now we want to apply the second partial test to this function g so we got to calculate the partial derivatives of second order.
01:58
So we are going to remember that in exercise 49, part c in particular, we saw that the partial derivative of g with respect to m is given by two times m times the sum from 1 to n of x x x x x square plus b times the sum times the sum of n of x x x squared plus b times the sum.
02:48
From 1 to n minus the sum from 1 to n of x x x x x times y so this expression we obtain if we find the derivative of g respect to n and the details are given in exercise 49 part c so with this or from this we can say that the partial derivative of second order of g respect to m is equal to two times the sum from 1 to n of x x x x x x square and this expression we recognize is a constant because it doesn't depend on m and b now also from exercise 49 part c we have the following expression the partial derivative of g respect to b is equal to 2 times m times sum from 1 to n of x of i plus b times n plus minus minus the sum of the y so by from 1 to n and here if we find the derivative with respect the b of this expression we get 2 times which is also a constant because it doesn't depend neither on m nor on b.
05:18
Well now we find the derivative of this expression with respect to m or from this expression with respect to b we find the mixed second order partial derivative of g which is two times sum of x x.
05:43
Again, we have a constant value.
05:55
So we can now calculate the determinant of the hessian, which is dn b, that is the partial derivative of second order respect to m, this one here, two times the sum of the squares of the x of i times the partial derivative of second order respect to b, that is to n, minus the the square of the mixed second order partial derivative, that is two sum of the x of i square.
06:46
Now this is equal to 4 n times the sum from 1 to n of x of i square, minus 4 sum of x of i, all that sum square.
07:05
And we can say that this is equal to negative 4 common factor, of sum, sorry, here it's better to take out the comfactor 4 only, not the negative sign, 4 times n times the sum of x of i square minus the square of the sum of the x of i.
07:41
So we have this, which is a constant expression because it doesn't depend on m or b.
07:57
So then this expression evaluated at the critical point of g is the same expression because the constant because it's a constant so we have this is the expression and we can say now that from exercise 49 again there we prove that this expression here is side parenthesis is greater than or equal to zero but we also prove there that the quality with zero only happen if and only if that is equivalent to all the x -is being the same so if not all the x -y x -y's are the same then this expression cannot be zero and because this is the assumption we are made in here that not all the x of i are the same then we can conclude that n times sum of x of y square minus sum of x of i square is greater than zero strictly that is cannot be equal to zero because not not all the x of i are the same so d of mb is greater than zero because we have d of mb equals four times the expression here.
10:50
So it's also positive at the critical point of g.
11:03
On the other side we have also not all the x of i being the same value implies that the sum of x of i square that is the sum of the squares of x of i is strictly positive we know that it is always greater than equal to zero but it cannot be zero and that is because if it were zero we will have because we are adding numbers that are greater than are equal to zero the only way that the sum be zero is that all the terms x of i square are zero but it means then that all xo ys are zero and it will be all the same so not all being the same implies that this sum here got to be positive and with that we can now say that this expression here two times sum of x x squared is positive because and that is is g of second derivative with respect to m and you saw that this is a constant so it's the same value is the second derivative of second order at the critical point so you can say that g second derivative of mb is positive at the critical point of she so we can now combine the two things that is combining these two facts that is d of mb positive and second derivative respect to m positive positive at the critical point of g implies that this critical point is a relative minimum so we haven't yet the fact that at the critical point we have an absolute minimum but at least we know that this is a relative minimum so we have proved that in part a we go now for part b so here in part b we are going to prove that the graph of the equation z equals g of mb is a quadric surface so if we look at equation four of the chapter 11 section 7 page 822 at that reference of the test book sorry of the test book we see that quadric surface is a complete second order equation in three variables so we have so we have that a quadric surface is represented by a second degree equation in three variables a x square plus p y square plus c z square so we have these three terms of second order then we have the terms of second order found by combining different variables so for example d of xy plus e of x z plus f, the other combination is y z.
17:44
So we have second order terms mixing the variables.
17:50
Then we have the first order terms, for example, g of x plus h of y or h times y, plus i times z plus g equals zero.
18:11
So let me move all this to the left.
18:16
Little bit so i left some things out here here is i here is h and so this is not h is f so we have this general equation when where we have terms of second order of first order and constant so if we write our equation z equals g of mb this way take into account that now the variable are mb and z then we have a quadric surface so let's do that so in our case we have z equals g of mb and remember g of mb is the sum from 1 to n of m x i plus b minus y suva square and that's equal to the sum from 1 to n of n of m x i plus b minus y suva square and that's equal to the sum from 1 to n of n of n of n of n of n.
19:48
X y x y plus b minus y sui times itself and we distribute all the terms in this factor with all the terms in this other factor so it's equal to the sum from one to n of so we get m square x of square plus m b x of i minus m x y sub i plus m x of i plus m x of i plus m x of i plus m x of i plus m x of i plus b square minus b y x of i minus m x of i y so i minus continue here minus b y of i plus y square and now we combine this similar terms so we get the sum from one to n of m square x of y square now we have mb x of i here and bx5 here so we have two times m b x of i then we have b square plus b square here here already taken and now we have m x of i that is this and this so we have negative two times x x of i y sub i then we have this here this here negative b y of i twice so it's negative 2 b y y so i and the last terms the independent term y square and now this is equal to we distribute the sum inside the sum here inside the parentheses so we get sum of x x x x square times m square because m square is constant then we have this term here sum with itself n times so it's n b square nb square plus 2m or 2 times sum of x y 1 to n times mb which is this term here okay, now we go forward this term.
23:24
We get negative 2 sum from 1 to n of x x y.
23:34
Y sub i times m minus 2 sum of y sub i times b plus sum of y square from 1 to n.
24:06
So now we can say that remember this is z.
24:17
So we started with z at the left of the equation and we got all this.
24:24
So z equal this.
24:28
So we can take z to the right and we get all that equal zero.
24:33
So we have sum of x x squared from 1 to n times m square plus mb square then to follow the form of this general second degree equation in three variables we have all these squares first so here we have m square b squared so z squared doesn't appear in our formula so it's zero z square here then we have the mixed terms so we have only in our equation mb, the others are 0, so plus two times sum of x -y from 1 to n of mb plus 0 m z plus 0 b.
25:41
So we have all the mixed second order terms.
25:49
Then we have negative the first order terms.
25:54
So it's negative 2 sum of x x y y sub y times m minus 2 sum of y sui times v and we have all the and we need the first order term for z.
26:23
And because we pass the z from the left to the right, we get negative z.
26:31
And finally the independent term sum of y -so -i square equal all that equal to zero so this is our equation and we see that clearly that this is just of the form given here for the variables mb and z so we are going to write the coefficients taking a equal equals sum of x of i square from one to n b is n z z c is zero d is two times the sum of x of i d sorry e is zero f is also zero so e and f are equal to zero g is negative two sum of x of i y so y so y h is negative to sum of y of i and i is negative to sum of y so y and i is negative 1 finally j j equals sum of y to y square we get the second degree the second degree equation in in m, b, and z, which is a quadric surface.
29:09
So we can say better whose graph is the quadratic surface.
29:32
So we approve that.
29:38
The graph of the equation, z equals g of mb, is a quadratic surface.
29:48
Now in part c, accepting that the graph of z equals g of mb is an elliptic paraboloid, proof that this barboloid opens in the z direction.
30:03
That is, the graph is something like this.
30:06
Remember, a surface quadrary can be of several types.
30:10
We can have ellipsoids, hyperboloids of one or two sheets, elliptic coins, hyperboloids, or elliptic paraboloids as this one i've drawn here.
30:26
And in fact, the elliptic paraboloid can open upwards or downwards.
30:32
We're going to see that open upwards in the positive z direction.
30:42
And that is we put constant values of z, for example, c equals g of mb, and we want to see if as we increase c, we have ellipses as control lines.
31:17
And this ellipses has greater axis, both minor and major.
31:31
That is, as we increase the constant value we put here to find the control line of these functions g, we obtain ellipses with greater axis, with axes that grow.
31:51
And then it means that we have something like this.
31:54
We have the contours will be something like this or less.
32:10
That means that we have here a critical point.
32:14
We have in fact a critical point which is an absolute minimum.
32:18
And it will be an absolute minimum because we will have the least value of this function here and in any direction we will have an increasing value greater than this value here at the critical point...