Written and maintained by CASRAI Editorial Board
Published · Last updated
On this page
Prior distributions belong to Bayesian statistics, not to the “distribution” of a dividend, a tax payout or a Drupal module. A prior distribution is the probability distribution that represents your uncertainty about a parameter before the current data are examined (SAS/STAT, Introduction to Bayesian Analysis). After reading this page you should be able to pick a prior, update it with data, and report it in a methods section.
Ask CASRAI · free to tryQuestion about this guide? Ask CASRAI answers with linked sources. 2 free questions a day, no account.
What does prior distribution mean?
A prior distribution (often just “the prior”) states, as a probability distribution, what is believed about an unknown quantity such as a proportion, a mean difference or a regression coefficient, before the study data are seen. Bayes’ theorem then combines the prior with the likelihood of the observed data to give the posterior distribution. For the theorem itself, see conditional probability and Bayes’ theorem.
Formula and symbols
For a parameter θ and data y:
p(θ | y) ∝ p(y | θ) × p(θ)
- p(θ): the prior distribution of θ.
- p(y | θ): the likelihood, the probability of the observed data for each value of θ.
- p(θ | y): the posterior distribution.
- ∝: “proportional to”; the posterior is rescaled so that it integrates to 1.
For a binomial proportion θ with a Beta(a, b) prior and k successes in n trials, the posterior is Beta(a + k, b + n − k). Because the prior and posterior belong to the same family, the Beta prior is called conjugate to the binomial likelihood. The same conjugacy idea underlies the beta-binomial distribution and, for more than two categories, the Dirichlet distribution.
Types of priors: what are the three types of distributions?
There is no single fixed set of “three types of distributions” for priors; the usual answer is a three-way split by how much information the prior carries. The Stan project’s prior choice recommendations extend this to a ladder (Stan Development Team, wiki “Prior Choice Recommendations”).
| Prior type | Meaning | Example (Stan wiki) |
|---|---|---|
| Noninformative (flat, vague, diffuse) | Has minimal impact on the posterior (SAS/STAT) | Flat prior; super-vague but proper such as normal(0, 1e6). Stan does not usually recommend either. |
| Weakly informative | Rules out implausible values without excluding realistic ones | normal(0, 1) generic; normal(0, 10) very weak |
| Informative | Not dominated by the likelihood; it has an impact on the posterior (SAS/STAT) | normal(0.4, 0.2) for a specific, justified belief |
Two further terms cut across this split. A conjugate prior gives a posterior in the same family (Beta-binomial, Normal-normal, Gamma-Poisson). An improper prior does not integrate to 1 but is often used because it usually yields a noninformative prior (SAS/STAT). Jeffreys’ prior, Beta(1/2, 1/2) for a binomial proportion, is a standard reference choice.
Worked example: updating a Beta prior
Suppose 7 of 10 participants respond to an intervention (k = 7, n = 10), and you want the response rate θ. Using Beta(a, b) priors, the posterior is Beta(a + 7, b + 3), and its mean is (a + 7) / (a + b + 10).
| Prior | Arithmetic | Posterior | Posterior mean | 95% credible interval |
|---|---|---|---|---|
| Beta(1, 1) (uniform) | 1 + 7, 1 + 3 | Beta(8, 4) | 8 / 12 = 0.667 | 0.39 to 0.89 |
| Beta(1/2, 1/2) (Jeffreys) | 0.5 + 7, 0.5 + 3 | Beta(7.5, 3.5) | 7.5 / 11 = 0.682 | 0.39 to 0.91 |
| Beta(20, 20) (informative, centred on 0.5) | 20 + 7, 20 + 3 | Beta(27, 23) | 27 / 50 = 0.540 | 0.40 to 0.67 |
The observed proportion is 0.70. The two weak priors barely move the estimate; Beta(20, 20) acts like 40 prior observations and pulls the mean to 0.54. This is the prior-sensitivity pattern the Stan wiki describes: with plentiful data the likelihood dominates, with weak data the prior can strongly influence the result. Intervals are equal-tailed, computed from the Beta quantile functions.
Interpretation: prior versus posterior
What is the difference between the posterior and prior distributions? The prior describes belief before the data; the posterior describes belief after combining the prior with the data. The short answer to “prior vs posterior” is therefore before versus after. A fuller comparison is on the prior vs posterior page.
| What you see | Reading |
|---|---|
| Posterior close to the likelihood and similar under different priors | Data dominate; the conclusion is not sensitive to the prior |
| Posterior shifts noticeably between priors | Weak data; the prior matters and should be reported with a sensitivity analysis |
| Posterior nearly identical to the prior | The data added little information about this parameter |
Assumptions and common mistakes
- Treating “flat” as automatically neutral. A super-vague prior such as normal(0, 1e6) is not recommended by the Stan project.
- Ignoring scale. Priors should be scaled to the problem; for standardized effects of around 0.1, N(0, 1) may be too strong.
- Unjustified informative priors. Stan’s guidance is to state the reasoning behind an informative prior.
- Skipping sensitivity checks when the data are small.
- Treating the prior as irrelevant to model comparison. See Bayes factor.
How to report a prior (APA-style example)
State the prior family and parameters, its justification, and a sensitivity analysis. Illustrative wording for the example above:
We specified a Beta(1/2, 1/2) prior for the response rate θ. With 7 responders among 10 participants, the posterior was Beta(7.5, 3.5) (M = 0.68, 95% credible interval [0.39, 0.91]). Results were similar under a uniform Beta(1, 1) prior; an informative Beta(20, 20) prior centred on 0.5 shifted the posterior mean to 0.54.
For the wider contrast with frequentist reporting, see Bayesian vs frequentist statistics.
How to calculate it in Excel, R or Python
Excel
=BETA.INV(0.025, 8, 4)
=BETA.INV(0.975, 8, 4)
=8/(8+4)
The three cells give the lower 95% bound of Beta(8,4), the upper 95% bound, and the posterior mean, in that order.
R
a <- 1; b <- 1; k <- 7; n <- 10
post_a <- a + k; post_b <- b + n - k
post_a / (post_a + post_b) # 0.667
qbeta(c(0.025, 0.975), post_a, post_b) # 0.39 0.89
Python
from scipy.stats import beta
a, b, k, n = 1, 1, 7, 10
post = beta(a + k, b + n - k)
print(post.mean(), post.interval(0.95)) # 0.667, (0.39, 0.89)
FAQ
What is a prior distribution in plain terms?
It is the probability distribution that expresses uncertainty about a parameter before the current data are analysed.
What is the difference between prior and posterior?
The prior is the belief before seeing the data; the posterior is the updated belief after combining the prior with the likelihood of the data.
Which prior should I use?
Stan’s recommendation is generally a weakly informative prior scaled to the problem, with a stated justification; flat and super-vague priors are not usually recommended.
Sources
- SAS Institute. SAS/STAT User’s Guide, “Introduction to Bayesian Analysis: Prior Distributions” (support.sas.com/documentation/cdl/en/statug/65328/HTML/default/statug_introbayes_sect004.htm), read 2026-11-08.
- Stan Development Team. “Prior Choice Recommendations” (github.com/stan-dev/stan/wiki/Prior-Choice-Recommendations), read 2026-11-08.
- Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian Data Analysis (3rd ed.). CRC Press.
- Box, G. E. P., & Tiao, G. C. (1973). Bayesian Inference in Statistical Analysis. Addison-Wesley.







