This is the web page for AMS 206 (winter 2020). In what follows DD = David Draper (lecturer; email address draper@ucsc.edu), PT  = Peter Truby  (Head TA; email address ptrubey@ucsc.edu), XY = Xingchen (Joe) Yu (TA: email address xyu26@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 except by instructor permission.

  • (7 Jan 2020) 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 and RJAGS code; the second Attachment section will contain secure documents and is invisible until you log into the web page with your CruzID Blue password (click on the tiny 'Log In' text in the lower right corner).
  • (7 Jan 2020) The webcasts for the course have now been scheduled. To watch a video, go to https://webcast.ucsc.edu/ and click on the Video List link under AMS 206; you'll then be taken to a login page. Type stat-206-1 in the top yellow box and uncertainty-quantification in the yellow box below that; if you check the Remember me box, you won't have to type these things in during subsequent logins on the machine where you just entered those details. When you now click the blue Login box, you'll go to the Course Webcasts page, and you can now watch any videos you like. The nice thing about the webcasts is, unlike me when I'm lecturing, you can pause, rewind and fast forward the videos.
  • (7 Jan 2020, revised 14 Jan 2020, revised again on 24 Jan 2020, updated again on 11 Feb 2020) The current times and places for office hours for STAT 206 this quarter are as follows: Mon 9-10.30am-noon in BE 156 (PT); Mon 3.30-5pm in E2 room 194 (PT); Tue 1.30-3.05pm in the Baskin Auditorium (Baskin 101: DD); Wed 11am-1pm in BE 312C/D (XY); Thu 1.30-3.05pm in the Baskin Auditorium (Baskin 101: DD); Fri 10-11am in BE 312C/D (XY). The TA office hour times and places may continue to change once we find rooms that permit laptop screen projection, to help you with the R coding in this class. (E2 is the Engineering 2 building.)
  • (9 Jan 2020) In this class you'll turn in your solutions to all assignments by upload of single PDF files (one file per assignment; multiple files [e.g., one PDF file per page] are not acceptable) to canvas.ucsc.edu (to go to this website, click here [to return to the course website, click the back button (left arrow) in the upper left corner of your browser).
  • (2 Feb 2020) I commend to your attention the following video, which is a record of a Ted talk given by the outstanding French pure mathematician Cedric Villani, about the frustrations and joys of using mathematics to gain a better understanding of the world around us.

 

AttachmentSize
PDF icon Document camera notes (lecture: 7 Jan 2020) (uncertainty and information)41.24 KB
PDF icon Lecture notes, part 1 (foundational concepts in the context of an HIV screening case study)550.66 KB
PDF icon Document camera notes (lecture: 9 Jan 2020) (statistics, machine learning; frequentist, Bayesian; similarity, relevance)118.6 KB
PDF icon Lecture notes, part 2 (Bayesian updating in the HIV case study)616.76 KB
PDF icon Quiz 1 in PDF format (absolute due date at canvas 20 jan 2020)104.66 KB
Plain text icon Quiz 1 in LaTeX format (absolute due date at canvas 20 jan 2020)4.68 KB
PDF icon Document camera notes (lecture: 14 Jan 2020) (structure of data sets, deduction and induction (statistical inference))110.42 KB
PDF icon Lecture notes, part 3 (partitions, extending the conversation, sensitivity analysis)393.43 KB
Plain text icon R and Maple code for Case Study 1 (HIV screening)10.6 KB
PDF icon Document camera notes (lecture: 16 Jan 2020) (ontology and epistemology)99.43 KB
PDF icon Lecture notes, part 4 (Pascal-Fermat probability; samples and populations)485.05 KB
Plain text icon R tutorial, part 138.92 KB
PDF icon Take-Home Test 1 in PDF format (target due date at canvas 12 Feb 2020, absolute due date 19 Feb 2020) 208.34 KB
Plain text icon Take-Home Test 1 in LaTeX format (target due date at canvas 12 Feb 2020, absolute due date 19 Feb 2020) 27.01 KB
PDF icon Lecture notes, part 5 (random sampling with and without replacement; frequentist probability)322.8 KB
PDF icon Document camera notes, updated (lecture: 21 Jan 2020) (model diagram for Neyman-style frequentist inference)112.99 KB
PDF icon Lecture notes, part 6 (Neyman-style frequentist inference)102.29 KB
Plain text icon R code for simulating red-or-not in roulette8.92 KB
PDF icon Document camera notes (discussion section: 22, 24 Jan 2020) (probability model diagram for red-or-not in roulette)63.63 KB
PDF icon Lecture notes, part 7 (illustrating the 5 basic statistical data science activities)241.76 KB
PDF icon Lecture notes, part 8 (Fisher-style frequentist inference; exchangeability and conjugate Bayesian modeling)2.47 MB
PDF icon Quiz 2 in PDF format (target due date at canvas 30 jan 2020, absolute due date 10 Feb 2020)101.07 KB
Plain text icon Quiz 2 in LaTeX format (target due date at canvas 30 jan 2020, absolute due date 10 Feb 2020)6.22 KB
PDF icon Document camera notes (lecture: 23 Jan 2020) (sample size determination and confidence interval with 1-0 data)342.8 KB
Plain text icon Likelihood analysis of Case Study 2 (AMI mortality)2.92 KB
PDF icon Document camera notes (lecture: 28 Jan 2020) (likelihood analysis: MLE, Fisher information, standard error of the MLE)528.9 KB
Plain text icon R code for likelihood analysis of hospital length of stay case study1.49 KB
PDF icon Available colors in R209.41 KB
PDF icon Document camera notes (discussion section: 29 Jan 2020) (likelihood analysis of Poisson sampling model)323.87 KB
PDF icon Document camera notes (lecture: 30 Jan 2020) (99.9% intervals for reproducible science; exchangeability; Bayesian inference)409.56 KB
Plain text icon R code for exploring the family of Beta distributions1.17 KB
PDF icon Document camera notes (lecture: 4 Feb 2020) (Bayes's Theorem for an unknown 0 < theta < 1; conjugate priors)401.57 KB
PDF icon Document camera notes (discussion section: 5 Feb 2020) (likelihood and Bayesian analysis of Poisson sampling model)158.74 KB
Plain text icon R code for Neyman-style, Fisher-style, and Bayesian inferential analyses of the hospital length of stay case study14.39 KB
PDF icon Document camera notes (lecture: 6 Feb 2020) (prior sample size; improper priors; Bernstein-von Mises Theorem)423.05 KB
Plain text icon R code to compute the scaled inverse chi-squared density in Quiz 3491 bytes
PDF icon Quiz 3 in PDF format (absolute due date 17 Feb 2020)214.94 KB
Plain text icon Quiz 3 in LaTeX format (absolute due date 17 Feb 2020)7.18 KB
Plain text icon (UPDATED TUE 11 FEB 2020) R code to help you with Take-Home Test 1 problem 2(B)10.81 KB
Plain text icon R code for likelihood and Bayesian analyses in the NB10 case study (part 1: Gaussian modeling)8.4 KB
Plain text icon R code to explore the family of t sampling distributions with the NB10 data set3.12 KB
Plain text icon R code to visualize and optimize the log likelihood function with the t sampling model in the NB10 case study20.1 KB
PDF icon Take-Home Test 2 in PDF format (canvas due date will be updated here, in class and by email)281.67 KB
Plain text icon Take-Home Test 2 in LaTeX format (canvas due date will be updated here, in class and by email)57.35 KB
PDF icon Document camera notes (discussion section: 12 Feb 2020) (likelihood inference, Gaussian sampling model, mu, sigma unknown)110.58 KB
Plain text icon R code to sample from the Dirichlet distribution for Take Home Test 2 problem 2(A)278 bytes
PDF icon Document camera notes (lecture: 13 Feb 2020) (Laplace approximations, Bayesian Gaussian inference, mu, sigma unknown)516.52 KB
Plain text icon R code for the likelihood and log likelihood plots in Take-Home Test 2 problem 2(B)4.07 KB
Plain text icon R code to maximize the log likelihood function via 'optim' in Take-Home Test 2 problem 2(B)3.6 KB
Plain text icon R code to do the empirical Bayes calculations in Take-Home Test 2 problem 2(B)4.76 KB
Plain text icon R code to do the rjags MCMC sampling in Take-Home Test 2 problem 2(B)11.12 KB
Plain text icon rjags model file in Take-Home Test 2 problem 2(B)261 bytes
PDF icon Lecture notes, part 9 (Simulation-based computation)9.24 MB
Plain text icon R code for the first example of IID Monte Carlo simulation (Lecture Notes part 9 page 6)13.55 KB
PDF icon Document camera notes (lecture: 18 Feb 2020) (likelihood inference in the t_nu ( mu, sigma^2 ) sampling model)328.84 KB
PDF icon Document camera notes (discussion section: 19 Feb 2020) (Monte Carlo estimates and their Monte Carlo standard errors)39.31 KB
PDF icon Document camera notes (lecture: 20 Feb 2020) (functional invariance and bias of MLEs; the Monte Carlo method)347.49 KB
Plain text icon rjags model file for fitting the t sampling model to the NB10 data set236 bytes
Plain text icon R code to perform an rjags MCMC Bayesian analysis with the t sampling model fitted to the NB10 data set15.46 KB
Plain text icon R code to illustrate a simple example of Metropolis sampling, in the context of the Quiz 3 case study11 KB
PDF icon Lecture notes, part 10 (Bayesian hierarchical modeling with random effects)3.34 MB
PDF icon Lecture notes, part 11 (Bayesian model comparison and model choice)1.06 MB
PDF icon Document camera notes (lecture: 25 Feb 2020) (the MCMC data set; stable estimation; MCMC prediction)322.25 KB
Plain text icon IHGA data file for model 24.15 KB
PDF icon Document camera notes (lecture: 25 Feb 2020) (the MCMC data set; stable estimation; MCMC prediction)324.77 KB
PDF icon Document camera notes (discussion section: 26 Feb 2020) (Metropolis algorithm, autoregressive time series model of order 1)188.27 KB
Plain text icon Document camera notes (lecture: 27 Feb 2020) (AR_1(rho_1) model, first IHGA model (independent Poissons))53 bytes
Plain text icon IGHA model 1 (comparison of two independent Poisson samples)260 bytes
Plain text icon IHGA data file, version 11.79 KB
Plain text icon IHGA initial values file for model 140 bytes
Plain text icon IGHA model 2 (fixed-effects Poisson regression)315 bytes
Plain text icon IHGA data file, version 24.15 KB
Plain text icon IHGA initial values file for model 240 bytes
Plain text icon IGHA model 3 (random-effects Poisson regression)429 bytes
Plain text icon IHGA initial values file for model 353 bytes
Plain text icon Bootstrap analysis of the IHGA data3.88 KB
Plain text icon R code to illustrate Gibbs sampling in the Gaussian sampling model with mu and sigma both unknown6.43 KB
Plain text icon R code to perform model comparison with log scores, DIC, and BIC in the NB10 case study10.83 KB
PDF icon Semi-final version of Take-Home Test 3 in PDF format (absolute deadline: by 11.59pm on Sun 22 Mar 2020)239.19 KB
Plain text icon Semi-final version of Take-Home Test 3 in LaTeX format (absolute deadline: by 11.59pm on Sun 22 Mar 2020)31.93 KB
Plain text icon R code to perform a partial data analysis in the mushroom case study29.88 KB
Plain text icon The raw mushroom data set in .txt format, for Take-Home Test 3 problem 2(A)373.17 KB
Plain text icon A text file containing important contextual information in the mushroom case study6.86 KB
Plain text icon A text file containing the output of variable selection with BIC in the mushroom data analysis12.28 KB
PDF icon FINAL version of Take-Home Test 3 in PDF format (absolute deadline: by 11.59pm on Sun 22 Mar 2020)279.83 KB
Plain text icon FINAL version of Take-Home Test 3 in LaTeX format (absolute deadline: by 11.59pm on Sun 22 Mar 2020)52.11 KB
Plain text icon The raw spam data set in .txt format, for Take-Home Test 3 problem 2(B)728.48 KB
Plain text icon Text file containing important contextual information in the spam data analysis3.87 KB
Plain text icon (UPDATED) R code to perform all of the data analyses in Take-Home Test 3 problem 2(B) (the spam case study) (with errors fixed)47.52 KB
Plain text icon (UPDATED) R functions to aid in the spam data analysis (with errors fixed)4.42 KB
Plain text icon Text file containing output summarizing the variables in the spam analysis7.36 KB
Plain text icon Output of the ML logistic regression via glm in code block 63.87 KB
Plain text icon Output of the Bayesian logistic regression via bayesreg in code block 86.38 KB