Bayesian Data Analysis
PHY/CSI/INF 451/551
(4036, 4037, 4204, 4250, 4038,4039)
Fall 2025
Physics 225
Lecture: Tue/Thu 10:30 AM - 11:50 AM
Check Syllabus and News before coming to class
Prof. Kevin H. Knuth
Physics Department
University at Albany
Albany NY USA
News
SNOWSTORM EXPECTED TUESDAY DEC 2
WE ARE PLANNING TO MEET OVER ZOOM
https://albany.zoom.us/j/89126791114?pwd=vASnxkEpdaAU7xjCAv0oa1sy6zNTkc.1
Meeting ID: 891 2679 1114
Passcode: 678848
One tap mobile
+16465588656,,89126791114#,,,,*678848# US (New York)
+16469313860,,89126791114#,,,,*678848# US
Join by SIP
• 89126791114@zoomcrc.com
Passcode: 678848
Join instructions
https://albany.zoom.us/meetings/89126791114/invitations?signature=WSXeVoKeA44cuVC4oGtjfXJznOIya0S8a4l647nlV_0
- - - - - - - - - -
QUIZ#3 (due Tuesday Nov 25 at 11:59pm) is [[http://www.knuthlab.org/courses/2025/BayesianDataAnalysis/resources/BDA-Quiz%233--F-2025.zip | here].
Right click and download link (as it is a zip file).
- - -
SOLUTION TO EX#1 IS POSTED BELOW in a new section to which the other solutions will be added (this week).
- - -
Here you can download the updated SOLUTION to the Two Child Problem discussed in class on Oct 2.
- - -
I have CHANGED the DUE DATE for HW#2p to Tuesday Sept 23. On Tuesday I will discuss the problem on Rejection Sampling, which will hopefully answer some of the questions that have been raised.
- - -
TUESDAY SEPT 9, 2025 There will be NO IN-PERSON CLASS TODAY. Instead, I will hold a ZOOM LECTURE TOMORROW Wednesday, Sept 10, 2025 from 7pm - 8:30pm
This lecture was recorded and can be watched from the link that was emailed to you.
Website
You should check our class website for updates to the schedule, location or for special announcements.
Contact
To reach the instructor, please send an email to
| Prof. Kevin Knuth (kknuth@albany.edu) | ||
|---|---|---|
| Office Hours : Thu 1:30pm – 2:30pm in PH 211 | | W 2:00 - 3:00 by ZOOM | email appointment |
TA Information:
TAs can be reached at their email addresses:
| Vasuda Trehan (vtrehan@albany.edu) | |
|---|---|
| Office Hours : Tuesdays 2:00pm - 3:00pm in Physics 228 |
ALL HOMEWORK is to be submitted by email to knuthclass@gmail.com
Health and Mental Health Care
UAlbany students get free 24/7 medical and mental health support through TimelyCare.
TimelyCare is a telehealth platform that gives undergraduate and graduate students access to care anytime, anywhere—on phone, tablet, or computer. This supplements UAlbany’s already comprehensive health and wellness services.
Learn more about `TimelyCare at `UAlbany.
Services include:
TalkNow: Immediate, on-demand mental health support (including students abroad)
Scheduled Counseling: Up to 12 virtual therapy sessions per year
Medical Visits: On-demand and scheduled care for common illnesses
Health Coaching: Support for nutrition, sleep, and stress management
Peer Community & Self-Care Tools: 24/7 wellness resources
Students register at TimelyCare.com/albany using their @albany.edu email.
As a student there may be times when personal stressors interfere with your academic performance and/or negatively impact your daily life. The University at Albany Counseling and Psychological Services (CAPS) provides free, confidential services including individual and group psychological counseling and evaluation for emotional, social, and academic concerns. Given the COVID pandemic, students may consult with CAPS staff remotely by telephone, email or Zoom appointments regarding issues that impact them or someone they care about. For questions or to make an appointment, call (518) 442-5800 or email consultation@albany.edu. Visit www.albany.edu/caps/ for hours of operation and additional information.
If your life or someone else’s life is in danger, please call 911. If you are in a crisis and need help right away, please call the National Suicide Prevention Lifeline at 1-800-273-TALK (8255).
Students dealing with heightened feelings of sadness or hopelessness, increased anxiety, or thoughts of suicide may also text “GOT5” to 741741 (Crisis Text Line).
Syllabus
| Course: | APHY 451, APHY 451Y, APHY 551, ICSI 451, ICSI 551, CINF 451, CINF 551 | |
|---|---|---|
| Class Nos.: | 4036, 4037, 4204, 4250, 4038,4039 | |
| Format: | IN PERSON, Physics 225, Tue/Thu 10:30 AM - 11:50 AM | |
| Instructor: | Prof. Kevin H. Knuth, Associate Professor of Physics | |
| Contact: | kknuth@albany.edu, PH 211 | |
| Office Hours: | Tue 2:00pm – 3:00pm in PH 211 | W 2:00 - 3:00 by ZOOM | |
email appointment ||
| TAs: | Vasuda Trehan (vtrehan@albany.edu) Tuesdays 2:00pm - 3:00pm Physics 228 | |
|---|---|---|
| Required Texts: | Data Analysis: A Bayesian Tutorial by Sivia and Skilling, 2nd Edition | |
| What is your model?: A Bayesian tutorial by Bontekoe | ||
| Required License: | MatLab Release 14 or Later: Student Edition |
Recommended for those in the Physical Sciences:
Bayesian Probability Theory: Applications in the Physical Sciences
Course Description
This course will introduce 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 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
Prerequisites: CSI 201, MAT 214, or equivalents, or permission of instructor. PHY 509 or equivalent programming experience with permission of the instructor.
Course Learning Objectives
Upon completion of the course, students should be able to accomplish the following activities:
* Use the sum and product rules of probability to compute probabilities in various situations.
- Measure: Students should be able to perform meaningful computations with probabilities
- Assignments: Homework Assignments, Projects, and Exams
- Assign prior probabilities and likelihood functions based on the problem at hand.
- Measure: Students should be able to assign probabilities to solve problems.
- Assignments: Homework Assignments, Projects, and Exams
- Use Bayes theorem to solve inference-based data analysis problems.
- Measure: Students should be able to solve word problems by hand and data analysis problems by writing code involving Bayes theorem
- Assignments: Both Written and Programming Homework Assignments as well as Exams
- Assign prior probabilities and likelihood functions based on the problem at hand.
- Measure: Students should be able to assign probabilities to solve problems.
- Assignments: Homework Assignments, Projects, and Exams
- Use 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.
- Measure: Students should be able to solve basic data analysis problems by computing the means, variances, and modes of probability distributions
- Assignments: Homework Assignments, Projects, and Exams
- Write computer programs to numerically solve data analysis problems.
- Measure: Students should be able to write their own code to solve some data analysis problems numerically.
- Assignments: Programming Homework Assignments, Projects, and Graduate Take Home Exams
Lectures
Classes will be conducted IN PERSON in Physics 225.
Tue/Thu 10:30 AM - 11:50 AM
Rough Tentative Schedule
(do you really need more modifiers? LOL! This schedule may change.)
Links in the Resources column go to the recorded lecture.
Links in the Topic column go to the slides for that lecture.
| Week | Date | Topic | Resources | Reading/HW |
|---|---|---|---|---|
| 1 | Aug 26 | Introduction | Introduction [pptx] | Ch. 1, J80 |
| Aug 28 | Probability Theory | Probability Theory [pdf] | C46, KS12 | |
| 2 | Sep 2 | Probability Theory | ||
| Sep 4 | Matlab Overview | Matlab Tutorial Code [zip] | EX#1: Sep 11 HW#2p: Sep 23 | |
| 3 | Sep 9 | Problem Solving | Problem Solving [pdf] | |
| Sep 11 | Foundations | Foundations | (W60),K15 KS23 | |
| 4 | Sep 16 | Probability Density Functions | HW#3w: Sep 25 | |
| Sep 18 | Basic Sampling / UFO Characteristics | KPR19 | ||
| 5 | Sep 23 | Bayes Theorem | EX#4: Sep 30 | |
| Sep 25 | Bayes Theorem Examples | HW#5: Oct 7 | ||
| 6 | Sep 30 | Two Child Problem | ||
| Oct 2 | Discrete Problems: Attention Monitor | |||
| 7 | Oct 7 | Ex. Histograms | K19 | |
| Oct 9 | Histogram Binning cont | |||
| 8 | Oct 14 | NO CLASS | ||
| Oct 16 | German Tank problem and Uncertainty | Tank Problem Code | ||
| 9 | Oct 21 | Summary Quantities | ||
| Oct 23 | MIDTERM | |||
| 10 | Oct 28 | Practical Problems: Measuring Lengths | ||
| Oct 30 | Line Fitting | EX#6: Nov 6 | ||
| 11 | Nov 4 | Practical Problems | ||
| Nov 6 | Multiple Dimensions | |||
| 12 | Nov 11 | Metropolis-Hastings | | HW#7p: Dec 4 | |
| Nov 13 | Nested Sampling | ABSTRACT DUE | ||
| 13 | Nov 18 | Nested Sampling | ||
| Nov 20 | Model Testing | K15 | ||
| 14 | Nov 25 | Experimental Design | ||
| Nov 27 | Thanksgiving: NO CLASS | |||
| 15 | Dec 2 | Experimental Design | ||
| Dec 4 | Project Presentations |
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.
Time Management
For every credit hour that a course meets, students should expect to work 2 additional hours outside of class every week (3 x 2= 6). For a three-credit course you should expect to work 6 hours outside of class every week. Manage your time effectively to complete readings, assignments, and projects.
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.
EXERCISES
There will be a series of assigned Exercises, of approximately the same difficulty as the Homework Assignments. However, Exercises will NOT BE GRADED. Instead, while completing them is optional, it is highly recommended. At the specified date, solutions to the exercise will be posted on our class website.
HOMEWORK ASSIGNMENTS
There will be both Written and Programming Homework Assignments
Homework Assignments ARE GRADED
ALL homework is to be submitted to knuthclass@gmail.com
Each Homework assignment can be turned in by 11:59 pm of the Due Date for 100 points. An assignment can be turned in from 1-3 days after the Due Date for 90 points. An assignment can be turned in from 4-7 days after the Due Date for 75 points. Assignments turned in more than 7 days after the Due Date will receive 0 points.
The Written HW assignment with the lowest score will be dropped.
The Programming HW assignment with the lowest score will be dropped.
This allows you to miss BOTH one Written AND one Programming HW assignment, if you wish.
Do not ask permission to turn HW assignments in late. You may do so with the penalties described above.
Written homework assignments will be assigned approximately bi-weekly.
'''Written Homework files must be NAMED in the following convention:
LASTNAME_HW#NN.PDF
where NN is the homework number.'''
Example: Knuth_HW2w.pdf
Programming Homework
will be assigned approximately bi-weekly. 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/TA should be able to open the zip file, run the software successfully on his/her own machine, and obtain identical results. Any results must be written up and presented as an MS-Word or 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
QUIZZES
Throughout the semester there will be several unannounced Quizzes.
Missed Quizzes cannot be made up.
The lowest two quiz scores will be dropped.
EXAMS
There will be one in-class MidTerm Exam on Oct 23.
There is NO FINAL EXAM!
FINAL PROJECTS
Undergraduate students and Graduate Students can CHOOSE to take on a Final Project UNDER THE CONDITIONS the problem they choose for their final project is related to their Senior Thesis (undergraduates) and PhD? thesis (graduate students).
This project must use 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 13 ALONG WITH a LETTER from their Advisor confirming that the problem has a meaningful relation to their thesis work.
Project Reports follow the format of a short 4-to-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. Projects will be presented in a final Poster Session on the last day of class, Dec 4.
Grading:
This course is A-E graded and the grades are determined based on graded Written and Programming Homework Assignments, the Exam scores, and the Final Project grade (if applicable):
Students who choose to do a Final Project will be assigned the best grade of Option I or II.
| Option I | Option II | ||||
|---|---|---|---|---|---|
| Written HW | 35% | Written HW | 25% | ||
| Programming HW | 35% | Programming HW | 25% | ||
| Quizes | 10% | Quizes | 10% | ||
| Exam | 20% | Exam | 20% | ||
| Final Project | 20% |
Undergraduate Grading Scale
| Letter | Percent | GPA |
| A | 90 - 100 | 4.0 |
| A- | 87 - 90 | 3.7 |
| B+ | 83 - 87 | 3.3 |
| B | 80 - 83 | 3.0 |
| B- | 77 - 80 | 2.7 |
| C+ | 73 - 77 | 2.3 |
| C | 70 - 73 | 2.0 |
| C- | 67 - 70 | 1.7 |
| D+ | 63 - 67 | 1.3 |
| D | 60 - 63 | 1.0 |
| D- | 57 - 60 | 0.7 |
| E/F | < 57 | 0.0 |
Graduate Grading Scale
| Letter | Percent | GPA |
| A | 90 - 100 | 4.0 |
| A- | 87 - 90 | 3.7 |
| B+ | 83 - 87 | 3.3 |
| B | 80 - 83 | 3.0 |
| B- | 77 - 80 | 2.7 |
| C+ | 73 - 77 | 2.3 |
| C | 70 - 73 | 2.0 |
| C- | 67 - 70 | 1.7 |
| D+ | 63 - 67 | 1.3 |
| D | 60 - 63 | 1.0 |
| E/F | < 60 | 0.0 |