This is the web page for AMS 206 (winter 2018). In what follows DD = David Draper (lecturer; email address draper@ucsc.edu), DK  = Daniel Kirsner (TA; email address dkirsner@ucsc.edu), and BE = Baskin Engineering.

The catalog description for AMS 206 is as follows:

Introduces Bayesian statistical modeling from a practitioner's perspective. Covers basic concepts (e.g., prior-posterior updating, Bayes factors, conjugacy, hierarchical modeling, shrinkage, ...), computational tools (Markov chain Monte Carlo, Laplace approximations), and Bayesian inference for some specific models widely used in the literature (linear and generalized linear mixed models). Prerequisite(s): course 131 or 203, or by permission of the instructor. Enrollment is restricted to graduate students.

  • (8 Jan 2018) Announcements will be posted in this section. The first Attachment section below will contain (scanned) PDF copies of the lecture notesdocument camera notes and extra notes, as well as case studies and R Maple  and WinBUGS code; the second Attachment section will contain secure documents, available only by logging into the web page with your CruzID Blue password.
  • (11 Jan 2018, revised 24 Jan 2018) Office hours for the class are as follows: M 5-6pm BE 119 (DK); Tu noon-1pm BE 358 (DD); W 5-6pm BE 119 (DK); Th noon-1pm BE 358 (DD); F 4-5pm BE 119 (DK). Please note that both the time and location of DD's office hours had to be changed, to ensure a big enough room (it may be necessary to change yet again for the same reason; watch your email).
  • (13 Feb 2018) The new drop-dead due date for uploading your solutions to Take-Home Test 1 at canvas.ucsc.edu is 11.59pm on Tue 20 Feb 2018.
  • (16 Feb 2018) The original version of Take-Home Test 1 had two typos in it: in problem 2(B)(iv), the likelihood should have been described as equivalent to a constant times the Γ-1( n - 1, n y-bar ) distribution, not ( n, n y-bar ), and this resulted in another typo in the table in problem 2(B)(v)(b). This has been fixed in the PDF and LaTeX versions in the attachments below.
  • (21 Feb 2018) I've added a Hint to the PDF and LaTeX versions of Quiz 4; the new files are in the attachments below.
  • (1 Mar 2018) An example of a likelihood analysis (click on the link right before this parenthetical comment) treating the likelihood as a density, similar to the work in problem 2(B) in Take-Home Test 2, in a recently-published paper in the journal Nature that may offer new insights into the nature of dark matter.
  • (2 Mar 2018) The original  version of Take-Home Test 2 had two typos in it -- there was an extra log in equation (6), and the y symbols in Table 1 should have been x -- and I've made the first Calculation problem easier by writing an rdirichlet function for you; the appropriate changes have been made in the PDF and LaTeX versions in the attachments below.
  • (11 Mar 2018) If you've ever wondered how people use Bayesian data science to do something practical, such as predicting the results of the men's and women's NCAA basketball tournaments, check out this site (click on the link right before this parenthetical comment) at fivethirtyeight.com: the analysts there are what I would call pragmatic Bayesians, who combine likelihood information from models that predict the results of individual games with prior information based on human expert judgment. Based on your work in this course, you should be able to understand essentially all of the technical details behind how the 538 people make their predictions, which are (year in and year out) among the best available.
  • (15 Mar 2018) A resource you may wish to make use of: with sponsorship from eBay and Google, in 2013 I gave a course on Bayesian modeling, inference, prediction and decision-making that consisted of about 60 hours of lectures, all of which were video recorded (you can watch the videos), together with all of the lecture notes, data sets and code: the web page where all of this is stored is here (click on the link right before this parenthetical comment). The eBay-Google course includes some of the material I covered this quarter and a lot of extra material, some of which would be natural in a next course after AMS 206.
