ArticleslgStudy

mathematics

Conjugate prior

Conjugate prior is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Conjugate prior rather than just read about it. In short: In Bayesian probability theory, if, given a likelihood function p(x∣θ), the posterior distribution p(θ∣x) is in the same probability distribution family as the prior probability distribution p(θ), the prior and posterior are then called conjugate distributions with respect to that likelihood function and the prior is called a conjugate prior for the likelihood function p(x∣θ). A conjugate prior is an algebraic conve…

Conjugate prior — main illustration
Conjugate prior — illustration

Key takeaways

  • Conjugate prior belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Conjugate prior to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Conjugate prior from memory before moving on to harder problems.

Reference excerpt

In Bayesian probability theory, if, given a likelihood function p(x∣θ), the posterior distribution p(θ∣x) is in the same probability distribution family as the prior probability distribution p(θ), the prior and posterior are then called conjugate distributions with respect to that likelihood function and the prior is called a conjugate prior for the likelihood function p(x∣θ). A conjugate prior is an algebraic convenience, giving a closed-form expression for the posterior; otherwise, numerical integration may be necessary. Further, conjugate priors may clarify how a likelihood function updates a prior distribution. The concept, as well as the term "conjugate prior", were introduced by Howard Raiffa and Robert Schlaifer in their work on Bayesian decision theory. A similar concept had been discovered independently by George Alfred Barnard.

Example The form of the conjugate prior can generally be determined by inspection of the probability density or probability mass function of a distribution. For example, consider a random variable which consists of the number of successes s in n Bernoulli trials with unknown probability of success q in [0,1]. This random variable will follow the binomial distribution, with a probability mass function of the form

p(s)=(ns)qs(1−q)n−s The usual conjugate prior is the beta distribution with parameters (α, β):

p(q)=qα−1(1−q)β−1B(α,β) where α and β are chosen to reflect any existing belief or information (α=1 and β=1 would give a uniform distribution) and B(α,β) is the Beta function acting as a normalising constant. In this context, α and β are called hyperparameters (parameters of the prior), to distinguish them from parameters of the underlying model (here q). A typical characteristic of conjugate priors is that the dimensionality of the hyperparameters is one greater than that of the parameters of the original distribution. If all parameters are scalar values, then there will be one more hyperparameter than parameter; but this also applies to vector-valued and matrix-valued parameters. (See the general article on the exponential family, and also consider the Wishart distribution, conjugate prior of the covariance matrix of a multivariate normal distribution, for an example where a large dimensionality is involved.) If we sample this random variable and get s successes and f=n−s failures, then we have

P(s,f∣q=x)=(s+fs)xs(1−x)f,P(q=x)=xα−1(1−x)β−1B(α,β),P(q=x∣s,f)=P(s,f∣x)P(x)∫P(s,f∣y)P(y)dy=(s+fs)xs+α−1(1−x)f+β−1/B(α,β)∫y=01((s+fs)ys+α−1(1−y)f+β−1/B(α,β))dy=xs+α−1(1−x)f+β−1B(s+α,f+β), which is another Beta distribution with parameters (α+s,β+f). This posterior distribution could then be used as the prior for more samples, with the hyperparameters simply adding each extra piece of information as it comes.

Interpretations

Pseudo-observations It is often useful to think of the hyperparameters of a conjugate prior distribution corresponding to having observed a certain number of pseudo-observations with properties specified by the parameters. For example, the values α and β of a beta distribution can be thought of as corresponding to α−1 successes and β−1 failures if the posterior mode is used to choose an optimal parameter setting, or α successes and β failures if the posterior mean is used to choose an optimal parameter setting. In general, for nearly all conjugate prior distributions, the hyperparameters can be interpreted in terms of pseudo-observations. This can help provide intuition behind the often messy update equations and help choose reasonable hyperparameters for a prior.

Dynamical system One can think of conditioning on conjugate priors as defining a kind of (discrete time) dynamical system: from a given set of hyperparameters, incoming data updates these hyperparameters, so one can see the change in hyperparameters as a kind of "time evolution" of the system, corresponding to "learning". Starting at different points yields different flows over time. This is again analogous with the dynamical system defined by a linear operator, but note that since different samples lead to different inferences, this is not simply dependent on time but rather on data over time. For related approaches, see Recursive Bayesian estimation and Data assimilation.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Conjugate prior

Start with the simplest possible case. Write down what Conjugate prior claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Conjugate prior before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Conjugate prior ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Conjugate prior

In research
Conjugate prior appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Conjugate prior in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Conjugate prior is common in secondary-school and first-year university syllabi. It links to neighbouring topics Bayesian statistics, Conjugate prior distributions, so understanding it makes those chapters shorter.
In everyday life
Look for Conjugate prior outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Conjugate prior” →

How to study Conjugate prior in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Conjugate prior means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Conjugate prior out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Conjugate prior in simple terms?

In Bayesian probability theory, if, given a likelihood function p(x∣θ), the posterior distribution p(θ∣x) is in the same probability distribution family as the prior probability distribution p(θ), the prior and posterior are then called conjugate distributions with respect to that likelihood functi…

Why does Conjugate prior matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Conjugate prior?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Conjugate prior.

Tags

  • Bayesian statistics
  • Conjugate prior distributions

Keep exploring