Bayesian model

Intermediate

What you need first. Nothing else on this path comes first. This page is part of Bayesian statistics.

In Bayesian statistics, a Bayesian model is a joint probability specification for the observations and the unknowns. A Bayesian model is a joint probability specification for the observations and the unknowns. It states what the data would do if the unknowns were fixed, and it states a distribution for the unknowns before those data are used. Anything called a posterior is computed from that joint distribution. It is a result, not a third ingredient that has to be written down separately.[1]

Bayesian model

Bayesian model
Fact Value
Topic Bayesian statistics
Listed on Bayesian statistics
Worked example 1

Motivating example

A coin lands heads or tails once. Two explanations are on the table: the heads probability is 0.20.2, or it is 0.80.8, and before the toss those two explanations are equally serious. The model is the pair of explanations together with the chance of heads under each of them. The single toss has not yet been seen, so the model is a distribution over explanations and outcomes together, not yet a statement about which explanation the toss will favour. The sampling piece is a Bernoulli trial. The prior piece is the weight 1/21/2 on each explanation. Dodge describes those two choices, a parametric family for the data and an initial distribution for the parameter, as the modelling steps a Bayesian procedure takes as given.[1][2]

Definition

Let yy be the observations and θ\theta the unknowns. The model is a joint distribution that factors as

p(θ,y)=p(θ) p(y∣θ).p(\theta,y)=p(\theta)\,p(y\mid\theta).

Here p(θ)p(\theta) is the prior and p(y∣θ)p(y\mid\theta) is the sampling distribution, also called the data distribution. When yy is held at the observed value and the product is read as a function of θ\theta, the sampling factor is the likelihood. A model for several exchangeable observations often takes those observations as independent given θ\theta, with a common distribution p(yi∣θ)p(y_i\mid\theta). Explanatory variables that are conditioned on, and not modelled as random, may sit inside that sampling distribution.[1]

Writing the model is the first of the three parts of a Bayesian analysis. The joint distribution has to be consistent with what is known about the scientific problem and about the way the data were collected. Specifying a parametric family f(x∣θ)f(x\mid\theta) for the observations, and specifying a distribution f(θ)f(\theta) for its parameter, are the two modelling choices Dodge lists before Bayes’ theorem is applied.[2][1]

Properties

The joint distribution determines the marginal distribution of the data,

p(y)=∫p(θ) p(y∣θ) dθ,p(y)=\int p(\theta)\,p(y\mid\theta)\,d\theta,

and the posterior p(θ∣y)=p(θ) p(y∣θ)/p(y)p(\theta\mid y)=p(\theta)\,p(y\mid\theta)/p(y) wherever that marginal is positive and finite. Changing the prior changes the joint distribution even when the sampling distribution is held fixed, and so it changes the posterior. A prior that integrates to one, and does not depend on yy, is a probability distribution for the unknown. A function of θ\theta with an infinite integral does not complete a joint probability model.[1]

If the same experimental conditions are judged exchangeable, the joint distribution of the observations is invariant to permuting their labels. The independent-and-identical sampling model given θ\theta is the usual way of writing that judgement. A hierarchical model adds a further distribution for the parameters of the prior, so that several related groups share a model while keeping their own parameters. The posterior and the posterior predictive distribution are functionals of the joint model. They are not extra pieces supplied from outside it.[1]

For the two-point coin, the joint probabilities of a success are

P(θ=0.2, y=1)=12⋅0.2=0.1,P(θ=0.8, y=1)=12⋅0.8=0.4.\mathbb{P}(\theta=0.2,\, y=1)=\tfrac12\cdot 0.2=0.1, \qquad \mathbb{P}(\theta=0.8,\, y=1)=\tfrac12\cdot 0.8=0.4.

They sum to P(y=1)=0.5\mathbb{P}(y=1)=0.5. The posterior probabilities are 0.1/0.5=1/50.1/0.5=1/5 and 0.4/0.5=4/50.4/0.5=4/5. The division uses the marginal probability of the data. It is not part of writing the joint distribution down.[1]

Worked example

Take θ∈{0.2,0.8}\theta\in\{0.2,0.8\} with prior probability 1/21/2 each, and let yy be a single Bernoulli trial with success probability θ\theta. The model assigns the joint probabilities 0.10.1 and 0.40.4 to a success under the two explanations, as above. Those two numbers are the model at the observed success.