AttachmentSize
PDF icon Lecture notes (part 1): Foundations1.66 MB
PDF icon Terenin A, Draper D (2015). Rigorizing and Extending the Cox–Jaynes Derivation of Probability. arXiv: 1507.06597v11.56 MB
PDF icon Terenin A, Draper D (2017). Cox’s Theorem and the Jaynesian Interpretation of Probability. arXiv: 1507.06597v2235.05 KB
PDF icon Document camera notes, 9 Jan 2018348.54 KB
PDF icon Quiz 1 in PDF format (target due date 16 Jan 2018; drop-dead due date 23 Jan 2018)103.98 KB
Plain text icon Quiz 1 in LaTeX format, for those who want to use LaTeX in preparing their solutions.6.42 KB
PDF icon Document camera notes, 11 Jan 2018401.77 KB
PDF icon Lecture notes (part 2): Bayes's Theorem for Propositions, and an Introduction to Bayesian Decision Theory335.65 KB
PDF icon Document camera notes, 16 Jan 2018395.19 KB
PDF icon Quiz 2 in PDF format (target due date 23 Jan 2018; drop-dead due date 30 Jan 2018)81.34 KB
Plain text icon Quiz 2 in LaTeX format, for those who want to use LaTeX in preparing their solutions.5.88 KB
PDF icon Document camera notes, 18 Jan 2018526.91 KB
PDF icon Lecture notes (part 3): Exchangeability and Conjugate Modeling2.47 MB
PDF icon Document camera notes, 23 Jan 2018496.86 KB
Plain text icon Brief introduction to some useful R commands23.72 KB
Plain text icon R code to illustrate the creation of plots and saving plots as .pdf files949 bytes
PDF icon Document camera notes, 25 Jan 2018345.7 KB
Plain text icon R code to explore the Bernoulli likelihood and log likelihood functions in the AMI case study1.27 KB
PDF icon Take-Home Test 1 (with 2 typos fixed) in PDF format (new drop-dead due date 20 Feb 2018)196.62 KB
Plain text icon Take-Home Test 1 (with 2 typos fixed) in LaTeX format, for those who wish to use LaTeX in preparing their solutions21.87 KB
PDF icon Document camera notes, 30 Jan 2018633.56 KB
Plain text icon R code to compute Inverse Gamma density values for take-home test 1210 bytes
PDF icon Document camera notes, 1 Feb 2018671.44 KB
Plain text icon R code to check the CLT and perform Neyman-style frequentist inference in the AMI case study4.17 KB
PDF icon Example (PDF format) of incorporating .pdf plot files into LaTeX documents114 KB
Plain text icon Example (LaTeX format) of incorporating .pdf plot files into LaTeX documents3.95 KB
PDF icon Quiz 3 in PDF format (target due date 13 Feb 2018; drop-dead due date 20 Feb 2018)105.43 KB
Plain text icon Quiz 3 in LaTeX format (target due date 13 Feb 2018; drop-dead due date 20 Feb 2018)4.54 KB
Plain text icon Maple code for some elements of the likelihood analysis in the AMI case study2.82 KB
Plain text icon Maple code to explore the Beta and Gamma functions a bit1.38 KB
Plain text icon R code to plot various members of the Beta distribution family526 bytes
PDF icon Document camera notes, 6 Feb 2018402.49 KB
PDF icon Document camera notes, 8 Feb 2018619.55 KB
Plain text icon Prior-likelihood-posterior plot and the 95% Bayesian interval for theta in the AMI case study1.01 KB
Plain text icon Exponential probability plot simulation in the wire failure case study798 bytes
PDF icon Document camera notes, 13 Feb 2018557.33 KB
Plain text icon R code for likelihood analysis in the length-of-stay (Poisson sampling distribution) case study1.15 KB
PDF icon Document camera notes, 15 Feb 2018566.36 KB
PDF icon Document camera notes, 20 Feb 2018477.52 KB
PDF icon Take-Home Test 2 (with 3 changes made) in PDF format (drop-dead due date 13 Mar 2018)269.92 KB
Plain text icon Take-Home Test 2 (with 3 changes made) in LaTeX format33.44 KB
Plain text icon R code to draw random samples from the Dirichlet( alpha ) distribution, for Take-Home Test 2278 bytes
Plain text icon R code for problem 2(B) in Take-Home Test 25.61 KB
PDF icon Figure 1 (PDF format) in Take-Home Test 2, for those who wish to incorporate it into their solutions26.03 KB
PDF icon Quiz 4 in PDF format (target due date 27 Feb 2018; drop-dead due date 6 Mar 2018)216.31 KB
Plain text icon Quiz 4 in LaTeX format (target due date 27 Feb 2018; drop-dead due date 6 Mar 2018)7.2 KB
Plain text icon R code to compute the scaled-inverse-chisq density for Quiz 4490 bytes
PDF icon Figure 1 in Quiz 4 (in case you want to incorporate it into your solution)15.52 KB
PDF icon Document camera notes, 22 Feb 2018414.49 KB
PDF icon Lecture notes (part 4): Simulation-Based Computation9.24 MB
Plain text icon R code to approximate the mean of a Beta distribution via IID simulation2.02 KB
PDF icon Document camera notes, 27 Feb 2018361.12 KB
Plain text icon R code to simulate a random walk on the integers1.08 KB
PDF icon Document camera notes, 1 Mar 2018251.39 KB
Plain text icon NB10 case study: WinBUGS model 1198 bytes
Plain text icon NB10 case study: data696 bytes
Plain text icon NB10 case study: initial values 134 bytes
Plain text icon NB10 case study: WinBUGS model 2227 bytes
Plain text icon NB10 case study: initial values 244 bytes
Plain text icon rjags analysis of the NB 10 data15.7 KB
Plain text icon R code (corrected) to run rjags in parallel-processing mode with the NB10 case study6.37 KB
PDF icon rjags user manual318.84 KB
PDF icon rjags tutorial, including examples of the coda package in action2.13 MB
PDF icon Lecture notes (part 5): Hierarchical Modeling3.34 MB
PDF icon Document camera notes, 6 Mar 2018241.3 KB
Plain text icon R code to do Metropolis sampling (Gaussian likelihood with known mean, unknown variance) using the NB10 data6.61 KB
Plain text icon IHGA case study: model 1253 bytes
Plain text icon IHGA case study: data 12.11 KB
Plain text icon IHGA case study: initial values 140 bytes
Plain text icon IHGA case study: model 2311 bytes
Plain text icon IHGA case study: data 24.15 KB
Plain text icon IHGA case study: initial values 236 bytes
Plain text icon IHGA case study: model 3414 bytes
Plain text icon IHGA case study: initial values 354 bytes
PDF icon Document camera notes, 8 Mar 2018421.16 KB
PDF icon Take-Home Test 3 in PDF format, final version; drop-dead due date 25 Mar 2018266.13 KB
Plain text icon Take-Home Test 3 in LaTeX format, final version; drop-dead due date 25 Mar 201847.92 KB
Plain text icon The U.S. family income data set for Take-Home Test 35.81 KB
Plain text icon R code for rjags analysis of the income data with the Lognormal model in Take-Home Test 35.72 KB
Plain text icon rjags Lognormal model file for Take-Home Test 3278 bytes
Plain text icon R code for rjags analysis of the income data with the Gamma model in Take-Home Test 35.84 KB
Plain text icon rjags Gamma model file for Take-Home Test 3272 bytes
Plain text icon R code for bootstrapping the sample mean of the income data in Take-Home Test 31.69 KB
Plain text icon R code for the extra-credit investigation of the calibration of Lognormal and Gamma intervals in Take-Home Test 34.25 KB
Plain text icon Mushroom data set in .txt format, for Take-Home Test 3373.17 KB
Plain text icon Contextual (background) information about the mushroom data set6.8 KB
Plain text icon R code: partial analysis of the mushroom data set28.32 KB
Plain text icon Output of the R code to do variable selection based on BIC in the Take-Home Test 3 mushroom case study15.42 KB
PDF icon A nice expository document by Sudipto Banerjee on the Bayesian linear regression model154.4 KB
Plain text icon R code: bootstrap example (not part of Take-Home Test 3)2.94 KB
PDF icon Document camera notes, 13 Mar 2018217.03 KB
PDF icon Lecture notes (part 6): Bayesian Model Specification623.43 KB
PDF icon Document camera notes, 15 Mar 2018373.6 KB
PDF icon Document camera notes, 20 Mar 2018206.69 KB
Plain text icon De-identified list of grades in the course, with a frequency distribution6.92 KB
Plain text icon R code for parallel MCMC in the NB10 case study (requires model file: next download below this one)6.87 KB
Plain text icon NB10 model file for parallel MCMC calculations233 bytes