1. Minimised Sum Square of Absolute Errors for solution of form y = Ax + B

We need to find values of A and B to minimise the equation:

- (1)

At the minimum we have two simultaneous equations formed by partial differentiation of – (1) with respect to A and B respectively:

= 0 = - (2)

= 0 = - (3)

Let P1 = , P2 = , P3 = , P4 = then (2) and (3) can be re-written:-

P4 = AP3 + BP1- (4)

P2 = AP1 + BN- (5)

Isolating A from (5) we have :-

A = (P2 – BN)/P1- (6)

Substituting for A in 4) and solving for B we have:

B = (P1P4 - P2P3)/(P12–NP3)- (7)

  1. Minimised Sum Square of Absolute Errors for solution of form y = Ax + Bz + C

We need to find values of A and B to minimise the equation:

- (8)

At the minimum we have three simultaneous equations formed by partial differentiation of – (8) with respect to A, B and C respectively:

= 0 = - (9)

= 0 = - (10)

= 0 = - (11)

With P1 – P4 as above, now let P5 = , P6 = , P7= , P8 = then (9), (10) and (11) can be re-written:-

P4 = AP3 + BP5 + CP1- (12)

P7 = AP5 + BP8 + CP6- (13)

P2 = AP1 + BP6 + CN- (14)

Isolating C from (14) we have :-

C = (P2 - AP1 - BP6)/N- (15)

Substituting for C in (12) we have:

NP4 – A(NP3 - P12) – B(NP5 - P1P6) – P1P2 = 0- (16)

Which, upon making the substitutions :

G1 = NP3 - P12 , G2 = NP5 - P1P6, G3 = NP4 - P1P2, and re-arranging for B, becomes:-

B = (G3 – AG1)/G2- (17)

Substituting from (15) and (17) in (13) leads, after some re-arrangement, to :

A = {P7 + (G3P62/G2N) – (G3P8/G2) – (P2P6/N)}/

{P5 + (G1P62/G2N) – (P1P6/N) - (G1P8/G2)}- (18)

  1. Minimised Sum Square of Data WeightedErrors for solution of form y = Ax + B

We need to find values of A and B to minimise the equation:

- (19)

At the minimum we have two simultaneous equations formed by partial differentiation of – (19) with respect to A and B respectively:

= 0 = - (20)

= 0 = - (21)

And, making the substitutions:

P11 = , P12 = , P13 = , P15 = ,

P16 = ,

We have from (20) and (21) we have, after some re-arrangement:

A = (P11 - BP13)/P16- (22)

B = (P12 – AP13)/P15- (23)

and, substituting from (22) into (23)

B = (P12P16-P11P13)/(P15P16-P132)- (24)

  1. Minimised Sum Square of Data Weighted Errors for solution of form y = Ax + Bz + C

We need to find values of A and B to minimise the equation:

- (25)

At the minimum we have three simultaneous equations formed by partial differentiation of – (25) with respect to A, B and C respectively:

= 0 = - (26)

= 0 = - (27)

= 0 = - (28)

With Pn’s as defined above, now let P14 = , P17 = , P18= , P19 = then (26), (27) and (28) can be re-written:-

P11 = AP16 + BP17 + CP13- (29)

P18 = AP17 + BP19 + CP14- (30)

P12 = AP13 + BP14 + CP15- (31)

Isolating C from (31) we have :-

C = (P12 - AP13 – BP14)/P15- (32)

Substituting for C in (29) we have:

A(P15P16 - P132)= (P11P15-P12P13) – B(P15P17-P13P14)- (33)

Which, upon making the substitutions :

G1 =P15P17-P13P14, G2 = P15P16 - P132, and re-arranging for A, becomes:-

A = ((P11P15-P12P13) – BG1)/G2- (34)

Substituting from (32) and (34) in (30) leads, after some re-arrangement, to :

B = {(P15P18 - P12P14)G2 – (P11P15 - P12P13)G1} /

