Bayesian Data Analysis, Third EditionChaPMaN hallcroTexts in Statistical Science SeriesSeries editorsFrancesca Dominici, Harvard School of Public Health, USAJulian J. Faraway, University of Bath, UKMartin Tanner, Northwestern University, USAJim Zidek, University of British Columbia, CanadaAnalysis of Failure and Survival DataData Driven statistical MethodsP.J. SmithP SprentThe Analysis of Time Series: An Introduction, Decision Analysis: A Bayesian ApproachSixth editionJ.Q. SmithC. ChatfieldDesign and Analysis of Experiments with SAsApplied Bayesian Forecasting and Time Series J. LawsonAnalysisElery Applications of Probability ThA. Pole, M. West, and J HarrisonSecond editionApplied Categorical and Count Data Analysis H C. TuckwellW.Tang, H. He, and X M. TuElements of SimulationApplied Nonparametric Statistical Methods, B. J.T. MorganFourth editionP. Sprent and N C. SmeetonEpidemiology: Study Design andData analysis, Third EditionApplied Statistics: Handbook of GENSTAT M.WoodwardAnalysesEssential Statistics. Fourth editionE J. Snell and H. SimpsonD A.G. ReesApplied Statistics: Principles and ExamplesExercises and Solutions in Statistical TheoryD.R. Cox and e. SnellL.L. Kupper, B H. Neelon, and S.M. O BrienApplied Stochastic Modelling, Sccond Edition Exand Solutions in Biostatistical TheoryB J T. MorganLL Kupper, B H. Neelon, and S.M. OBrienBayesian Data analysis, Third EditionExtending the linear model with r:A Gelman, J.B. Carlin, H.S. Stern, D B. Dunson, Generalized Linear, Mixed Effects andA. Vehtari and d. B. rubinNonparametric regression modelBayesian Ideas and Data analysis: AnJJarawaIntroduction for Scientists and StatisticiansA First Course in Linear model TheoryR. Christensen, W. Johnson, A. Branscum,N. Ravishanker and D K Deyand TE. hansonGeneralized Additive Models:An Introduction with rbayesian Methods for Data Analysis,BS WoodB P. Carlin and t.A. louisGeneralized linear mixed modelsModern Concepts, Methods and applicationsBeyond ANOVA: Basics of Applied Statistics W.W. Stroupraphics for Statistics and Data analysis withRThe bugs book a practical Introduction toK.J. KeenBayesian analysisD. Lunn, C. Jackson, N. Best, A. Thomas, andInterpreting Data: A First CourseD. Spiegelhalterin statisticsJ B. Andersona Course in Categorical Data analysisT. LeonardIntroduction to general and generalizedLinear modelsA Course in Large Sample TheoryH. Madsen and P. ThyregodT.S. FergusonAn Introduction to generalizedMultivariate Analysis of Variance andLinear models. Third editionRepeated Measures: A Practical Approach forA. Dobson and A.G. BarnettBehavioural scientistsIntroduction to Multivariate analysisD J. Hand and C C. TaylorC. Chatfield and A. collinsMultivariate Statistics: A Practical ApproachIntroduction to Optimization Methods andB Flury and H. riedwylTheir Applications in StatisticsMultivariate Survival Analysis and CompetingB. S. EverittRiskIntroduction to Probability with RM. CrowderK. BaclawskiNonparametric Methods in Statistics with SasIntroduction to randomized controlledApplicationsClinical Trials. Second EditionO. KorostelevaJ. N.S. MatthewsPolya Urn ModelsIntroduction to statistical Inference and ltsH. MahmoudApplications with rPractical Data Analysis for designedM.W. RossetExperimentsIntroduction to Statistical Limit theoryB.S. YandellA M. PolanskyPractical Longitudinal Data analysisIntroduction to statistical Methods forD.J. Hand and M. CrowderClinicaltrialsPractical Multivariate Analysis, Fifth EditionTD. Cook and D.L. DemetsA. Afifi, S May, and V.A. ClarkIntroduction to Statistical Process ControlPractical Statistics for Medical rescarchP QiuD G. AltmanIntroduction to the Theory of statisticalA Primer on linear modelsInferenceJ.F. MonahanH. Liero and s zwanzigPrinciples of Uncertaintyarge Sample Methods in StatisticsJ B. KadaneP.K. Sen and j. da motta singerProbability: Methods and MeasurementLinear Algebra and Matrix Analysis forA o'HaganStatisticsProblem Solving: A Statisticians Guide,anerjee andA. RoySecond editionLogistic Regression ModelsC. ChatfieldJ M. HilbeRandomization, bootstrap and monte carloMarkov chain monte carlo:Methods in Biology, Third EditionStochastic Simulation for Bayesian Inference, B F.J. ManlySecond editionReadings in decision analysisD Gamerman and H.F. LopesS FrenchMathematical statisticsSampling methodologies with applicationsK KnightP.S.R.S. RaModeling and Analysis of Stochastic Systems, Stationary Stochastic Processes: Theory andSecond editionPlicationsV.G. KulkarniindgrenModelling Binary Data, Second EditionStatistical analysis of reliability dataD. CollettM.J. Crowder, A C Kimber,Modelling Survival Data in Medical Research, TJ Sweeting, and R L. SmithSecond editionStatistical Methods for Spatial Data AnalysisD. CollettO Schabenberger and C A GotwayStatistical Methods for SPC and TQMStatistics in Research and DevelopmentD. BissellSecond editionStatistical Methods in Agriculture andR. CaulcuttExperimental biology, second EditionStochastic Processes: An Introduction,R Mead.R N. Curnow, and A.M. hastedSecond editionStatistical Process Control: ThedP W. Jones and P. SmithPractice, Third EditionSurvival analysis Using S: Analysis ofG B Wetherill and D.w. brownTime-to-Event dataStatistical Theory: A Concise IntroductionM. Tableman and J.s. KimF Abramovich and y ritovThe Theory of Linear modelsStatistical Theory, Fourth EditionB JorgensenB.W. LindgrenTime Series analysisStatistics for accountantsH. Madsen) LetchtordTime Series: Modeling, Computation, andStatistics for epidemiologynferenceN.P. JewellR Prado and m. westStatistics for Technology: A Course in Applied Understanding Advanced Statistical MethodsStatistics. Third EditionP.H. Westfall and K.s.s. HenningC. ChatfieldStatistics in Engineering: A Practical ApproachA.V. MetcalfeTexts in statistical scienceBayesian Data AnalysisThird editionAndrew gelmanJohn b carlinIS SternDavid b dunsonAki VehtariDonald b, rub( CRC)CRC PressTaylor francis grotBoca raton London New YorkCRC Press is an imprint of theTaylor Francis Group an informa businessa chapman hall bookCRC PressTaylor Francis Group6000 Broken Sound Parkway nw, Suite 300Boca raton Fl 33487-2742o 2014 by Taylor Francis Group, LLCCRC Press is an imprint of Taylor Francis Group, an Informa businessNo claim to original U.S. Government worksVersion date: 20131003International Standard Book Number-13: 978-1-4398-9820-8(eBook - PDF)This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have beenmade to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyrightholders of all material reproduced in this publication and apologize to copyright holders if permission to publish in thisform has not been obtained. If any copyright material has not been acknowledged please write and let us know so we mayrectify in any future reprintExcept as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from thepublishersForpermissiontophotocopyorusematerialelectronicallyfromthisworkpleaseaccesswww.copyright.com(http://www.copyright.com/)orcontacttheCopyrightClearanceCenter,Inc.(ccc),222rOsewoodDrive,Danvers,Mao1923,978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. Fororganizations that have been granted a photocopy license by the CCC, a separate system of payment has been arrangedTrademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only foridentification and explanation without intent to infringeVisit the Taylor francis Web site athttp://www.taylorandfrancis.comand the crc press Web site athttp://www.crcpress.comContentsPrefacex111Part I: Fundamentals of Bayesian Inference1 Probability and inference1.1 The thrcc steps of Bayesian data analysis31.2 General Iotation for statistical inference41.3 Bayesian inference61.4 Discrete probability examples: genetics and spell checking1.5 Probability as a measure of uncertainty111.6 Example of probability assignment: foot ball point spreads131.7 Example: estimating the accuracy of record linkage161. 8 Some useful results from probability theory191.9 Computation and software1.10 Bayesian inference in applied statistics241.11 Bibliographic note251.12 Exerci272 Single-parameter models292.1 Estimating a probability from binomial data2.2 Posterior as compromise between data and prior information322.3 Summarizing posterior inference322.4 Informative prior distributions2.5 Estimating a normal mean with known variance2.6 Other standard single-parameter models422.7 Example: informative prior distribution for cancer rates472.8 Noninformative prior distributions512.9 Weakly informative prior distributions552.10 Bibliographic note562.11 Exercises573 Introduction to multiparameter models633.1 Avera,ging over ' nuisance parameters6,33.2 Normal data with a noninformative prior distribution643.3 Normal data with a conjugate prior distribution673.4 Multinomial model for categorical data63.5 Multivariate normal model with known variance703.6 Multivariate normal with unknown mean and variance3.7 Example: analysis of a bioassay experiment743.8 Summary of clcmcntary modeling and computation783.9 Bibliographic note783.10 Exercises79CONTENTS4 Asymptotics and connections to non-Bayesian approaches4. 1 Normal approximations to the posterior distribution4.2 Large-sample theory4.3 Counterexamples to the theorems4.4 Frcqucncy evaluations of Bayesian infcrcnccs914.5 Bayesian interpretations of other statistical inethods4.6 Bibliographic note974.7 Exercises5 Hierarchical models1015.1 Constructing a parameterized prior dist ribution1025.2 Exchangeability and setting up hierarchical models1045.3 Fully bayesian analysis of conjugate hierarchical models1085.4 F. ing excha.ngeable parameters from a normal model1135.5 Example: parallel experiments in eight schools1195.6 Hierarchical modeling applied to a meta-analysis1245.7 Weakly in formative priors for hiera.rchical variance parameters1285.8 Bibliographic note1325.9 Exercises134Part II: Fundamentals of Bayesian Data analysis1396 Model checking1416. 1 The place of model checking in applied Bayesian statistics1416.2 Do the inferences from the model make sense1426.3 Posterior predictive checking1436.4 Graphical posterior predictive checks1536.5 Model checking for the educational testing example1596.6 Bibliographic note1616.7 Exercises1637 Evaluating, comparing, and expanding models1657.1 Measures of predictive accuracy1667.2 Information criteria and cross-validation1697.3 Model comparison based on predictive performance1787.4 Model comparison using Bayes factors1827.5 Continuous model expansion1847.6 Implicit assumptions and Inodel expallsiOI: all example7.7 Bibliographic note1927.8 Exercises1938 Modeling accounting for data collection1978.1 Bayesian inference requires a model for data collection1978.2 Data-collcction modcls and ignorability1998.3 Sample surveys8.4 Designed experiments2148.5 Sensitivity and the rolc of randomization2188.6 Observational studies2208.7 Censoring and truncation2248.8 Discussion2298.9 Bibliographic note2298.10 Exercise230CONTENTSg Decision analysis2379. 1 Bayesian dccision thcory in diffcrcnt contexts2379.2 Using regression predictions: incentives for telephone surveys9.3 Multistage decision making: medical screening2459.4 Hierarchical dccision analysis for radon mcasurcmcnt469.5 Personal vs institutional decision analysis2569.6 Bibliographic note2579. 7 Exercises257Part II: Advanced Computation25910 Introduction to Bayesian computation26110. 1 Numerical integration26110.2 Distributional approximations26210.3 Direct simulation and rejection sampling26310.4 Importance sampling26510.5 Ilow many simulation draws are needed?26710.6 Computing environments26810.7 Debugging Bayesian computing27010.8 Bibliographic note27110.9 Exercises27211 Basics of markov chain simulation275bS sampler27611.2 Metropolis and Metropolis-Hastings algorithms27811.3 Using Gibbs and Metropolis as building blocks28011.4 Inference and assessing convergence28111.5 Effective number of simulation draws28611.6 Example: hierarchical normal model11.7 Bibliographic note29111.8 Exercises29112 Computationally efficient Markov chain simulation29312. 1 Efficient Gibbs samplers29312.2 Efficient Metropolis jumping rules12.3 Further extensions to Gibbs and Metropolis9712.4 Hamiltonian Monte Carlo30012.5 Haniltoniall dyIlaInics for a simple hierarchical Inlodel30512.6 Stan: developing a computing environment30712.7 Bibliographic note30812.8 Exercises30913 Modal and distributional approximations31113.1 Finding posterior modcs31113.2 Boundary-avoiding priors for Nodal sulllImaries31313.3 Normal and related mixture approximations31813.4 Finding marginal postorior modcs using EM32013.5 Approximating conditional and marginal posterior densities32513.6 Example: hierarchical normal model(continued)32613.7 Variational inference33113.8 Expectation propagation13.9 Other approximations343