# Creating half normal probability distribution

I have come across a problem where a half normal distribution is based on a single number, namely the sum of all costs. The exact definition of the number is not important. The important think is that it is a single number. I also know how many individual costs have been used to get to the total. Ex. there were 200 observations and the grand total is 25000.

This problem is in Bayesian context. A half normal distribution is used as weakly informative prior and the only input for the half normal distribution is the grand total. I cannot understand how this half-normal distribution is created solely with the grand total and the number of observations? Am I missing something?

Here the distribution is called. And here is explained that the grand total is to be used as input for the half normal distribution. I cannot recall the exact location, but somewhere in the docu I have read that the scale parameter is 2.

I feel like I am missing something with respect to the creation of the weakly informative prior. Is some sampling used or something? Here is the source code that is used for the half normal distribution.

• You should ask the authors of this suggestion what they mean. There is no single way of coming up with such prior. You cannot directly come up with the prior from the single number for the total.
– Tim
Commented Jan 3, 2023 at 10:58
• Could you please erase the earlier and similar question you posted a week ago, in order to avoid duplicates? Commented Jan 3, 2023 at 13:32
• @Tim so basically the total is then not used at all i assume Commented Jan 4, 2023 at 10:51

Normal distribution is parametrized by two parameters - location $$\mu$$ and scale $$\sigma$$. Half-normal is parametrized by only one parameter - its scale $$\sigma$$, since the location is fixed to $$\mu=0$$ by the very definition of this distribution.
The half-Normal distribution has density $$f_\sigma(x)=\sqrt{{2}/{\pi\sigma}}\,\exp\{-x^2/2\sigma\}\mathbb I_{x>0}\qquad\sigma>0$$ It is a possible prior for a standard deviation parameter, see e.g. Gelman et al. (2013). It thus requires one single input, $$\sigma$$, to be completely defined. However, Jeffreys' (1939) half-Cauchy $$g_\sigma(x)=\frac{2}{\pi\sigma}\,\frac{1}{x^2+\sigma^2}\mathbb I_{x>0}\qquad\sigma>0$$ is also a potential prior distribution.