{(P15P19-P142)G2 – G12}- (35)

  1. Minimised Sum Square of Predicted Weighted Errors for solution of form y = Ax + B

We need to find values of A and B to minimise the equation:

- (36)

At the minimum we have two simultaneous equations formed by partial differentiation of – (36) with respect to A and B respectively:

= FF = 0 = - (37)

= GG = 0 = - (38)

To solve the two non-linear simultaneous equations (37) and (38) we use an iterative approach based on Taylor Series expansions to solve for h and k as corrections to A and B (then FF, GG and hence A, B): (see. For example, Froberg Introduction to Numerical Analysis).

FF +h + k = 0- (39)

GG + h + k = 0- (40)

(39) can now be re-written :

h = - (k + FF)/- (41)

which can then be substituted in 40 which becomes, after re-arrangement gives for k :

k = (FF-GG)/(-)- (42)

From (37) and (38)

= +

= +

= + =

= +

and, making substitutions:

P1 = , P2 = , P3 = ,

P4 = , P5 = , P6 =

= P8 = 2P2 – 3P1

==P7 = 2P4 – 3P3

= P9 = 2P6 – 3P5

which, substituting in (42) gives

k = (FFP7 – GGP8)/(P8P9-P72)- (43)

  1. Minimised Sum Square of Predicted Weighted Errors for solution of form y = Ax + Bz + C

We need to find values of A and B to minimise the equation:

- (44)

At the minimum we have two simultaneous equations formed by partial differentiation of – (45) with respect to A, B and C respectively:

= EE = 0 = - (46)

= FF = 0 = - (47)

= GG = 0 = - (48)

To solve the three non-linear simultaneous equations (48), (49) and (50) we use an iterative approach based on Taylor Series expansions to solve for h, k and l (then EE, FF, GG and hence A, B,C): (see. For example, Froberg Introduction to Numerical Analysis).

EE + h + k + l = 0- (49)

FF + h + k + l = 0- (50)

GG + h + k + l = 0- (51)

From (49)

l = - ((EE + h+k)/)- (52)

which, substituted in (50) gives for k:

k(-) = (EE-FF) + h(-)- (53)

now let:

R1 = (-), R2 = (-), R3 = (EE-FF)

And substituting for l and k in (51):

h(R1(-)+R2(-))

= (R1(EE-GG) + R3(-))- (54)

From (51) , (52) and (53)

= +

= +

= +

= +

= +

= +

= +

= +

= +

Or, making substitutions:

P1 = , P2 =

P3 = ,P4 =

P5 = ,P6 =

P7=,P8=,

P9=, P10 = ,

P11 = , P12 = ,

P13=, P14=,

P15 = , P16 = ,

P17= , P18 = ,

Then

EE = P1 – P2, FF = P3 – P4, GG = P5 – P6,

= EP =2P7 – 3P8, = ES = 2P9 – 3P10,= EP = 2P11-3P12,= FD = 2P9 – 3P10,

= FS = 2P13 – 3P14,= FP = 2P15-3P16,= GD = 2P11-3P12,= GS = 2P15-3P16,

= GP = 2P17-3P18, which can be back-substituted into (52) – (54).

  1. Minimised Sum Square of Errors for solution of form y = AxB

The traditional approach to this problem is to take logs of both sides:-

Ln(y) = BLn(x) + Ln(A), and minimise:-

- (55)

Which has exactly the same form as (1) and can be solved by transformation of variables. However it should be noted that this is actually minimising the errors in the logarithms, rather than the absolute errors.

  1. Minimised Sum Square of Errors for solution of form y = AxBzC

The traditional approach to this problem is to take logs of both sides:-

Ln(y) = BLn(x) + Ln(A), and minimise:-

- (56)

