Is there any difference in applying a uniform prior or a Beta(1,1) prior for your Bayesian analysis ?In which conditions is one preferred over the other ?
-
12$\begingroup$ No, there isn't, because the Beta(1,1) is the uniform distribution. $\endgroup$– jbowmanDec 13, 2017 at 2:00
-
1$\begingroup$ If your parameter is constrained to lie in the interval $[0,1]$ then these two are equivalent. If your parameter can take on other values, then the Beta(1,1) prior is not a reasonable prior in the first place. $\endgroup$– Maurits MDec 13, 2017 at 12:16
2 Answers
They both are equivalent.
$P(\theta) = { \Gamma(\alpha + \beta) \over \Gamma(\alpha)\Gamma(\beta)} \theta^{\alpha-1}(1-\theta)^{\beta-1}$
if $\alpha = \beta = 1$
$P(\theta) = { \Gamma(\alpha + \beta) \over \Gamma(\alpha)\Gamma(\beta)} \theta^{0}(1-\theta)^{0} = {\Gamma(2) \over \Gamma(1)\Gamma(1) } = {1 \over 1} = 1$
As you can see $\theta| \beta=1, \alpha = 1 \sim U(0,1)$
Because a density function identifies uniquely a distribution, and the density of a uniform in the interval $(c=0, \ d=1)$ is:
$f(x) = {1\over c -d} = {1 \over 1} = 1 \quad x \in (0,1) $
-
2$\begingroup$ The proof is pretty brief. It is worth mentioning that $\Gamma(1) = 1$ and $\Gamma(z + 1) = z\Gamma(z)$ for completeness, since for those not familiar with gamma functions the ratio of gammas may not look like anything similar to uniform distribution... $\endgroup$– Tim ♦Dec 13, 2017 at 7:26
-
1$\begingroup$ @Tim Knowledge of Gamma functions is unnecessary. It suffices to point out (1) the two distributions have the same support (a crucial point that is not in evidence in this answer) and (2) when $\alpha=\beta=1,$ the Beta density is proportional to a constant on its support. That makes the two distributions identical, because both must have the same normalization constant. $\endgroup$– whuber ♦Oct 23, 2018 at 14:13
-
$\begingroup$ @whuber I meant more details, rather then insisting on Gamma function. $\endgroup$– Tim ♦Oct 23, 2018 at 14:20
-
-
1$\begingroup$ @singularli shouldn't you rather ask someone who posted this answer? $\endgroup$– Tim ♦Nov 4, 2019 at 14:12
There is a difference in that the Beta is the conjugate prior of the Bernoulli... So you have nice analytical formulas to help you update the Beta when new data comes is. In my limited experience, if you are modelling a probability, it's much better to use a Beta(1,1) prior rather than a Uniform(0,1), even for complicated models in pymc3 (where the update won't be analytical).
-
3$\begingroup$ Thanks, but as already mentioned, both priors are mathematically equivalent, so could you please somehow back up the statement that Beta(1, 1) is better? (It's not my -1.) $\endgroup$– Tim ♦Oct 23, 2018 at 8:13
-
4$\begingroup$ In an A/B testing scenario, how would you easily update a uniform prior if not written as Beta(1,1)? I am answering the original question about "any difference" and "which conditions". $\endgroup$ Oct 24, 2018 at 9:15
-
1$\begingroup$ This is useful advice despite the downvote $\endgroup$ Jun 17, 2020 at 23:29