Documente Academic
Documente Profesional
Documente Cultură
Qin Zhang
SAMSI/ CRSC Undergraduate Workshop, 2008
Outline
Spring-mass system
y(t) = Ae 2m t sin(t + )
where thep
constants A and are determined by the initial conditions,
and = k/m.
Question: What if we dont know m, c or k in advance?
Spring-mass system
y(t) = Ae 2m t sin(t + )
where thep
constants A and are determined by the initial conditions,
and = k/m.
Question: What if we dont know m, c or k in advance?
y = F(x, b)
where b is the model parameter, x is the input variable, and y is the
output variable.
Forward problem:
Given the parameter b, what is the value of y for x?
Inverse problem:
Having data (x, y), how to calculate or estimate the parameter b?
In some sense, we need to find the inverse F 1
y = F(x, b)
where b is the model parameter, x is the input variable, and y is the
output variable.
Forward problem:
Given the parameter b, what is the value of y for x?
Inverse problem:
Having data (x, y), how to calculate or estimate the parameter b?
In some sense, we need to find the inverse F 1
y = F(x, b)
where b is the model parameter, x is the input variable, and y is the
output variable.
Forward problem:
Given the parameter b, what is the value of y for x?
Inverse problem:
Having data (x, y), how to calculate or estimate the parameter b?
In some sense, we need to find the inverse F 1
y = F(x, b)
where b is the model parameter, x is the input variable, and y is the
output variable.
Forward problem:
Given the parameter b, what is the value of y for x?
Inverse problem:
Having data (x, y), how to calculate or estimate the parameter b?
In some sense, we need to find the inverse F 1
y = b0 + b1 x1 + b2 x2 + . . . bn1 xn1 + bn xn
b0
b1
= 1 x1 . . . xn .
..
bn
y = b0 + b1 x1 + b2 x2 + . . . bn1 xn1 + bn xn
b0
b1
= 1 x1 . . . xn .
..
bn
y = b0 + b1 x1 + b2 x2 + . . . bn1 xn1 + bn xn
b0
b1
= 1 x1 . . . xn .
..
bn
y = b0 + b1 x1 + b2 x2 + . . . bn1 xn1 + bn xn
b0
b1
= 1 x1 . . . xn .
..
bn
Multidimension
y1
y2
..
.
=
=
Linear Model
y1
y2
..
.
ym
x11
x21
..
.
. . . x1n
x2n
..
.
xm1 . . . xmn
b1
b2
..
.
bn
y = Xb
where X is a m n matrix, b is a n 1 vector, and y is a m 1 vector.
Example
b1 + 2b2 = 3
b1 + 2b2 = 3
2b1 3b2 = 1
b1 + 2b2 = 3
2b1 3b2 = 1
3b1 2b2 = 4
y = Xb
where X is a m n matrix, b is a n 1 vector, and y is a m 1 vector.
If m < n, underdetermined system
usually have infinite many solution.
If m = n, X is a square matrix. If X is nonsingular, then
b = X 1 y
If m > n, overdetermined system
usually have no exact solution.
Question: Can we find some solution in a proper sense?
y = Xb
where X is a m n matrix, b is a n 1 vector, and y is a m 1 vector.
If m < n, underdetermined system
usually have infinite many solution.
If m = n, X is a square matrix. If X is nonsingular, then
b = X 1 y
If m > n, overdetermined system
usually have no exact solution.
Question: Can we find some solution in a proper sense?
y = Xb
where X is a m n matrix, b is a n 1 vector, and y is a m 1 vector.
If m < n, underdetermined system
usually have infinite many solution.
If m = n, X is a square matrix. If X is nonsingular, then
b = X 1 y
If m > n, overdetermined system
usually have no exact solution.
Question: Can we find some solution in a proper sense?
Transpose of a matrix
The transpose of a matrix X is denoted by X T , whose rows are the
columns of X.
For example,
1 2
X = 0 1 ,
3 0
X =
1 0 3
2 1 0
(A + B)T = AT + BT ,
(AB)T = BT AT
Transpose of a matrix
The transpose of a matrix X is denoted by X T , whose rows are the
columns of X.
For example,
1 2
X = 0 1 ,
3 0
X =
1 0 3
2 1 0
(A + B)T = AT + BT ,
(AB)T = BT AT
Transpose of a matrix
The transpose of a matrix X is denoted by X T , whose rows are the
columns of X.
For example,
1 2
X = 0 1 ,
3 0
X =
1 0 3
2 1 0
(A + B)T = AT + BT ,
(AB)T = BT AT
Inner product
b1
(1, 2, 3) b2 = b1 + 2b2 + 3b3
b3
In general,
b1
n
.. X
(a1 , . . . , an ) . =
ai bi
i=1
bn
< a, b >= aT b
Inverse of a matrix
An n n square matrix X is nonsingular (invertible) if there exists a
matrix X 1 such that XX 1 = X 1 X = I, where I is the identity
matrix.
Theorem: X is nonsingular if and only if det(X) 6= 0.
a b
If X =
then det(X) = ad bc,
c d
X 1 =
1
ad bc
d b
c a
1 2
0 1
3 0
b1
1
b2 = 0
b3
3
3
b1
4 b2 =
1
b3
1
2 3
2
1 4 3
0 1
4
2
3
4
1
= 1
1
1 2
0 1
3 0
b1
1
b2 = 0
b3
3
3
b1
4 b2 =
1
b3
1
2 3
2
1 4 3
0 1
4
2
3
4
1
= 1
1
1 2
0 1
3 0
b1
1
b2 = 0
b3
3
3
b1
4 b2 =
1
b3
1
2 3
2
1 4 3
0 1
4
2
3
4
1
= 1
1
Vector norm
The vector norm is a positive valued function to measure the length of
a vector.
In Euclidean space R2 , the Euclidean norm of a vector v = (x, y) is
defined by
p
kvk = x2 + y2
In general, the 2- norm of a n 1 vector y Rn is defined by
n
X
1
kyk2 = (
y2i ) 2
i=1
so
kyk22 =
n
X
i=1
Vector norm
The vector norm is a positive valued function to measure the length of
a vector.
In Euclidean space R2 , the Euclidean norm of a vector v = (x, y) is
defined by
p
kvk = x2 + y2
In general, the 2- norm of a n 1 vector y Rn is defined by
n
X
1
kyk2 = (
y2i ) 2
i=1
so
kyk22 =
n
X
i=1
Matrix norm
The 1-norm of a m n matrix X Rmn is defined by
kXk1 = max
1jn
m
X
|Xij |
i=1
ill-conditioned system
Example:
0.835 0.667
0.333 0.266
b1
b2
0.835 0.667
0.333 0.266
b1
b2
0.168
0.067
0.168
0.066
b1
b2
b1
b2
ill-conditioned system
Example:
0.835 0.667
0.333 0.266
b1
b2
0.835 0.667
0.333 0.266
b1
b2
0.168
0.067
0.168
0.066
b1
b2
b1
b2
ill-conditioned system
Example:
0.835 0.667
0.333 0.266
b1
b2
0.835 0.667
0.333 0.266
b1
b2
0.168
0.067
0.168
0.066
b1
b2
b1
b2
2
1 2
b
1
0 1
= 3
b2
4
3 0
NO exact solution!!!
The solution
b is called the least square solution of the system.
In the previous example, we want to minimize
SSE = (2 b1 2b2 )2 + (3 b2 )2 + (4 3b1 )2
bT a
=a
b
aT b
aT b
)j =
= aj
b
bj
Pn
i=1 ai bi .
So
Normal equation
0=
ky Xbk22
(y Xb)T (y Xb)
=
b
b
= X T (y Xb) + [(y Xb)T (X)]T
= X T (y Xb) X T (y Xb)
= 2X T (y Xb)
= 2(X T y X T Xb)
Normal Equation:
X T Xb = X T y
If (X T X)1 exists, then
b = (X T X)1 X T y
i = 1, . . . n
y1
..
. =
yn
then
XT X =
n
X
x2i ,
x1
.. b
.
xn
XT Y =
i=1
b = Pi=1
n
2
i=1 xi
n
X
i=1
xi yi
Remark:
the estimation
b depends on whether cond(X T X) is large or not
How do we know if the parameters estimate are good or bad?
Uncertainty in the estimation is related to the measurement error.
(to be addressed in an upcoming tutorial titled "Statistical View
of Linear Least Squares" by Dr. Michael D. Porter)