Completing the Square (Bivariate)

53 Views Asked by At

I am running a bivariate regression with the formula $$\hat{Z} = b_0+b_1X+b_2Y+b_3X^2+b_4Y^2+b_5XY$$ I'm easily able to obtain the 6 coefficients this way. However, I want to reparameterize the formula as $$\hat{Z} = \alpha + \dfrac 1 {σ_{xx} σ_{zz}-σ_{xz}^2} \Big[σ_{zz}(X-μ_x)^2-2σ_{xz}(X-μ_x)(Z-μ_z)+σ_{xx}(Z-μ_z)^2\Big]$$ Sadly, I'm stumped as to how to solve for $[\alpha,μ_x,μ_z,σ_{xx},σ_{zz},σ_{xz}]$ in terms of $[b_0,b_1,b_2,b_3,b_4,b_5]$. Any help would be much appreciated.