Surface of the cut of an ellipsoid / Marginal density of a multivariate normal over an affine space - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-25T01:53:11Z http://mathoverflow.net/feeds/question/36493 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/36493/surface-of-the-cut-of-an-ellipsoid-marginal-density-of-a-multivariate-normal-ov Surface of the cut of an ellipsoid / Marginal density of a multivariate normal over an affine space Arthur B 2010-08-23T20:38:19Z 2011-07-23T16:22:12Z <p>So I'm trying to get the marginal density of a multivariate normal over an affine space if $A$ is a matrix in $\mathbb{R}^p \times \mathbb{R}^n$ for $p &lt; n$ and $B \in \mathbb{R}^n$, $\Sigma$ is a positive definite matrix.</p> <p>We're looking at... $$\lim_{\epsilon \rightarrow 0}\frac{1}{\epsilon}\int_{||Ax-B||&lt;\epsilon} e^{-\frac{1}{2} x^t \Sigma^{-1} x } dx$$</p> <p><strong>Edit</strong> <em>The space over which I integrate is wrong, see edit at the end... I should be controlling the distance to the projection, not something that depends on the scale of $A$ and $B$.</em></p> <p>The first step is to get $$x_0 = \hbox{argmin}_x \left[ x^t \Sigma^{-1} x | Ax-B = 0 \right]$$</p> <p>If one writes the Cholesky decomposition $\Sigma^-1 = L^T L$ and $\hbox{}^+$ is the Moore-Penrose pseudo inverse, then $$x0 = (A L^{-1})^{+} B$$</p> <p>We substitute $x = x_0 + y$ in the integral, $y$ is orthogonal to $x_0$ with respect to $\Sigma^-1$ so the $x \Sigma^{-1} y$ terms disappear and we get something like</p> <p>$$e^{-\frac{1}{2} x_0^t \Sigma^{-1} x_0} \lim_{\epsilon \rightarrow 0}\frac{1}{\epsilon}\int_{||Ay||&lt;\epsilon} e^{-\frac{1}{2} y^t \Sigma^{-1} y} dy$$</p> <p>setting $z = Ly$</p> <p><strong>Edit</strong> urrrr... $$e^{-\frac{1}{2} x_0^t \Sigma^{-1} x_0} \lim_{\epsilon \rightarrow 0}\frac{1}{\epsilon}\int_{||A L^{-1}z||&lt;\epsilon} e^{-\frac{1}{2} z^t z} \frac{dy}{dz} dz$$</p> <p>hum the $\frac{dy}{dz}$ wouldn't be very nice...</p> <p>At this point, I've gotten rid of the affine part by factoring the $x_0$ out ( yay.. ) but I can't quite get that last cut... It's likely going to involve the determinant of $\Sigma$ and the rank of $A$ ( assume it's $p$ if needed ) but I can't figure out how.</p> <p>a) Do you notice anything obviously wrong in the derivation of $x_0$ ?</p> <p>b) What's the obviously right answer that has been eluding me ?</p> <p><strong>Edit</strong> c) Possible way, orthonormalize the kernel of $A$ then the rest of the space. Then the problem boils down to finding the density of a multivariate normal conditional on some elements of the vector being known... that's not a nice formula, it involves slicing $\Sigma$ and taking the Schur complement see <a href="http://en.wikipedia.org/wiki/Multivariate_normal#Conditional_distributions" rel="nofollow">Wikipedia, Multivariate normal, Conditional distributions</a></p> <p><strong>Edit</strong> It occurs to me that the $||Ay||&lt;\epsilon$ criterion isn't the right one, otherwise, the answer would depend on the scale of $A$ which is dumb. I guess the right criterion is $||A^{t}(A A^{t})^{-1}A y||&lt;\epsilon$, which is the distance of vector $y$ to its orthogonal projection on the subspace $A. =$</p> <p>Thanks!</p> http://mathoverflow.net/questions/36493/surface-of-the-cut-of-an-ellipsoid-marginal-density-of-a-multivariate-normal-ov/39171#39171 Answer by Yaroslav Bulatov for Surface of the cut of an ellipsoid / Marginal density of a multivariate normal over an affine space Yaroslav Bulatov 2010-09-18T00:06:20Z 2010-09-18T00:06:20Z <p>I had to do something similar recently and there's a neat trick for integrating Gaussian over linear subspace of $\mathbb{R}^n$ -- write it as an integral over whole $\mathbb{R}^n$ but substitute Dirac measure for regular. <a href="http://yaroslavvb.blogspot.com/2010/09/dirac-integration-trick.html" rel="nofollow">Here</a>'s overview, and <a href="http://math.stackexchange.com/questions/4106/normalization-factor-for-restricted-density" rel="nofollow">discussion</a> on math.overflow</p>