How can I compute the conditional mean, given a standard deviation?
Suppose that I have knowledge of a population's mean and standard deviation. Then, new information is provided to constrain the draw of the next sample to be at least a certain value: the value is >= min_value
. What is the expected value for the next sample, given this constraint?
(I'm using Python, in case anyone has a solution involving scipy, etc).
Update: please assume a normal distribution.
Suppose $X\sim N(\mu,\sigma^2)$, and let $l$ be the lower bound of this next sample. Given the constraint, and using the identity $\phi '(x)\equiv -x\phi (x)$, the expected value is \begin{align*} \mathbb E(X|X>l)&=\mu +\sigma\,\mathbb E\left(Z|Z>l'\right)=\mu +\sigma \cdot \frac{\int _{l'}^\infty x\phi (x)\,{\rm d}x}{1-\Phi(l')}\\ &=\mu+\sigma\cdot \frac{-\int_{l'}^\infty \phi'(x)\,{\rm d}x}{1-\Phi(l')}=\mu +\frac{\sigma\phi(l')}{1-\Phi(l')} \end{align*} where $Z\sim N(0,1)$, $l'=\frac{l-\mu}{\sigma}$, $\phi(x)=\frac1{\sqrt{2\pi}}e^{-\frac{x^2}{2}}$ is the p.d.f. of the standard normal distribution, and $\Phi(x)=\int_{-\infty}^x\phi(z)\,{\rm d}z$ is the c.d.f. of the standard normal distribution.