Rearranging a formula (Multivariate Gaussian function)

In summary: Edit2: I see where the factor of 2 comes from. It is because you have multiplied by 2 in order to make the first term -(bTAθ0 + θ0TATb) into -2bT(Aθ0) without changing the value of that term, and likewise the second term. But it is important to keep track of such deformation of expressions in case they come back to bite you later. In fact, the factor of two is not necessary in this case. In summary, the conversation discusses how to rearrange a likelihood function in the form of an equation. The author expands the exponent in the original function and then assumes that the function can be written equivalently with a constant and an
  • #1
Pi-Bond
302
0

Homework Statement


See image, p(y|θ) is the Likelihood function which has to be rearranged in the form of equation (3). θ is a vector variable.
1zobx9u.png


Homework Equations


None?

The Attempt at a Solution


I first expanded the exponent in the original function, equation (2).

[tex](b-A\theta)^T(b-A\theta)=b^Tb - b^TA\theta - \theta^T A^T b + \theta^T A^T A \theta[/tex]

Now suppose I can write the function equivalently as

[tex]C \exp\left( -\frac{1}{2} (\theta - \theta_0)^T L (\theta - \theta_0) \right)[/tex]

where C represents the same constant multiplying with exp in equation (2). In this case, the exponential parts must be the same. So:

[tex]b^Tb - b^TA\theta - \theta^T A^T b + \theta^T A^T A \theta = \theta^TL\theta - \theta^TL\theta_0 - \theta_0^TL\theta + \theta_0^TL\theta_0 [/tex]

If this this expression is true for all θ, then all coefficients of (...)θ , θT(...) , θT(...)θ and the constants must match.

So L = ATA and θ0=L-1ATb.

Now I don't know how to get L0. (equation (5) ). I only have this condition left from my assumption about the constants above:

bTb=θT00

There just don't seem to be enough terms in either exponent to allow the exponential part of L0. I don't think I can add and subtract anything either...

Any ideas?
 
Last edited:
Physics news on Phys.org
  • #2
Pi-Bond said:

Homework Statement


See image, p(y|θ) is the Likelihood function which has to be rearranged in the form of equation (3). θ is a vector variable.
1zobx9u.png


Homework Equations


None?

The Attempt at a Solution


I first expanded the exponent in the original function, equation (2).

[tex](b-A\theta)^T(b-A\theta)=b^Tb - b^TA\theta - \theta^T A^T b + \theta^T A^T A \theta[/tex]

Now suppose I can write the function equivalently as

[tex]C \exp\left( -\frac{1}{2} (\theta - \theta_0)^T L (\theta - \theta_0) \right)[/tex]

where C represents the same constant multiplying with exp in equation (2). In this case, the exponential parts must be the same. So:

[tex]b^Tb - b^TA\theta - \theta^T A^T b + \theta^T A^T A \theta = \theta^TL\theta - \theta^TL\theta_0 - \theta_0^TL\theta + \theta_0^TL\theta_0 [/tex]

If this this expression is true for all θ, then all coefficients of (...)θ , θT(...) , θT(...)θ and the constants must match.

So L = ATA and θ0=LATb.

Now I don't know how to get L0. (equation (5) ). I only have this condition left from my assumption about the constants above:

bTb=θT00

There just don't seem to be enough terms in either exponent to allow the exponential part of L0. I don't think I can add and subtract anything either...

Any ideas?

Try to show that
[tex] (b-A\theta)^T(b-A\theta) = (\theta - \theta_0)^T L (\theta - \theta_0) + K[/tex] for some matrix L and some constant K, and for ##\theta_0## as given in the question.
 
  • #3
Ok.

[tex](b-A\theta)^T(b-A\theta)=b^Tb - b^TA\theta - \theta^T A^T b + \theta^T A^T A \theta[/tex]
[tex]= b^Tb - (L L^{-1}A^T b)^T\theta - \theta^T L( L^{-1}A^T b) + \theta^T L \theta[/tex]
[tex]= b^Tb + \theta_0^T L \theta - \theta^T L \theta_0 + \theta^T L \theta[/tex]
[tex]= b^Tb + (\theta-\theta_0)^T L \theta - \theta^T L \theta_0[/tex]
[tex]= b^Tb + (\theta-\theta_0)^T L \theta - (\theta-\theta_0)^T L \theta_0 -\theta_0^T L \theta_0 [/tex]
[tex]= b^Tb + (\theta-\theta_0)^T L (\theta-\theta_0)-\theta_0^T L \theta_0 [/tex]