Which has exactly the same form as (8) and can be solved by appropriate transformation of variables. However it should be noted that this is actually minimising the errors in the logarithms, rather than the absolute errors.

  1. Minimised Sum Square of Absolute Errors for solution of form y = AxB

We need to find values of A and B to minimise the equation:

- (57)

Differentiating (54) with respect to A and B gives:-

= 0 = - (58)

= 0 = - (59)

Making the substitutions:

P1 = ,P2 = , P3 = , P4 = ,

P5 = ,P6 = we arrive at, from 58:

A = P3/P5- (60)

And substituting into (59) we find we need to solve the equation

FB = P3P2 – P1P5 = 0- (61)

In order to solve this we can make use of Newton-Raphson technique (see, for example, Froberg) in which, if Xn is an approximate solution to FB(X) = 0, then an iterative technique can be used:

Xn+1 = Xn – FB(Xn)/FB’(Xn)- (62)

And, from (64):

FB’ = +

--

= 2P3P6 – P1P2 – P4P5- (63)

And we can keep iterating through (62) until the absolute value of the correction factor FB(Xn)/FB’(Xn) is less than a set tolerance level.

  1. Minimised Sum Square of Absolute Errors for solution of form y = AxBzC

We need to find values of A and B to minimise the equation:

- (64)

Differentiating (54) with respect to A, B and C gives:-

= 0 = - (65)

= 0 = - (66)

= 0 = - (67)

Making the substitutions:

P1 = ,P2 = , P3 = , P4 = ,

P5 = , P6 = , P7 = ,

P8 = , P9 = , P10 =

P11= , P12 =

we arrive at, from 65:

A = P1/P2- (68)

And substituting into (66) and (67)

= FF = P2P3 - P1P4 = 0

= GG = P2P5 - P1P6 = 0

Which can be solved iteratively as in Section 5 above:

FF + h + k = 0- (69)

GG + h + k = 0- (70)

(69) can now be re-written :

h = - (k + FF)/- (71)

which can then be substituted in (70) which becomes, after re-arrangement gives for k :

k = (FF-GG)/(-)- (72)

where we have:

= P2() +P3() – P1()

– P4 ()

= P2P7 + P3P4 – 2P1P8= P15

= P2() +P3() –P1()

–P4 ()

=2P3P6 + P2P9 – 2P1P10 – P4P5 = P16

= P2() + P5 () – P1()

-P6

= 2P4P5 + P2P9-2P1P10 - P3P6 = P17

= P2() +P5() – P1()

-P6()

= P2P11 + P5P6 – 2P1P12 = P18

And, substituting back in (71) and (72)

k = (FFP17 – GGP15)/(P15P18-P16P17)- (73)

h = - (kP16 + FF)/P15- (74)

  1. Minimised Sum Square of Data Weighted Errors for solution of form y = AxB

We need to find values of A and B to minimise the equation:

- (75)

Differentiating (76) with respect to A and B gives:-

= 0 = - (76)

= 0 = - (77)

Making the substitutions:

P1 = ,P2 = , P3 = ,

P5 = we find from (76)

A = P3/P5- (78)

And substituting into (75) we find we need to solve the equation

FF = P2P3 – P1P5 = 0- (79)

In order to solve this we can make use of the method of Regula-Falsi (see for example wikipedia - Newton-Raphson can also be used but seems more volatile).

  1. Minimised Sum Square of Data Weighted Errors for solution of form y = AxBzC

We need to find values of A and B to minimise the equation:

- (80)

Differentiating (54) with respect to A, B and C gives:-

= 0 = - (81)

= 0 = - (82)

= 0 = - (83)

Making the substitutions:

P1 = ,P2 = , P3 = ,

P4 = , P5 = , P6 = we find from (81)

A = P3/P5- (84)

And substituting into (83) and (84) we find we need to solve the equations:

FF = P2P3 – P1P4 = 0

GG = P2P5 - P1P6 = 0

Which can be solved iteratively as in Section 5 above:

FF + h + k = 0- (85)

