LEAST SQUARES and NORMAL EQUATIONS Background - Washington State University
LEAST SQUARES and NORMAL EQUATIONS
Background
? Overdetermined Linear systems: consider Ax = b if A is m ? n, x is n ? 1, b is m ? 1 with m > n. The linear system is inconsistent if no x satisfies all equations. Note: too many equations, not enough unknowns. Examples: a) An overdetermined 4x2 system x1 + 2x2 = 1 2x1 + 2x2 = 2 x1 - x2 = -1 2x1 + x2 = 2
b)
Fitting line to data
? The least squares solution: the x that minimizes
||r||2 = ||Ax - b||2 =
mn
1/2
aijxj - bi 2
i=1 j=1
2
LS and NORMAL EQUATIONS ? Geometric least squares solution x?: Ax? - b should be orthogonal to all Ax.
? Algebraic least squares solution: consider ||Ax - b||22 = ||A(x? + e) - b||22.
3
LEAST SQUARES, NORMAL EQUATIONS
The Normal Equations ? The normal equations are AT Ax = AT b. ? If rank(A) = n the normal equations have a unique solution x?. ? Example
? SE and RM SE: with r = Ax? - b
squared error
SE = ||r||22 = r12 + r22 + ? ? ? + rm2 ;
root mean squared error RM SE =
m i=1
ri2/m
=
SE/m.
4
LEAST SQUARES CONTINUED Data Fitting and Linear Models
? Fitting data to straight line: given data {(ti, yi)}mi=1, find the line y(t) = a + bt "closest" to the data points.
"Least Squares" line minimizes sum of squared errors.
5
LEAST SQUARES CONTINUED
Example: t = [6.8 7 7.1 7.2 7.4], y = [.8 1.2 .9 .9 1.5]
Straight Line Data Fit 1.5
1.4
1.3
1.2
1.1
1
0.9
0.8
0.7
6.5
6.6
6.7
6.8
6.9
7
7.1
7.2
7.3
7.4
7.5
Matlab
t = [6.8 7 7.1 7.2 7.4]'; y = [.8 1.2 .9 .9 1.5]';
A = [ones(5,1) t]; p = (A'*A)\(A'*y);
tp = [6.8:.01:7.4]; plot(tp,p(1)+p(2)*tp,t,y,'*')
disp(norm(A*p-y)/sqrt(5))
0.18439
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- 3 sums and integrals
- more np complete and np hard problems donald bren school of
- math 115 hw 3 solutions colorado state university
- solutions to review problems for chapter 6 6 1 6 6 college of arts
- math 230 01 fall 2012 hw 1 solutions duke university
- 1 simple linear regression i least squares estimation
- least squares and normal equations background washington state university
- minis mathcounts
- introduction to number theory 1 what is number theory
- randomized complete block design rcbd montana state university
Related searches
- washington state university bachelor degr
- washington state university employee benefits
- how to graph least squares regression line
- equation of least squares regression line calculator
- slope of the least squares regression line
- least squares regression line example
- how to use least squares regression
- least squares equation
- the least squares regression line calculator
- method of least squares equation
- least squares regression calculator
- washington state university baseball