I used the fact that LT=L=ATA.

On the basis of this it seems K = bTb - θ0T0

I still can't see the origin of L0 here though..
 
  • #4
Bump. I haven't been able to find any leads. Anyone have an idea?
 
  • #5
I'm somewhat confused by the fact that if [itex]L = A^TA[/itex] and [itex]\theta_0 = L^{-1}A^Tb[/itex] then [itex]L^{-1} = A^{-1}(A^T)^{-1}[/itex] so that
[tex]A\theta_0 = AL^{-1}A^Tb = A(A^{-1}(A^T)^{-1})A^Tb = b[/tex]
which means that [itex]b - A\theta_0 = b - b = 0[/itex]. So I'm at a loss to explain why the author has included the exponential in [itex]\mathcal{L}_0[/itex], when its value appears to be [itex]\exp(0) = 1[/itex].

On the other hand, I was able to show (using the additional fact that [itex]L[/itex] is symmetric so that [itex](L^T)^{-1} = (L^{-1})^T = L^{-1}[/itex]) that
[tex](\theta - \theta_0)^TL(\theta - \theta_0) = (A\theta - b)^T(A\theta - b)
= (b - A\theta)^T(b - A\theta)[/tex]
It's just a case of expanding the left hand side, substituting the definitions of [itex]L[/itex] and [itex]\theta_0[/itex] and simplifying.
 
  • #6
pasmith said:
I'm somewhat confused by the fact that if [itex]L = A^TA[/itex] and [itex]\theta_0 = L^{-1}A^Tb[/itex] then [itex]L^{-1} = A^{-1}(A^T)^{-1}[/itex]
Ignore that: A is not square, so cannot be invertible.

The aim is to show that [itex](b - A\theta)^T(b - A\theta) = (b - A\theta_0)^T(b - A\theta_0) + (\theta - \theta_0)^T(\theta - \theta_0)[/itex]

Now the left hand side is
[tex]b^Tb - b^TA\theta - \theta^TA^Tb + \theta^TA^TA\theta[/tex]

The right hand side is
[tex]b^Tb - b^TA\theta_0 - \theta_0^TA^Tb + \theta_0^TA^TA\theta_0
+ \theta^TL\theta - \theta^TL\theta_0 - \theta_0^TL\theta + \theta_0^TL\theta_0\\
= b^Tb - (b^TA\theta_0 + \theta_0^TA^Tb) + 2\theta_0^TL\theta_0
+ \theta^TL\theta - \theta^TL\theta_0 - \theta_0^TL\theta \\
= b^Tb - 2b^TAL^{-1}A^Tb + 2b^TAL^{-1}A^Tb
+ \theta^TA^TA\theta - \theta^TA^Tb - b^TA\theta \\
= b^Tb -b^TA\theta - \theta^TA^Tb + \theta^TA^TA\theta
[/tex]
as required.
 
Last edited:
  • #7
Edit: there seems to be a mistake between the second and third lines. You go from -(bT0 + θ0TATb) to -2bT(...)+2bT(...)

The plus sign should be minus, and I'm not sure of where the factor of 2 comes from. Anyway I will investigate your approach.
 
Last edited:

FAQ: Rearranging a formula (Multivariate Gaussian function)

How do I rearrange a multivariate Gaussian function?

To rearrange a multivariate Gaussian function, you can use basic algebraic manipulation and the properties of exponents. Start by isolating the dependent variable on one side of the equation, and then use logarithms to eliminate the exponent. From there, you can solve for the remaining variables.

2. What is the purpose of rearranging a multivariate Gaussian function?

Rearranging a multivariate Gaussian function allows you to manipulate the formula to better suit your needs. This can be helpful in solving for a specific variable or simplifying the equation for easier understanding and analysis.

3. Can I rearrange a multivariate Gaussian function for any variable?

Yes, you can rearrange a multivariate Gaussian function for any variable as long as there is enough information provided in the formula. However, you may sometimes encounter equations that are not solvable for a specific variable.

4. Are there specific rules or methods for rearranging a multivariate Gaussian function?

Yes, there are certain rules and methods that can be used for rearranging a multivariate Gaussian function. Some common techniques include grouping like terms, using the properties of exponents, and using logarithms to eliminate the exponent.

5. Can rearranging a multivariate Gaussian function change the nature of the function?

No, rearranging a multivariate Gaussian function does not change the nature of the function. The function will still represent a bell-shaped curve with the same mean and standard deviation. However, the rearranged equation may be easier to work with and provide additional insights into the function.

Similar threads

Back
Top