# Conditional Expectation of Multivariate Normal

I'm trying to calculate a good mean shrinkage parameter for a custom quadratic discriminant analysis (QDA), and I ran into a math problem. Suppose $$X=(X_1, X_2, \ldots, X_k)^T\sim{\mathcal{N}(\textbf{0},\Sigma)}$$, where $$\Sigma_{ii} = 1$$ for $$i=1,2,\ldots, k$$. Define $$\text{mean}(X) = \frac{1}{k}\sum_{i = 1}^k X_i.$$ I would like to calculate $$E[\text{mean}(X)|\ \text{mean}(X) > 0]$$, if there's a closed form.

I suspect there isn't and curve fitting will be necessary. If that's the case, is there a programmatic way of fitting a curve to results obtained via Monte Carlo simulation?

I have been trying to fit a curve as a function of $$k$$ and $$\mathbb{1}^T \tilde{\Sigma}\mathbb{1}$$, where $$\tilde{\Sigma} = \text{Var}(X|\ \text{mean}(X) > 0)$$, since $$\tilde{\Sigma}$$ should be close to the covariance matrix I have for my labels in QDA. Unfortunately, I've had limited success. Neural networks and ML techniques are not an option due to speed concerns.

Since under the assumption $$\bar{X} \sim N(0, \sigma^2)$$ with $$\sigma^2 = \frac{1}{k^2}1'\Sigma 1$$, the problem can be reduced to finding $$E[X|X > 0]$$ given $$X \sim N(0, \sigma^2)$$, which by definition of conditional expectation (conditioning on an event) is \begin{align} E[X|X > 0] = \frac{E[XI_{[X > 0]}]}{P(X > 0)} = 2\int_0^\infty x\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{x^2}{2\sigma^2}}dx = \frac{\sqrt{2}\sigma}{\sqrt{\pi}}. \end{align}
• Thank you for your help! I had considered the case where $X\sim{\mathcal{N}(\textbf{0}, I)}$, and I don't know why I didn't notice this. Your solution may be good enough. However, you need to assume that the off-diagonal elements are 0 to use the central limit theorem. Some components may be correlated here. May 19, 2023 at 22:51
• @Charles0349 I didn't assume the off-diagonal elements to be $0$ (please read my first sentence more carefully) nor use CLT (there is no place in the answer invoked any asymptotic argument). The point is if $(X_1, \ldots, X_n) \sim N(0, \Sigma)$ (for any valid covariance matrix $\Sigma$), then the sample mean $\bar{X}$ is always normally distributed with mean $0$ and variance $1'\Sigma 1/n^2$. This is a consequence of affine transformation property of multivariate normal distribution. May 19, 2023 at 23:46