I have some data that I believe come from a binomially distributed population. A beta prior seems like an appropriate choice, but I don't have any very strong prior beliefs. I could use a less informative or Jeffrey's prior, but for the sake of what I'm working on I'd like to try the beta prior. Is there any justification for setting the prior mean to the sample mean of the data, and the prior variance to the sample variance? If there is no justification, is there anything similar to this I could do?

  • $\begingroup$ Do you mean that you want to set priors based on the observations themselves? That would not make any Bayesian sense... If you really don't have any idea at all, you could always use a Beta(1,1), which is just a uniform distribution. $\endgroup$ Dec 16, 2023 at 18:27
  • $\begingroup$ @StephanKolassa Apologies if what I am saying doesn't sound correct, it's been a while since uni. I'm doing Bayesian analysis on some hypothetical data to try and refresh myself. Would it be more correct to 'run this experiment multiple times', i.e. generate a few different datasets and analyse them, then return to this with information I have gained? I.e. I observe the sample mean for 10 samples to be about $\mu$ so I set the prior mean to be about $\mu$? $\endgroup$
    – TerryStone
    Dec 16, 2023 at 18:29
  • 1
    $\begingroup$ The idea in Bayesian analysis is that the priors should be prior to the observed data, so it does not make sense to observe data, derive "priors" from this, and then update the priors using the exact same data, which is what you sounded like wanting to do. It does make sense to run an experiment once, derive parameters and use those as priors in a second experiment. This is actually done in the beta-binomial example that is typically one of the first Bayesian analyses you might see, where the beta parameters correspond to numbers of successes and failures. $\endgroup$ Dec 16, 2023 at 19:20
  • $\begingroup$ I see, thank you for explaining. Bits and pieces are coming back to me. I really wish Bayesian analysis was more embedded into undergraduate maths like frequentist analysis is. So, I would be justified to run a bunch of experiments, collect data and use this to form my beliefs, and then bring these beliefs into my new experiment as a prior? $\endgroup$
    – TerryStone
    Dec 16, 2023 at 22:55
  • $\begingroup$ Yes, absolutely. That is exactly the way priors should be formed by the textbook: based on what is known at the time of the (new) experiment. And that absolutely does include previous experiments. Good luck! $\endgroup$ Dec 17, 2023 at 6:13

1 Answer 1


This is a good question.

If you take the principles of Bayesian inference literally, then the prior should indeed be specified before you've looked at the data. In practice, we often don't do this.

Using the data to inform our choice of prior has a long history (for example, look up empirical Bayes).

In modern Bayesian inference, it is common to treat the prior as another part of our model. For example, a reference prior (such as a Unif(0,1) for a Binomial probability) can give sensible results in some cases but very poor results in others. We can only find out by performing the analysis and carefully exploring the output.

I highly recommend this paper by Gelman, Simpson & Betancourt: https://www.mdpi.com/1099-4300/19/10/555


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.