# Explanation of an example of the Bayes Estimator

In section 4.4 of 'Introduction for Machine Learning' by Ethem Alpaydin the following example of estimating a prior density us given:

For example let us say that we are told that [the random variable] $\theta$ is approximately normal and with 90 percent confidence, $\theta$ lies between 5 and 9, symmetrically around 7. Then we can write $p(\theta)$ [(the prior density)] to be normal with mean 7 and because: \begin{align} P\{-1.64 < \frac{\theta - \mu}{\sigma} < 1.64\} &= 0.9\\ P\{\mu -1.64\sigma < \theta < \mu + 1.64\sigma\} &= 0.9 \end{align} we take $1.64\sigma = 2$ and use $\sigma = 2/1.64$. We can thus assume $p(\theta) = \mathcal{N}(7, (\frac{2}{1.64})^2)$.

Based on the information given I think that $p(\theta)$ looks like this:

However I do not fully understand the equalities form the example. Since the confidence interval is 90% the standard error of the mean is 1.64. But how do you go from that knowledge to the equalities in the example. Why is the z-score used in the first equality? And why do they take 1.64$\sigma = 2$, I assume that that has something to do with the fact that $9 - 7 = 7 -5 = 2$.

Please note that I know that I can find the standard deviation by solving the following equation:

$$\int_5^9 \frac{1}{\sqrt{2\pi}\sigma} \exp{\left(\frac{-x-7}{2x\sigma^2}\right)}dx = 0.9$$

But the method used in the example seems a lot simpler than solving the equation ($\sigma = 1.21951 \approx \frac{2}{1.64}$) above.

$z=\frac{x-\mu}{\sigma}$