Probability that an observed variable is greater than zero

I observe a variable $$\hat{x}$$. I know that my observation is noisy due to some Gaussian measurement noise $$\mathcal{N}(0, \sigma)$$.

My goal is to compute the probability $$p(x > 0\mid\hat{x})$$ that the true underlying $$x \in \mathbb{R}$$ is positive. The a priori probability of any $$x$$ is unknown, i.e. the prior distribution is assumed to be flat. Also assume I know $$\sigma$$ precisely. What is $$p(x > 0\mid\hat{x})$$?

We can find the posterior distribution of $$x$$:

$$p(x|\hat x)\propto p(\hat x|x)p(x)\propto\exp\left[-\dfrac{(x-\hat x)}{2\sigma^2}\right]\Rightarrow x\sim\mathcal N(\hat x, \sigma^2)$$

Since $$x|\hat x$$ is normal, we can easily calculate $$p(x>0|\hat x)$$ using the standard normal CDF, $$\Phi$$:

$$p(x>0|\hat x)=1-\Phi\left(\dfrac{0-\hat x}{\sigma}\right)=\Phi\left(\dfrac{\hat x}{\sigma}\right)$$

Notice that, in this case, this happens to be the same as one minus the p-value for the frequentist Z-test for $$x>0$$.

• Thanks, much appreciated! – monade Sep 30 '20 at 19:42