GG + h + k = 0- (86)

(86) can now be re-written :

h = - (k + FF)/- (87)

which can then be substituted in (87) which becomes, after re-arrangement gives for k :

k = (FF-GG)/(-)- (88)

From (86) and (87), and with:

P7 = , P8 = , P9 = ,

P10 = , P11 =,P12 =

= P2P7 + P3P4 – 2P1P8 = P15

= 2P3P6 + P2P9 – 2P1P10 – P4P5 = P16

= 2P4P5 + P2P9 - 2P1P10 - P3P6 = P17

= P2P11 + P5P6 - 2P1P12 = P18

and, from (86)

k = (FFP17 – GGP15)/(P15P18-P16P17)

and, from (85)

h = -(kP16 +FF)/P15

Minimised Sum Square of Predictor Weighted Errors for solution of form y = AxB

We need to find values of A and B to minimise the equation:

- (88)

Differentiating (54) with respect to A and B gives:-

= 0 = - (89)

= 0 = - (90)

Making the substitutions:

P1 = ,P2 = , P3 = ,

P5 = we find from (91)

A = P1/P2- (91)

And substituting into (90) we find we need to solve the equation

FF = P2P3 – P1P5 = 0- (92)

In order to solve this we can make use of the method of Regula-Falsi (see for example wikipedia).

  1. Minimised Sum Square of Absolute Weighted Errors for solution of form y = AxBzC

We need to find values of A and B to minimise the equation:

- (93)

Differentiating (54) with respect to A, B and C gives:-

= 0 = - (94)

= 0 = - (95)

= 0 = - (96)

Making the substitutions:

P1 = , P2 = , P3 = ,

P4 = , P5 = , P6 = we find from (94)

A = P1/P2- (97)

And substituting into (95) and (96) we find we need to solve the equations:

FF = P2P3 – P1P4 = 0

GG = P2P5 - P1P6 = 0

Which can be solved iteratively as in Section 5 above:

FF + h + k = 0- (98)

GG + h + k = 0- (99)

(97) can now be re-written :

h = - (k + FF)/- (100)

which can then be substituted in (99) which becomes, after re-arrangement gives for k :

k = (FF-GG)/(-)- (101)

From (98) and (99), and with:

P7 = , P8 = , P9 = ,

P10 = , P11 =,P12 =

= P1P8 + P3P4 – 2P2P7 = P15- (102)

= 2P4P5 + P1P10 – 2P2P9 – P3P6 = P16- (103)

= 2P3P6 + P1P10 – P4P5 – 2P2P9 = P17- (104)

= P5P6 – P1P12 – 2P2P11 = P18- (105)

and, from (101)

k = (FFP17 – GGP15)/(P15P18-P16P17)- (106)

and, from (100)

h = -(kP16 +FF)/P15- (107)

  1. Minimised Sum Square of Absolute Errors for solution of form y = A + BxC

We need to find values of A and B to minimise the equation:

- (108)

Differentiating (106) with respect to A, B and C gives:-

= 0 = - (109)

= 0 = - (110)

= 0 = - (111)

Making the substitutions:

P1 = ,P2 = , P3 = , P4 = ,

P5 = , P6 = , P7 =

we arrive at, from 109:

A = (P1-BP2)/N- (112)

And substituting into (110):

B = (P1P2-NP7)/(P22 – NP3)- (113)

And we now have to solve the equation formed from 111 by using (109) and (110) :

FB = 0 = P4 – AP5 – BP6- (114)

Using, for example, the method of Regula-Falsi.

  1. Minimised Sum Square of Data Weighted Errors for solution of form y = A + BxC

We need to find values of A and B to minimise the equation:

- (115)

Differentiating (115) with respect to A, B and C gives:-

= 0 = - (116)

= 0 = - (117)

= 0 = - (118)

Making the substitutions:

P1 = ,P2 = , P3 = , P4 = ,

