Given:
Prior: $p(A)=exp(-\frac{1}{2}PA^TA)$
Likelihood: $p(Y|X,A)=exp(-\frac{1}{2}q(Y-XA)^T(y-XA))$
I want to calculate the posterior distribution $f(X|Y,A)$ by using 'completing the square' and then get $p(X|Y,A)$ by normalizing the distribution. But I got stuck in the middle. Can anybody help please!
Here are my steps:
$f(X|Y,A)$
$= p(X)p(Y|X,A)$
$=exp(-\frac{1}{2}PX^TX)exp(-\frac{1}{2}Q(Y-XA)^T(y-XA))$
$=exp(-\frac{1}{2}PX^TX)exp(-\frac{1}{2}QY^TY)exp(-\frac{1}{2}Q(2Y^TXA+A^TX^TXA))$
$=C\cdot exp(-\frac{1}{2}(PA^TA+2QY^TXA+QA^TX^TXA))$
where C is $exp(-\frac{1}{2}QY^TY)$, a constant.
But then I do not know how to proceed to complete the square. Any kind of help is appreciated!
The linear term has the wrong sign. And you switched from $PX^\top X$ to $PA^\top A$. Can you complete the square if you fix these errors?