Marginalization
2021-09-03
Suppose that
1 z1=x1+n1
where
- z1,x1,n1 are 3D vectors in R3,
- n1 is randomly distributed w ith normal distribution N(0,Σ1), with Σ1 being 3×3
and
2 z2=A[x1x2]+b+n2
where
- A is a 6×6 matrix
- x2 is a 3D vector in R3
- z2,n2 are 6D vectors in R6, and
- n2 is randomly distributed with normal distribution N(0,Σ2), with Σ2 being 6×6
Supposing that x1 and x2 are unknowns, what is the optimal estimate of x2 given everything else?
We can first observe that A can be partitioned into its left and right 6×3 submatrices:
3 A=[A1A2]
such that
4 z2=A1x1+A2x2+b+n2=A1z1−A1n1+A2x2+b+n2
Let
5 n3=n2−A1n1
From the Matrix Cookbook cookbook we can see that n3 is distributed with normal distribution N(0,Σ2+A1Σ1A1T)
Now we have:
6 z2=A1z1+A2x2+b+n3
Let
7 y=A2x2+A1z1+b−z2
Now, the probability of observing z2 is
8 p(z2)=exp(−yTΣ3Ty)
To maximize the likelihood we can simply minimize the log likelihood:
9 minx2yTΣ3Ty
Minimizing this quadratic is straightforward.
1 References
- cookbook Matrix Cookbook,Kaare Brandt Petersen, Michael Syskind Pedersen. link, link2.