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?

  • $\begingroup$ how can you know the variance without knowing the mean? $\endgroup$ – user603 Nov 29 '13 at 11:40
  • $\begingroup$ 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. $\endgroup$ – markusian Nov 29 '13 at 11:47
  • $\begingroup$ then the mean is the value of $t$ for which $m=1/2$ $\endgroup$ – user603 Nov 29 '13 at 12:13
  • 2
    $\begingroup$ 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. $\endgroup$ – 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
var=1 #Your known variance
t=3 #Your known cut off score t
P<-1-pnorm(3,true_mean,var) #your known p-value

opt<-function(x){(1-pnorm(t,x,var)-P)^2} #A loss function to be optimized, least squares
optimize(opt,interval=c(-10,10)) #Onedimension optimization of opt

Will give an estimate of the true mean within bounds of accurancy specified/determined by the machine.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.