# Finding the mean of a Gaussian distributed random variable given the variance

I have a Gaussian distributed random variable $X$ with known variance $\sigma^2$. Given that I know $P(X\geq t)=m$, how can I find the mean of the random variable?

• how can you know the variance without knowing the mean? – user603 Nov 29 '13 at 11:40
• I have to generate random numbers according to a gaussian distribution. Given the application it is reasonable to assume the variance and the probability that the variable is higher than a certain value. – markusian Nov 29 '13 at 11:47
• then the mean is the value of $t$ for which $m=1/2$ – user603 Nov 29 '13 at 12:13
• Feed $1 - m$ to a function like qnorm() in R. That tells you that you are so many standard deviations above or below the mean. You know the standard deviation as the root of the variance. The rest is arithmetic. – Nick Cox Nov 29 '13 at 12:16

Assuming $X \sim {\cal N}(\mu, \sigma^2)$ then $$\Pr(X \leq m) = \Phi\left(\frac{m-\mu}{\sigma}\right)$$ where $\Phi$ is the cumulative distribution function of the standard normal distribution ${\cal N}(0,1)$. Thus, knowing $p=\Pr(X \leq m)$, one has $$\frac{m-\mu}{\sigma}=\Phi^{-1}(p)$$ and finally $$\boxed{\mu=m-\sigma\Phi^{-1}(p)}.$$ And you get $\Phi^{-1}(p)$ in R by typing qnorm(p).

My idea is similar to Nick Cox's comment above, but uses optimize in R, so you do not 'need' arithmetics (which of course should be preferred as it is exact).

true_mean=5 #The unknown true mean