Assignment 31

course Mth 272

Please see note at end of assignment.

Q鏜󨟉yԳP

assignment #031

031. `query

Applied Calculus II

11-26-2008

......!!!!!!!!...................................

14:47:39

Give the equation of the least squares regression line and explain how you obtained the equation.

......!!!!!!!!...................................

RESPONSE -->

f(x)= ax+b

using provided ordered pairs, respectively:

(a+b-0)^2 + (2a+b-0)^2 + (3a + b-0)^2 + (3a +b-1)^2 + (4a+b-1)^2 + (4a+b-2)^2 + (5a+ b-2)^2 + (6a +b -2)^2

a lot of multiplication and simplifying yields this equation:

116a^2 - 74a + 9b^2 + 56ab - 116b +14

Differentiating w/respect to ""a"":

232a+56b-74= 0

232a +56b= 74

w/respect to ""b""

18b + 56a - 16=0

18b + 56a= 16

How do I isolate a and b if there are two variables in the equation? Do I just use the equation solver in the calculator? If so that doesn't seem right plus I am unsure wher the eqn solver is on the TI-83.

You can solve two simultaneous equations in two unknowns by elimination or by substitution. Calculator solutions are not acceptable for justification.

You could for example solve the first equation for a in terms of b, then substitute this expression for a in the second. This is a standard Algebra I and Algebra II topic and you should review it (solution of simultaneous equations).

confidence assessment: 2

.................................................

......!!!!!!!!...................................

15:03:45

Query problem 7.7.6 (was 7.7.16) use partial derivatives,etc., to find least-squares line for (-3,0), (-1,1), (1,1), (3,2)

......!!!!!!!!...................................

RESPONSE -->

f(x)= (-3 + b - 0)^2 + (-1 + b - 1)^2 + (a + b -1)^2 + (3a + b -2)^2

after much multiplication and simplifying

3a^2 + 2ab - 12a - 8b +4b^2 + 6

Differentiating w/respect to a:

6a + 2b -12=0

6a + 2b = 12

w/respect to b:

8b +2a -8 = 0

8b +2a = 8

As with the previous problem, I am unsure how to isolate a and b from here. The book just kind of has it done without explanation of how they did it. It follows the steps I did here, and then just lists the equation of the line. Please help me out with the end of this one. Thanks.

** If y = a x + b then the errors at the four points are respectively

| (a * -3 + b) - 0 |,

| (a * -1 + b) - 1 |,

| (a * 1 + b) - 1 | and

| (a * 3 + b) - 2 |. The sum of the squared errors is therefore

( (a * -3 + b) - 0 )^2 + ( (a * -1 + b) - 1 )^2 + ( (a * 1 + b) - 1 )^2 + ( (a * 3 + b) - 2 )^2 =

[ 9 a^2 - 6 ab + b^2 ] + [ (a^2 - 2 a b + b^2) - 2 ( -a + b) + 1 ] + [ a^2 + 2 ab + b^2 - 2 ( a + b) + 1 ] + [ 9 a^2 + 6 ab + b^2 - 4 ( 3a + b) + 4 ] =

20a^2 - 12a + 4b^2 - 8b + 6.

This expression is to be minimized with respect to variables a and b.

The derivative with respect to a is 40 a - 12 and the derivative with respect to b is 8 b - 8.

40 a - 12 = 0 if a = 12/40 = .3.

8b - 8 = 0 if b = 1.

The second derivatives with respect to and and b are both positive; the derivative with respect to a then b is zero. So the test for max, min or saddle point yields a max or min, and since both derivatives are positive the critical point gives a min. **

confidence assessment: 1

.................................................

For example if you have the equations

2 a + 3 b = 8 and

3 a + 6 b = 14

you can solve the first equation for a, obtaining a = -3/2 b + 4. Substituting this into the second equation we get

3 ( -3/2 b + 4) + 6 b = 14, or

-9/2 b + 12 + 6 b = 14 so

-9 b + 24 + 12 b = 28 and

3 b = 4 so that

b = 4/3.

Substituting this into the first equation we get

2 a + 3 * 4/3 = 8 so

2 a + 4 = 8 and we get

a = 2.