The exponential distribution prior has rate and support , so its prior density is . By Bayes' theorem,
where is a normalizing constant independent of .
Completing the square gives a useful exact reference for the numerical sampling. Put
Then this normal mean posterior with an exponential prior is a normal distribution with location and variance , truncated below at zero. With the standard normal distribution density and its cumulative distribution function,
The exponential rate is , not three; the prior mean is three. The support restriction must be retained in both the formula and the sampler.