Exercise
Exercise
1. (Influence on the solution of changing weights) Solve the least squares problem
given by
1 1 2 1 0 0
a) A = 1 2 , b = 1 , and C = 0 2 0 .
−1 1 0 0 0 1
1 0 0
b) Change C to C = 0 2 0 . This corresponds to not using the third
0 0 0
observation.
1 1
c) Show that the solution in b) could be obtained from A = , and
1 2
2
b= .
1
1 0 0
d) Find the solution when C = 0 2 0 .
0 0 ∞
1 21 0 0
1 0 0
1 1 8 1 2 0 0 2
2. Let A = 2
1 3 , b = 8 , C = 0 0 1 0 , and σ0 = 1. Define W
1 4 20 0 0 0 2
as W = chol(C). Compute A1 = W A, b1 = W b and find x.
MATLAB has a function sqrtm that computes the square root of a matrix. Use
this function for an alternative definition of W and repeat the computations.
3. Let be given the normals
A B x1 b 4 8 x1 36
= 1 or = .
BT D x2 b2 8 26 x2 112
Ax = B y + Gz
or
4 8 y 4 8
= y+ z.
8 26 z 8 26
GT P Gẑ = GT P b.
ŷ = (B T B)−1 B T (b − Gẑ).
5. Let be given
1 0 0
A = 1 1 and b = 8 and C=I
1 3 8