Suppose I know my position $x$ to be a normal distribution with density $N(\mu_1=1000,\sigma_1^2=900)$. I query a position sensor, which outputs a measurement $z=1100$; however this sensor is faulty, and its output is a normal distribution with variance $\sigma_2^2=100$.

Given the prior probability and sensor error, how likely is it that the measurement was the given value,$z$ = $1100$?

Given that $p(x) = N(\mu_1,\sigma_1)$ and $p(z|x) = N(\mu_2=1100,\sigma_2)$, the updated position is given by Bayes' rule:

2 Answers
2

I think the question as described does not require the calculation of the posterior. First, note that technically, the question asks for the likelihood of a point value under a continuous distribution (with bounded PDFs). This likelihood is trivially 0 for all such point values. Rather, I would interpret the question as follows.

Another, perhaps friendlier, way to find the same answer is to note that we are looking for the probability $P( X + Y = 1100 )$, where $X$ is a normal random variable with mean $\mu_1=1000$ and variance $\sigma_1^2=900$ and $Y$ is a normal random variable with mean $\mu_2 = 0$ and variance $\sigma_2^2=100$. For any two independent normal random variables, their sum is another normal random variable with mean $\mu = \mu_1 + \mu_2$ and variance $\sigma^2 = \sigma_1^2 + \sigma_2^2$.

The next step I would do is to check if the value z=1100 is among the credible interval for your posterior distribution. For this you can check if it is within the 95% HDI (highest density interval) of your distribution. If it's not, than you can say that z=1110 is not a credible value for your posterior (analogous to frequentist reject hypothesis).

Doing pnorm(q=1100,mean=1090,sd=sqrt(90),lower.tail=FALSE) in R yields 0.1459203 which is bigger than (1-0.95)/2=0.025, so we can say that value z=1100 is within the 95% HDI and therefore it is a credible value. (The accumulated distribution can be used this way to get the HDI because of the concavity and symmetry of the normal distribution).

After doing that, if it does make sense to your problem, you might also try to establish a ROPE (region of practical equivalence) and check if your the posterior 95% HDI is in entirely inside it (analogous to frequentist accept hypothesis, if such thing exist).