P5 = , P6 = , P7 =

we arrive at, from 115:

A = (P1-BP2)/N- (119)

And substituting into (117):

B = (P1P2-NP7)/(P22 – NP3)- (120)

And we now have to solve the equation formed from (118) by using (119) and (120) :

FB = 0 = P4 – AP5 – BP6- (121)

Using, for example, the method of Regula-Falsi.

  1. Minimised Sum Square of Absolute Errors for solution of form y = A + BxC

We need to find values of A and B to minimise the equation:

- (122)

Differentiating (122) with respect to A, B and C gives:-

= 0 = - (123)

= 0 = - (124)

= 0 = - (125)

Making the substitutions:

P1 = ,P2 = , P3 = , P4 = ,

P5 = , P6 = , P7 =

we arrive at, from 123:

A = (P1-BP2)/N- (126)

And substituting into (124):

B = (P1P2-NP7)/(P22 – NP3)- (127)

And we now have to solve the equation formed from 125 by using (126) and (127) :

FB = 0 = P4 – AP5 – BP6- (128)

Using, for example, the method of Regula-Falsi.

  1. Minimised Sum Square of Data Weighted Errors for solution of form y = A + BxC

We need to find values of A and B to minimise the equation:

- (129)

Differentiating (129) with respect to A, B and C gives:-

= 0 = - (130)

= 0 = - (131)

= 0 = - (132)

Making the substitutions:

P1 = ,P2 = , P3 = , P4 = ,

P5 = , P6 = , P7 =, P8 =

we arrive at, from (130) and (131)

A = (P1P5-P3P4)/(P2P5-P32)- (133)

B = (P1P3 – P2P4)/(P32-P2P5)- (134)

And we now have to solve the equation formed from (132) by using (133) and (134) :

FB = 0 = P6 – AP7 – BP8- (135)

Using, for example, the method of Regula-Falsi.

  1. Minimised Sum Square of Predicted Weighted Errors for solution of form y = A + BxC

We need to find values of A and B to minimise the equation:

- (136)

At the minimum we have two simultaneous equations formed by partial differentiation of – (136) with respect to A, B and C respectively:

= EE = 0 = - (137)

= FF = 0 = - (138)

= GG = 0 = - (139)

To solve the three non-linear simultaneous equations (137) – (139) we use an iterative approach based on Taylor Series expansions to solve for h, k and l (then EE, FF and GG and hence A, B, C): (see. For example, Froberg Introduction to Numerical Analysis).

EE + h + k + l = 0- (140)

FF + h + k + l = 0- (141)

GG + h + k + l = 0- (142)

From (124)

l = - ((EE + h+k)/)- (143)

which, substituted in (125) gives for k:

k(-) = (EE-FF) + h(-)- (144)

now let:

R1 = (-), R2 = (-), R3 = (EE-FF)

And substituting for l and k in (126):

h(R1(-)+R2(-))

= (R1(EE-GG) + R3(-) )- (145)

From (140) , (141) and (142)

= +

= +

= +

= +

= +

= + + -

= +

= +

=- -

+

Or, making substitutions:

P1 = , P2 =

P3 = ,P4 =

P5 = ,P6 =

P7=, P8=,

P9=, P10 = ,

P11 = , P12 = ,

P13=, P14=,

P15 = , P16 = ,

P17= , P18 = ,

P19 = , P20 = ,

P21= , P22 =

Then

EE = P1 – P2, FF = P3 – P4, GG = P5 – P6,

= EP =2P8 – 3P7, = ES = 2P10 – 3P9,= EP = 2P11-3P12,= FD = 2P10 – 3P9,

= FS = 2P14 – 3P13,= FP = P15 – 3BP16 – P17 + 2BP18,= GD = 2P12-3P11,= GS = 2P18-3P16,= GP = P19 – 3BP20 – P21 + 2BP22, which can be back-substituted into (143) – (145).