GG 313 Geological Data Analysis # 18

GG 313 Geological Data
Analysis # 18
On Kilo Moana at sea
October 25, 2005
Orthogonal Regression:
Major axis and
RMA Regression
Homework due Any problems?
Is the fit meaningful?
Curve fitting:
The formula for obtaining each of the curve fitting
algorithms is the same:
1) Decide what constitutes an “error”.
2) Decide what kind of curve parameters will be
matched.
3) Take the first derivative of the error function with
respect to each unkown.
4) Solve the resulting simultaneous equations for the
unknowns where the derivative (slope) = 0.
Major Axis:
In this case of orthogonal regression, the uncertainty is
assumed to be in both x and y equally, and the best-fit
curve minimizes the distance of each observation from
the best fit line:
We will minimize the sum of the squares of the
perpendicular distances from each point to a line:

E   xi  Xi   yi Yi 

2

(4.13)
The upper case letters are the observations and the
lower case are the coordinates of our best-fit line. The
line is defined by:
(4.14)
y  a bx
i
Or:

2
i
fi  a bxi  yi
(4.15)
The problem is to minimize the errors, but with the two
constraints provided by minimizing E and fitting the line,
we need help. Such help is provided by a method called
Lagrange multipliers, where we form a new function, F,
by adding the original error function(4.13) and the
constraint equations (4.15). Each constraint is scaled by
an unknown constant, I:
F  E  1 f1  2 f2 
 n fn  E  i fi (4.16)
We now have an equation we can differentiate, finding the
necessary partial derivatives:
F F F F



0
xi yi a b
(4.17)
Looking at each partial derivative in turn:
 

2 
(4.18)
  xi  Xi    ibxi   0  2xi  Xi  ib  0
xi
 xi

F  

2 
  yi Yi    i yi   0  2yi Yi  i  0
(4.19)
yi  yi

y

i
F

  i a  0   i  0
(4.20)
a
a
F

  ibxi   0   i xi  0
(4.21)
b
b
F
xi
Each i represents a different equation, thus, from 4.18 and
4.19:
bi
bi
xi  X i  
 xi  Xi 
(4.22)
2
yi Yi  
i
2
 yi  Yi 
i
2
2
(4.23)
Now we go bak to (4.14) and plug in xi and yi from the
equations above, and solve for i:
2
i 
a  bXi Yi 
2 
1 b
(4.25)
This gives us n+2 equations and n+2 unknowns (n i’s and a
and b). Substituting i from 4.25 into 4.20 and 4.21 yields:

2
0
a  bXi Yi 
2 
1 b
0   i Xi  b2i
(4.26)
(4.27)
2
b
 Xi a  bXi Yi    1 b2 a  bXi Yi   0
(4.28)
From (4.26) we see that
a  bX Y  0  na  b X  Y
i
i
i
(4.29)
(4.30)
i
so... a  Y  bX
After some algebra, and letting
Ui  Xi  X , Vi  Yi Y
and noting that U  V  0
i
i

we finally solve for the slope:

V  U

2
b
i
2
i

U  V   4U V 
2
i
2UiVi
2
i
2
i
i
2
(4.32)
This gives us two solutions for b that are orthogonal to
each other. One is the actual slope and the other is
perpendicular to it.
Reduced Major Axis (RMA) Regression:
In RMA regression we minimize the areas of the rectangle
formed by the data points and the nearest point on the
regression line.
E  xi  Xi yi Yi 
(4.33)
The constraint is still a straight line, yi=a+bxi, and the
Lagrange multiplier method leads to the equations like 4.16
and 4.17 giving:
F 


xi  Xi yi Yi   ibxi  0  yi Yi  bi  0 (4.34)


xi xi
xi
F 


x

X
y
Y

ibyi  0  xi  Xi  i  0 (4.35)
 i i  i i 


yi yi
yi
F 
(4.36)
  i a  0  i  0
a a
F 
(4.37)
  ibxi  0  i xi  0
b b

From 4.34 and 4.35, we get:
xi  Xi  i  0  xi  Xi  i
yi Yi  bi  0  yi  Yi  bi
(4.38)
(4.39)
Substituting into the equation for a line,
Yi  bi  a  bXi  i  or
Yi  a  bXi
i 
2b
Since
  0,
i
(4.41)
we get again (4.30):
a  Y  bX

(4.40)
(4.42)
After plugging into (4.37), and more algebra, we get:
U i  xi  X ,
b
2
V
 i
Vi  yi Y
y
2 
U  x
(4.43)
i
Thus, the Reduced Major Axis regression line is particularly
simple to calculate, requiring only the means and standard

deviations
of the Xi and Yi.