Part II Bayesian Statistics

Total Page:16

File Type:pdf, Size:1020Kb

Part II Bayesian Statistics Part II Bayesian Statistics 1 Chapter 6 Bayesian Statistics: Background In the frequency interpretation of probability, the probability of an event is limiting proportion of times the event occurs in an infinite sequence of independent repetitions of the experiment. This interpretation assumes that an experiment can be repeated! Problems with this interpretation: • Independence is defined in terms of probabilities; if probabilities are defined in terms of independent events, this leads to a circular defini- tion. • How can we check whether experiments were independent, without doing more experiments? • In practice we have only ever a finite number of experiments. 6.1 Subjective probability Let P (A) denote your personal probability of an event A; this is a numerical measure of the strength of your degree of belief that A will occur, in the light of available information. 2 Your personal probabilities may be associated with a much wider class of events than those to which the frequency interpretation pertains. For example: - non-repeatable experiments (e.g. that England will win the World Cup next time); - propositions about nature (e.g. that this surgical procedure results in increased life expectancy). All subjective probabilities are conditional, and may be revised in the light of additional information. Subjective probabilities are assessments in the light of incomplete information; they may even refer to events in the past. 6.2 Axiomatic development Coherence states that a system of beliefs should avoid internal inconsisten- cies. Basically, a quantitative, coherent belief system must behave as if it was governed by a subjective probability distribution. In particular this assumes that all events of interest can be compared. Note: different individuals may assign different probabilities to the same event, even if they have identical background information. See Chapters 2 and 3 in Bernardo and Smith for fuller treatment of foun- dational issues. 6.3 Bayes Theorem and terminology Bayes Theorem: Let B1,B2,...,Bk be a set of mutually exclusive and exhaustive events. For any event A with P (A) > 0, P (B ∩ A) P (A|B )P (B ) P (B |A) = i = i i . i P (A) Pk j=1 P (A|Bj)P (Bj) Equivalently we write P (Bi|A) ∝ P (A|Bi)P (Bi). 3 Terminology: P (Bi) is the called prior probability of Bi; P (A|Bi) is called the likelihood of A given Bi; P (Bi|A) is called the posterior probability of Bi; P (A) is called the predictive probability of A implied by the likelihoods and the prior probabilities. Example: Two events. Assume we have two events B1,B2, then P (B |A) P (B ) P (A|B ) 1 = 1 × 1 . P (B2|A) P (B2) P (A|B2) If the data is relatively more probable under B1 than under B2, our belief in B1 compared to B2 is increased, and conversely. c If in addition B2 = B1, then P (B1|A) P (B1) P (A|B1) c = c × c . P (B1|A) P (B1) P (A|B1) It follows that: posterior odds = prior odds × likelihood ratio. 6.4 Parametric models A Bayesian statistical model consists of 1. A parametric statistical model f(x|θ) for the data x, where θ ∈ Θ a parameter; x may be multidimensional. 2. A prior distribution π(θ) on the parameter. Note: The parameter θ is now treated as random! The posterior distribution of θ given x is f(x|θ)π(θ) π(θ|x) = R f(x|θ)π(θ)dθ Shorter, we write: π(θ|x) ∝ f(x|θ)π(θ), or posterior ∝ prior × likelihood . 4 Example: normal distribution. Suppose that θ has the normal N (µ, σ2)- distribution. Then, just focussing on what depends on θ, 1 1 π(θ) = √ exp − (θ − µ)2 2πσ2 2σ2 1 ∝ exp − (θ − µ)2 2σ2 1 = exp − (θ2 − 2θµ + µ2) 2σ2 1 µ ∝ exp − θ2 + θ . 2σ2 σ2 Conversely, if there are constants a > 0 and b such that π(θ) ∝ exp −aθ2 + bθ b 1 then it follows that θ has the normal N 2a , 2a -distribution. 6.4.1 Nuisance parameters Let θ = (ψ, λ), where λ is a nuisance parameter. Then π(θ|x) = π((ψ, λ)|x). We calculate the marginal posterior of ψ: Z π(ψ|x) = π(ψ, λ|x)dλ and continue inference with this marginal posterior. Thus we just integrate out the nuisance parameter. 6.4.2 Prediction The (prior) predictive distribution of x on the basis π is Z p(x) = f(x|θ)π(θ)dθ. 5 Suppose that data x1 is available, and we want to predict additional data: p(x2, x1) p(x2|x1) = p(x1) R f(x2, x1|θ)π(θ)dθ = R f(x1|θ)π(θ)dθ Z f(x1|θ)π(θ) = f(x2|θ, x1)R dθ f(x1|θ)π(θ)dθ Z f(x1|θ)π(θ) = f(x2|θ)R dθ f(x1|θ)π(θ)dθ Z = f(x2|θ)π(θ|x1)dθ. Note that x2 and x1 are assumed conditionally independent given θ. They are not, in general, unconditionally independent. Example: Billard ball. A billard ball W is rolled from left to right on a line of length 1 with a uniform probability of stopping anywhere on the line. It stops at p. A second ball O is then rolled n times under the same assumptions, and X denotes the number of times that the ball O stopped on the left of W . Given X, what can be said about p? Our prior is π(p) = 1 for 0 ≤ p ≤ 1; our model is n P (X = x|p) = px(1 − p)n−x for x = 0, . , n. x We calculate the predictive distribution, for x = 0, . , n Z 1 n P (X = x) = px(1 − p)n−xdp 0 x n = B(x + 1, n − x + 1) x nx!(n − x)! 1 = = , x (n + 1)! n + 1 where B is the beta function, Z 1 Γ(α)Γ(β) B(α, β) = pα−1(1 − p)β−1dp = . 0 Γ(α + β) 6 We calculate the posterior distribution: n π(p|x) ∝ 1 × px(1 − p)n−x ∝ px(1 − p)n−x, x so px(1 − p)n−x π(p|x) = ; B(x + 1, n − x + 1) this is the Beta(x + 1, n − x + 1)-distribution. In particular the posterior mean is Z 1 px(1 − p)n−x E(p|x) = p dp 0 B(x + 1, n − x + 1) B(x + 2, n − x + 1) x + 1 = = . B(x + 1, n − x + 1) n + 2 x (For comparison: the mle is n .) Further, P (O stops to the left of W on the x+1 next roll |x) is Bernoulli-distributed with probability of success E(p|x) = n+2 . Example: exponential model, exponential prior. Let X1,...,Xn be a random sample with density f(x|θ) = θe−θx for x ≥ 0, and assume π(θ) = µe−µθ for θ ≥ 0; and some known µ. Then Pn n −θ xi f(x1, . , xn|θ) = θ e i=1 and hence the posterior distribution is n −θ Pn x −µθ n −θ(Pn x +µ) π(θ|x) ∝ θ e i=1 i µe ∝ θ e i=1 i , Pn which we recognize as Gamma(n + 1, µ + i=1 xi). Example: normal model, normal prior. Let X1,...,Xn be a random sample from N (θ, σ2), where σ2 is known, and assume that the prior is normal, π(θ) ∼ N (µ, τ 2), where µ, τ 2 is known. Then ( n 2 ) 2 − n 1 X (xi − θ) f(x , . , x |θ) = (2πσ ) 2 exp − , 1 n 2 σ2 i=1 7 so we calculate for the posterior that ( n 2 2 !) 1 X (xi − θ) (θ − µ) π(θ|x) ∝ exp − + 2 σ2 τ 2 i=1 − 1 M =: e 2 . We can calculate (Exercise) b 2 b2 M = a θ − − + c, a a n 1 a = + , σ2 τ 2 1 X µ b = x + , σ2 i τ 2 1 X µ2 c = x2 + . σ2 i τ 2 So it follows that the posterior is normal, b 1 π(θ|x) ∼ N , . a a Exercise: the predictive distribution for x is N (µ, σ2 + τ 2). Note: The posterior mean for θ is 1 P µ σ2 xi + τ 2 µ1 = n 1 . σ2 + τ 2 If τ 2 is very large compared to σ2, then the posterior mean is approximately x. If σ2/n is very large compared to τ 2, then the posterior mean is approximately µ. = The posterior variance for θ is 2 1 σ 2 φ = n 1 < min , τ , σ2 + τ 2 n which is smaller than the original variances. 8 6.4.3 Credible intervals A (1 − α) (posterior) credible interval is an interval of θ−values within which 1 − α of the posterior probability lies. In the above example: θ − µ P −z < √ 1 < z = 1 − α α/2 φ α/2 is a (1 − α) (posterior) credible interval for θ. The equality is correct conditionally on x, but the r.h.s. does not depend on x, so the equality is also unconditionally correct. 2 σ2 If τ → ∞ then φ − n → 0, and µ1 − x → 0, and σ σ P x − z √ < θ < x + z √ = 1 − α, α/2 n α/2 n which gives the usual 100(1−α)% confidence interval in frequentist statistics. Note: The interpretation of credible intervals is different to confidence √σ intervals: In frequentist statistics, x ± zα/2 n applies before x is observed; the randomness relates to the distribution of x, in Bayesian statistics:,the credible interval is conditional on the observed x; the randomness relates to the distribution of θ.
Recommended publications
  • Overall Objective Priors
    Bayesian Analysis (2015) 10, Number 1, pp. 189–221 Overall Objective Priors∗ James O. Berger†, Jose M. Bernardo‡, and Dongchu Sun§ Abstract. In multi-parameter models, reference priors typically depend on the parameter or quantity of interest, and it is well known that this is necessary to produce objective posterior distributions with optimal properties. There are, however, many situations where one is simultaneously interested in all the param- eters of the model or, more realistically, in functions of them that include aspects such as prediction, and it would then be useful to have a single objective prior that could safely be used to produce reasonable posterior inferences for all the quantities of interest. In this paper, we consider three methods for selecting a sin- gle objective prior and study, in a variety of problems including the multinomial problem, whether or not the resulting prior is a reasonable overall prior. Keywords: Joint Reference Prior, Logarithmic Divergence, Multinomial Model, Objective Priors, Reference Analysis. 1 Introduction 1.1 The problem Objective Bayesian methods, where the formal prior distribution is derived from the assumed model rather than assessed from expert opinions, have a long history (see e.g., Bernardo and Smith, 1994; Kass and Wasserman, 1996, and references therein). Reference priors (Bernardo, 1979, 2005; Berger and Bernardo, 1989, 1992a,b, Berger, Bernardo and Sun, 2009, 2012) are a popular choice of objective prior. Other interesting developments involving objective priors include Clarke and Barron (1994), Clarke and Yuan (2004), Consonni, Veronese and Guti´errez-Pe˜na (2004), De Santis et al. (2001), De Santis (2006), Datta and Ghosh (1995a; 1995b), Datta and Ghosh (1996), Datta et al.
    [Show full text]
  • Minimum Description Length Model Selection
    Minimum Description Length Model Selection Problems and Extensions Steven de Rooij Minimum Description Length Model Selection Problems and Extensions ILLC Dissertation Series DS-2008-07 For further information about ILLC-publications, please contact Institute for Logic, Language and Computation Universiteit van Amsterdam Plantage Muidergracht 24 1018 TV Amsterdam phone: +31-20-525 6051 fax: +31-20-525 5206 e-mail: [email protected] homepage: http://www.illc.uva.nl/ Minimum Description Length Model Selection Problems and Extensions Academisch Proefschrift ter verkrijging van de graad van doctor aan de Universiteit van Amsterdam op gezag van de Rector Magnificus prof.dr. D. C. van den Boom ten overstaan van een door het college voor promoties ingestelde commissie, in het openbaar te verdedigen in de Agnietenkapel op woensdag 10 september 2008, te 12.00 uur door Steven de Rooij geboren te Amersfoort. Promotiecommissie: Promotor: prof.dr.ir. P.M.B. Vit´anyi Co-promotor: dr. P.D. Grunwald¨ Overige leden: prof.dr. P.W. Adriaans prof.dr. A.P. Dawid prof.dr. C.A.J. Klaassen prof.dr.ir. R.J.H. Scha dr. M.W. van Someren prof.dr. V. Vovk dr.ir. F.M.J. Willems Faculteit der Natuurwetenschappen, Wiskunde en Informatica The investigations were funded by the Netherlands Organization for Scientific Research (NWO), project 612.052.004 on Universal Learning, and were supported in part by the IST Programme of the European Community, under the PASCAL Network of Excellence, IST-2002-506778. Copyright c 2008 by Steven de Rooij Cover inspired by Randall Munroe’s xkcd webcomic (www.xkcd.org) Printed and bound by PrintPartners Ipskamp (www.ppi.nl) ISBN: 978-90-5776-181-2 Parts of this thesis are based on material contained in the following papers: An Empirical Study of Minimum Description Length Model Selection with Infinite • Parametric Complexity Steven de Rooij and Peter Grunwald¨ In: Journal of Mathematical Psychology, special issue on model selection.
    [Show full text]
  • Lecture Notes Bayesian Statistics, Spring 2011
    Chapter 3 Choice of the prior Bayesian procedures have been the object of much criticism, often focusing on the choice of the prior as an undesirable source of ambiguity. The answer of the subjectivist that the prior represents the “belief” of the statistician or “expert knowledge” pertaining to the measure- ment elevates this ambiguity to a matter of principle, thus setting the stage for a heated debate between “pure” Bayesians and “pure” frequentists concerning the philosophical merits of either school within statistics. As said, the issue is complicated further by the fact that the Bayesian procedure does not refer to the “true” distribution P0 for the observation (see section 2.1), providing another point of fundamental philosophical disagreement for the fa- natically pure to lock horns over. Leaving the philosophical argumentation to others, we shall try to discuss the choice of a prior at a more conventional, practical level. In this chapter, we look at the choice of the prior from various points of view: in sec- tion 3.1, we consider the priors that emphasize the subjectivist’s prior “belief”. In section 3.2 we construct priors with the express purpose not to emphasize any part of the model, as advocated by objectivist Bayesians. Because it is often desirable to control properties of the posterior distribution and be able to compare it to the prior, conjugate priors are considered in section 3.3. As will become clear in the course of the chapter, the choice of a “good” prior is also highly dependent on the model under consideration. Since the Bayesian school has taken up an interest in non-parametric statistics only rel- atively recently, most (if not all) of the material presented in the first three sections of this chapter applies only to parametric models.
    [Show full text]
  • Conjugate Priors, Uninformative Priors
    Conjugate Priors, Uninformative Priors Nasim Zolaktaf UBC Machine Learning Reading Group January 2016 Outline Exponential Families Conjugacy Conjugate priors Mixture of conjugate prior Uninformative priors Jeffreys prior = h(X) exp[θT φ(X) − A(θ)] (2) where Z Z(θ) = h(X) exp[θT φ(X)]dx (3) X m A(θ) = log Z(θ) (4) Z(θ) is called the partition function, A(θ) is called the log partition function or cumulant function, and h(X) is a scaling constant. Equation 2 can be generalized by writing p(Xjθ) = h(X) exp[η(θ)T φ(X) − A(η(θ))] (5) The Exponential Family A probability mass function (pmf) or probability distribution m d function (pdf) p(Xjθ), for X = (X1; :::; Xm) 2 X and θ ⊆ R , is said to be in the exponential family if it is the form: 1 p(Xjθ) = h(X) exp[θT φ(X)] (1) Z(θ) where Z Z(θ) = h(X) exp[θT φ(X)]dx (3) X m A(θ) = log Z(θ) (4) Z(θ) is called the partition function, A(θ) is called the log partition function or cumulant function, and h(X) is a scaling constant. Equation 2 can be generalized by writing p(Xjθ) = h(X) exp[η(θ)T φ(X) − A(η(θ))] (5) The Exponential Family A probability mass function (pmf) or probability distribution m d function (pdf) p(Xjθ), for X = (X1; :::; Xm) 2 X and θ ⊆ R , is said to be in the exponential family if it is the form: 1 p(Xjθ) = h(X) exp[θT φ(X)] (1) Z(θ) = h(X) exp[θT φ(X) − A(θ)] (2) Z(θ) is called the partition function, A(θ) is called the log partition function or cumulant function, and h(X) is a scaling constant.
    [Show full text]
  • Prior Distributions
    5 Prior distributions The prior distribution plays a dening role in Bayesian analysis. In view of the controversy surrounding its use it may be tempting to treat it almost as an embarrassment and to emphasise its lack of importance in particular appli- cations, but we feel it is a vital ingredient and needs to be squarely addressed. In this chapter we introduce basic ideas by focusing on single parameters, and in subsequent chapters consider multi-parameter situations and hierarchical models. Our emphasis is on understanding what is being used and being aware of its (possibly unintentional) inuence. 5.1 Different purposes of priors A basic division can be made between so-called “non-informative” (also known as “reference” or “objective”) and “informative” priors. The former are in- tended for use in situations where scientic objectivity is at a premium, for example, when presenting results to a regulator or in a scientic journal, and essentially means the Bayesian apparatus is being used as a convenient way of dealing with complex multi-dimensional models. The term “non-informative” is misleading, since all priors contain some information, so such priors are generally better referred to as “vague” or “diffuse.” In contrast, the use of in- formative prior distributions explicitly acknowledges that the analysis is based on more than the immediate data in hand whose relevance to the parameters of interest is modelled through the likelihood, and also includes a considered judgement concerning plausible values of the parameters based on external information. In fact the division between these two options is not so clear-cut — in par- ticular, we would claim that any “objective” Bayesian analysis is a lot more “subjective” than it may wish to appear.
    [Show full text]