Your turn. Under the same model, the trial is a failure, y=0y=0. Find the joint probability of {θ=0.2, y=0}\{\theta=0.2,\, y=0\} and the posterior probability of θ=0.2\theta=0.2.

The joint probability is (1/2)⋅0.8=0.4(1/2)\cdot 0.8=0.4. The marginal probability of failure is 0.4+0.1=0.50.4+0.1=0.5, so the posterior probability of θ=0.2\theta=0.2 is 0.4/0.5=0.80.4/0.5=0.8.

Assumptions and limits

The factorisation treats the prior as chosen without using the data that later appear in the likelihood. A prior fitted to the same yy that enters p(y∣θ)p(y\mid\theta) is a different analysis from the one the factorisation describes. Independence of the observations is conditional on θ\theta. Unconditionally, observations that share an unknown parameter are dependent, because they inform the same θ\theta.[1]

An improper prior function, one whose integral diverges, leaves the joint distribution undefined as a probability distribution. The formal product with the likelihood can still be studied, and it yields a posterior only when that product has a finite integral in θ\theta. Dodge’s account of the initial distribution assumes a distribution function f(θ)f(\theta), which is a probability distribution, before the posterior is calculated. A likelihood, by itself, is not this model: it lacks a distribution for the unknown. A prior, by itself, is not this model: it lacks a distribution for the data.[1][2]

Check yourself

Try these questions before opening an answer.

The two factors

Name the two factors in the joint distribution of a Bayesian model.

The prior distribution of the unknowns and the sampling distribution of the data given the unknowns.

An improper function

Why does a function of the unknown whose integral diverges fail to complete a joint probability model?

It is not a probability distribution for the unknown, so the joint distribution is not defined as a probability.

History

Bayes’s 1763 analysis of an unknown binomial probability used a uniform distribution on that probability as the first piece and the binomial sampling probabilities as the second. Laplace used a distribution for an unknown proportion together with a sampling model for the observed count. Dodge places that pair, an initial distribution and a parametric family, at the start of the procedure, and dates the wider inferential tradition to,[3] de Moivre (1718),,[4] and.[5] The two-piece description, a distribution for the parameter and a parametric family for the data, is the form in which the model is stated now.[1][2]

See also

Line chart · Apriori algorithm · Asymptotic analysis · Average treatment effect · Base rate · Bayesian inference · Bayesian probability · Bayesian statistics

Glossary and index

References

  1. ^ a b c d e f g h i j a. (pp. 6–7) b. (pp. 6–7) c. (pp. 5–7) d. (p. 3, §1.1) e. (p. 7) f. (pp. 5–7) g. (pp. 6–7) h. (pp. 5–7) i. (p. 7) j. (p. 3, §1.1) Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A. & Rubin, D. B. (2013). Bayesian Data Analysis. Chapman and Hall/CRC. https://doi.org/10.1201/b16018
  2. ^ a b c d a. (p. 33) b. (p. 33) c. (p. 33) d. (pp. 32–33, 263) Dodge, Yadolah (2008). The Concise Encyclopedia of Statistics. Springer. https://doi.org/10.1007/978-0-387-32833-1
  3. ^ Bayes, T. (1763). An essay towards solving a problem in the doctrine of chances. By the late Rev. Mr. Bayes, F. R. S. communicated by Mr. Price, in a letter to John Canton, A. M. F. R. S. Philosophical Transactions of the Royal Society of London, 370–418. https://doi.org/10.1098/rstl.1763.0053
  4. ^ Gauss, C. F. (1809). Theoria motus corporum coelestium in sectionibus conicis solem ambientium. Perthes und Besser, Hamburg. https://archive.org/details/bub_gb_ORUOAAAAQAAJ
  5. ^ Laplace, P.-S. (1812). Théorie analytique des probabilités. Courcier, Paris. https://openlibrary.org/works/OL2395821W
Cite this page
Plain text
StatWiki (2026). "Bayesian model." StatWiki. Last updated 2 December 2026. https://www.statwiki.io/articles/bayesian-model.html
BibTeX
@misc{statwiki_bayesian_model,
  author = {{StatWiki}},
  title = {{Bayesian model}},
  year = {2026},
  url = {https://www.statwiki.io/articles/bayesian-model.html},
  urldate = {2026-12-02},
  note = {StatWiki, last updated 2 December 2026}
}