Bayesian Data Analysis

PHY/CSI/INF 451/551 451Y
(4714,8209,5025,5078,4716,4717)
Fall 2022
Earth Science 242
Lecture: Tue/Thu 1:30 PM - 2:50 PM
Check Syllabus and News before coming to class

Prof. Kevin H. Knuth
Physics Department
University at Albany
Albany NY USA
 

News

A Sheet of Bayesian Practice Problems is posted HERE with solutions that will be available in a few days.

We will hold an OPTIONAL FINAL EXAM on Tuesday December 13th 1:00pm-3:00pm. This is an OPTIONAL exam, and by taking it you will be choosing to replace your MidTerm Exam grade with the Final Exam grade. This will in no way affect the grades of anyone choosing to not take this exam.

Please see the following screenshots as examples of how best to compose your reports for the programming homework sets! HW Examples

Safety

Please refer to UAlbany Health and Safety for covid-19 health and safety information.

Overwhelmed?
Are you overwhelmed by class or things beyond class?
Might you need some sort of help/counseling?
Please don't ignore this!

  • If you think it's an emergency, call 911, or go to this link (http://www.albany.edu/counseling_center/emergency.shtml).
  • If you think it is serious, but not an emergency you should get in touch with University Counseling and Psychological Services (http://www.albany.edu/counseling_center/index.shtml ). They're very good, and they're absolutely confidential.
  • If you think you might need help/support and it's not too serious, send me an email at kknuth@albany.edu and I will find a time to meet. If you find it easier to contact one of the TAs first, then please do so. We are here to help you succeed!

Website

You should check our class website for updates to the schedule, location or for special announcements.

http://knuthlab.org/courses/2022/BayesianDataAnalysis/pmwiki.php

Contact

To reach the instructor, please send an email to

 Prof. Kevin Knuth(kknuth@albany.edu)
 Office Hours : Th 3:30pm – 4:30pm, PH 211 


TA Information: TA's can be reached at their email addresses:

 Risinie Perera(rperera@albany.edu )
 Office Hours : Tu 11:30am - 12:30pm, PH 228



ALL HOMEWORK is to be submitted by email to knuthclass@gmail.com

Schedule

Links in the Where column go to the recorded lecture.
Links in the Topic column go to the slides for that lecture.

WeekDateTopicResourcesHW
1Aug 23IntroductionIntroduction [ppt]Ch. 1, J80 
 Aug 25Problem Solving[ppt] 
2Aug 30FoundationsFoundations( W60),K15
 Sep 1Foundations  
3Sep 6Matlab Overview HW1p:Sep 20
 Sep 8Probability TheoryC46, KS12HW2w:Sep 27
4Sep 13Probability Theory  
 Sep 15Bayes Examples  
5Sep 20Bayes ExamplesCh. 3 
 Sept22Bayes Examples  
6Sep 27Bayes Examples HW3p:Oct 13
 Sep 29UncertaintyChs. 4 & 5 
7Oct 4Uncertainty  
 Oct 6PDFs and Moments  
8Oct 11 Fall Break   
 Oct 13Ex: Length of a PenB18HW4w:Oct 25
9Oct 18Practical Data Analysis  
 Oct 20Multiple Dimensions  
10Oct 25Priors + EntropyJ68 Gif07 S49 
 Oct 27Ex. Histograms + ClassificationK19 Berrar 
11Nov 1MidTerm Review  
 Nov 3 MIDTERM  
12Nov 8Metropolis-Hastingsmcmc code 
 Nov 10Nested SamplingCh. 9, codeHW5w:Nov 29
13Nov 15Nested SamplingNS demo code, S08HW6p:Dec 1
 Nov 17Model TestingKetal15, Ch. 4 ABSTRACT DUE
13Nov 22Ex: Exoplanet DetectionK17 
 Nov 24 Thanksgiving
14Nov 29Experimental DesignK03 KC08 
 Dec 1 Project Presentations 1pm - 3pm 
15 Dec 5 Project Reports Due  
  Dec 13 Optional Final Exam
(to replace Midterm score)
1pm - 3pm

Syllabus

Course: APHY 451, APHY 451Y, APHY 551, ICSI 451, ICSI 551, CINF 451, CINF 551
Class Nos.: 4714,8209,5025,5078,4716,4717
Format: IN PERSON, Earth Science 242, Tue/Thu 1:30 PM - 2:50 PM
Instructor: Prof. Kevin H. Knuth, Associate Professor of Physics
Contact: kknuth@albany.edu, PH 211
Office Hours: Th 3:30 – 4:30, PH 211
`TA: Risinie Perera (Physics), rperera@albany.edu
Required Text: Data Analysis: A Bayesian Tutorial by Sivia and Skilling, 2nd Edition
Required License: MatLab Release 14 or Later: Student Edition

Additional Text (Recommended for those in the Physical Sciences):
Bayesian Probability Theory: Applications in the Physical Sciences


Course Description
Introduction to both the principles and practice of Bayesian and maximum entropy methods for data analysis, signal processing, and machine learning. This is a hands-on course that will introduce the use of the MATLAB computing language for software development. Students will learn to write their own Bayesian computer programs to solve problems relevant to physics, chemistry, biology, earth science, and signal processing, as well as hypothesis testing and error analysis. Optimization techniques to be covered include gradient ascent, fixed-point methods, and Markov chain Monte Carlo sampling techniques.
3 credits
Prerequisite(s): MAT 214 (or equivalent) and CSI 101, CSI 201, or equivalent


Course Objectives
Learn how to use the sum and product rules of probability to compute probabilities of various hypotheses. Learn how to use Bayes theorem to solve inference-based data analysis problems. Learn how to assign prior probabilities and likelihood functions based on the problem at hand. Learn both analytic and numerical techniques for computing the mean and mode of a probability density function as well as the accompanying uncertainties and the Bayesian evidence.
PHY 451Y has the additional objective of focusing on presentations of scientific work. PHY 451Y students will be expected to present their programming homework results to the class. PHY 451Y students are required to complete and present final projects (see below).

Lectures
Classes will be conducted IN PERSON in Earth Science (ES) 242.
Tue/Thu 1:30 PM - 2:50 PM

Expectations
It is expected that each student will attend the Lectures, submit homework in a timely manner, and perform their own work on take-home exams.


Attendance
I will be taking attendance in this class. Students with better than 80% attendance will have their letter grade increased to the next grade (with two exceptions). For example, a C+ would be upgraded to a B-, a B- would be upgraded to a B. However, an A being the maximum letter grade would have to remain an A. Similarly, an E will stay an E.


Incomplete Grades, Make-Ups
It is expected that each student will submit homework in a timely manner, and perform their own work on homework and take-home exams. Homework submitted more than 7 days after the due date will be assigned a 0, unless the student makes arrangements beforehand. Please plan accordingly.


Academic Integrity
Each student is to perform his or her own work. COPYING IS STRICTLY PROHIBITED. Submitting the work of another person as your own is plagiarism and will be treated seriously by assigning an E for the course. Please consult the university's standards on Academic Integrity.


Written Homework
Written homework assignments will be assigned approximately weekly. Typically, the solutions will be due 7 days after being assigned. All written homework assignments are expected to be completed and written in a neat and professional manner.

Each Written Homework assignment can be emailed by the end of the day 11:59 pm of the Submission Date above for 100 points. An assignment can be turned in from 1-3 days after the Submission Date for 90 points. An assignment can be turned in from 4-7 days after the Submission Date for 75 points. Assignments turned in more than 7 days after the Submission Date will receive 0 points.
'''Written Homework files must be NAMED in the following convention:
LASTNAME_HW#NN.PDF
where NN is the homework number.'''
Example: Knuth_HW2w.pdf

The Written HW assignment with the lowest score will be dropped.
This allows you to miss one Written HW assignment, if you wish.

ALL homework is to be submitted to knuthclass@gmail.com


Programming Homework
Programming homework will be assigned. Programs are to be written as Matlab m-file functions. In many cases, the instructor will provide the data to be analyzed, and the student is expected to turn in a computer-generated solution along with a zip file containing the software. The instructor should be able to open the zip file, run the software successfully on his own machine, and obtain identical results. Any results must be written up and presented as a PDF-formatted report with appropriate explanation.
'''Programming Homework files must be NAMED in the following convention:
LASTNAME_HW#NN.ZIP
where NN is the homework number.'''
Example: Knuth_HW6p.zip

PHY 451Y students will present their programming HW solutions to the class.

Each Programming Homework assignment can be turned in by the end of the day 11:59 pm of the Submission Date above for 100 points. An assignment can be turned in from 1-3 days after the Submission Date for 90 points. An assignment can be turned in from 4-7 days after the Submission Date for 75 points. Assignments turned in more than 7 days after the Submission Date will receive 0 points.

The Programming HW assignment with the lowest score will be dropped.
This allows you to miss one Programming HW assignment, if you wish.

ALL homework is to be submitted to knuthclass@gmail.com


Exams
There will be a Midterm Exam only.
It will be an IN-CLASS exam administered on Oct 25. There will be NO FINAL EXAM. Instead we will have student POSTER presentations on Final Research Projects on Dec 1 from 1 - 3pm. Attendance mandatory for everyone.


Student Projects
Final Projects are required for both Graduate Students and PHY 451Y students. Students can choose to work individually or in groups of two to propose, perform, and present a final project for the course. This project will be a project that uses methods taught in this course to solve a data analysis or signal processing problem. Project Proposals in the form of an Abstract are due on Nov 17.
Project Reports follow the format of a short 4-8 page research paper including an abstract, introduction, method, results, conclusion, and references, along with the submission of a zip file containing the data and code.
Project POSTER Presentations will be on Dec 1 from 1pm - 3pm
Project Reports are due on Dec 5.


Undergraduate Grading
Undergraduates are graded using Option I, below.
Undergraduates who do a Final Project will be assigned the best grade of Option I or II.

Option I   Option II 
Written HW40%  Written HW30%
Programming HW40%  Programming HW30%
Exams20%  Exams15%
    Final Project25%

Graduate Grading

Written HW30%
Programming HW30%
Exams15%
Final Project25%
LetterPercentGPA
A90 - 1004.0
A-87 - 903.7
B+83 - 873.3
B80 - 833.0
B-77 - 802.7
C+73 - 772.3
C70 - 732.0
C-67 - 701.7
D+63 - 671.3
D60 - 631.0
E/F< 600.0