CS109: Probability for Computer Scientists
Stanford University: Summer 2019
Lecture: Monday, Wednesday, Friday 1:30pm to 3:20pm in Skilling Auditorium
Section: Thursday 2:30pm to 3:20pm, in Gates B03


Staff / Office Hours
icon Piazza
Course Reader
icon Attendance


Problem Set 1
Problem Set 2
Problem Set 3
Problem Set 4
Problem Set 5
Problem Set 6


Tuesday, July 23rd

Friday, August 16th
Shriram 104

Teaching Team

cs109-sum1819-staff @lists.stanford.edu


Noah Arthurs
Gates 202
Wed 12-2PM


We are officially done with CS109! The teaching team wishes you a wonderful rest of your summer with a high probability of good times. Thank you for the great course and see you all around!

Final Exam

The CS109 final is coming up: it is next Friday (August 16th) from 3:30 to 6:30pm in Shriram 104. The final is open notes, open book, closed calculator/computer.

The best way to study is with the practice exams.

Final PSet

The final problem set is now availible. You will implement two machine learning algorithms, Naive Bayes and Logistic Regression. You will then use these algorithms to make predictions on heart tomography, Netflix movies and ancestry.

PSet #5

The penultimate problem set is now availible. The problem set includes evaluating peer grading, a/b testing, general inference in webMd.

Central Limit Theorem

The CLT says that if $Y$ is the sum of $n$ iid random variables (which all have expectation $\mu$ and variance $\sigma^2$) then:

$Y \sim N(n\mu, n\sigma^2)$

The proof is beyond the scope of the class. A friendly CS109 student from a few quarters ago (Sophia Furfine) made a video of the proof in case you are curious!

Midterm Review Session + Materials

On Monday, we will be having a recorded midterm review session after lecture from 3:30 to 4:20 in Skilling. If you cannot come in person but you have topics you'd like me to go over, send me an email!

In addition, there are some new review materials posted at the bottom of the midterm page. Good luck studying!

Problem Set 4

PSet #4 has been released! It has you predict users based on biometric keystrokes. The pset clearly delineates the questions that you should do before the midterm :-).

Midterm Next Tuesday

The CS109 midterm is coming up: it is next Tuesday (July 23rd) from 7 to 9pm in 370-370. The midterm is open notes, open book, closed calculator/computer.

The best way to study is by working through the practice exams and section problems.

Problem Set 3

PSet #3 has been released! It uses real probability density functions from the IPCC Climate Change report, and has you analyze a bloom filter (a probabilistic datastructure).

Galton Board

A Galton board is a physical Binomial distribution where the bucket index that a ball falls into R ~ Bin(n,p) where n is the number of levels and p is the probability of going right each time the ball hits a pin. Check out the JavaScript demo, and the cool video below:

Problem Set 2

PSet #2 has been released! Calculate the updated belief of the location of a cell phone and hypothesize the genetic relationship between bats and whether they carry Ebola. Here is a Latex template for pset 2.

PSet #1 is out

PSet #1 has been released! It is due next Friday, July 5th at 1:00pm. Submission will be via Gradescope with entry code 9KDPPK. Office hours will start tomorrow (Thursday), and the office hours calendar will have times and locations.

If you're new to Gradescope, you can join the class by going to https://gradescope.com/ and clicking the button in the top right marked "Sign Up." Select "Student," then enter the entry code, your full name, email address, and 8 digit student id.

You are encouraged to write up your problem sets using LaTex. Here is a template for pset 1. See this intro to LaTex, and the LaTex code used to generate it. Though you may install LaTeX, it is often much easier to use an online LaTeX editor. A great option is: overleaf.com.

Python Tutorial Thursday

For our first section (Thursday 2:30-3:20PM in Gates B03), Ben will be giving a Python tutorial/review. We recommend looking at the Jupyter notebook beforehand. If you need help getting set up, this Piazza post should be a good starting point. This first section is completely optional and we will not be taking attendance.


Welcome to CS109! We are looking forward to a fun quarter. Class starts Monday June 24th at 1:30pm in Skilling Auditorium.

What is CS109?

We put together some handouts to help you understand where we are going to go in CS109 and how we plan to get there.

The Administrivia handout has details on course logistics. Read this to get a sense for what CS109 is going to entail.

The   Course Schedule page shows you the topics that we are going to cover in CS109 and the corresponding readings. We will also post materials from lecture on the schedule page.

The Staff / Office Hour page has contact information for TAs and the office hour calendar. Office hours will start this Thursday.