Factoring $x$ out of $(x-y)^T(x-y)$?

74 Views Asked by At

I'm deriving the decision rule for prediction of a random variable $Y$ given $X$, with multivariate guassians, where I know $$ P[X=x | Y=1] = \mathcal{N}(x,\mu_1, \Sigma) \\ P[X=x | Y=0] = \mathcal{N}(x,\mu_0, \Sigma) \\ P[Y=1] = p $$ The rule is $P[Y=1|X=x] > P[Y=0|X=x] \implies \text{choose Y=1}$ and I'm simplifying for $x$. Using Bayes I got up to $$ -\frac{1}{2}\Sigma^{-1}[(x-\mu_1)^T(x-\mu_1) - (x-\mu_0)^T(x-\mu_0)] > \ln{(\frac{1-p}{p})} $$

My question is a pure linear algebra refresher. What can I do with the term $(x-\mu_1)^T(x-\mu_1)$ and it's counterpart? Can I factor out $x$ using $(x-\mu_1)^T(x-\mu_1) = \sqrt{\Vert x - m_1 \rVert}$ somehow?

Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

Note that in your problem $(x-\mu)^\top(x-\mu)=\|x-\mu\|_2^2 = \|x\|_2^2+\|\mu\|_2^2-2x^\top \mu$. Therefore, the expression inside brackets can be simplified to $$\|\mu_1\|_2^2-\|\mu_0\|_2^2-2x^\top(\mu_1-\mu_0).$$ Hope this helps.