Compute sum of vectors drawn from multivariate normal, subject to a linear constraint I want to compute $S = \sum_{i=1}^n x_i$ where $w^t x_i>-1, \; \forall i$ and $x_i \tilde{} \mathcal{N}(\mu, \Sigma)$ for known $w$, $\mu$ and $\Sigma$. 
I know $S$ can be approximated by sampling techniques but I was wondering if S can be computed analytically. 
 A: Yes. The constraint is truncating the distribution in one direction (given by $\vec{w}$). After changing coordinates, $S$ can be expressed as the sum of a constant, a truncated normal distribution, and a normal distribution (from the sum of the other directions).  Without any loss of generality rescale $S$ so that the truncated distribution is standard, truncated on the left at a value $w$, and the other normal distribution has $\sigma$ for its standard deviation, and recenter it.  The PDF of this adjusted sum can be computed as the convolution of the truncated normal PDF and a standard normal PDF, yielding
$$f_S(x) = \frac{1}{\sqrt{2\pi(1+\sigma^2)}\left(1-\Phi(w)\right)}e^{-\frac{x^2}{2+2 \sigma ^2}} \left(1-\Phi \left(\frac{ w-x+w \sigma ^2}{\sigma\sqrt{1 +  \sigma^2}}\right)\right)$$
where $\Phi$ is the standard Normal CDF.  Here's a plot of the truncated Normal distribution (red) and $f_S$ (blue) for $w=-1$ and $\sigma=1/2$:

The red distribution has been spread out or "mollified" by its convolution with a Normal distribution of standard deviation $1/2$.
