CS 109: Probability for Computer Scientists
Summer 2017
Monday, Wednesday, Friday 12:30pm to 2:20pm in NVIDIA Auditorium

This is an archived version of the course. See here for the current course page.


Lecture Videos
Staff / Office Hours
icon Piazza
icon Socrative


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


Tuesday, July 25
Building 320-105

Saturday, August 19
NVIDIA Auditorium

Teaching Team



Will Monroe
Fri 2:30-4:30p
Huang basement

Final Exam Info

We're getting close to the final already! It will be 12:15-3:15pm, Saturday (August 19) in NVIDIA Auditorium (the same room as the lecture). We have added a practice final, and we will share solutions on Wednesday.

The final is three hours long. Like the midterm, there will be no books, computers, or calculators allowed, but you can bring two pages front and back (or four pages front-only) of notes—twice what you had for the midterm. It will cover concepts from the entire class, except the neural networks material in the last lecture and other things marked as optional. (The last lecture will also feature a review of the rest of the concepts we have covered, which should be helpful for the final.) Note that logistic regression is required knowledge for the final, although you do not need it for Problem Set 6.

Problem Set 6: Machine Learning

Problem Set #6 is out. In this problem set, you'll be writing an honest-to-goodness machine learning algorithm (the Naive Bayes classifier), and using to predict things like heart disease diagnosis and party affiliation in Congress.

Problem Set 5: Covariance, Correlation, Expectation, Samples

Problem Set #5 is out. Cool problems on this one include robot package delivery and getting cell service in the wilderness, as well as a problem on A/B testing in online classes (which includes some data you'll get to work with).

Problem Set 4: Continuous and Joint Random Variables
Updated: 2017072512

Problem Set #4 is out. It includes some more program running time analysis, as well as a problem on detecting not-so-random randomness.

The first 6 5 problems use entirely material that is fair game from the midterm, so if you feel a need for more practice with continuous distributions before the midterm, you can get a head start on these!

Midterm Review

The CS 109 midterm is coming up! It will be 7-9pm, next Tuesday (July 25) in 320-105. We have added a practice midterm and we will share solutions on Friday.

The midterm is two hours long. No books, computers, or calculators allowed, but you can bring one page front and back (or two pages front-only) of notes. It will cover concepts up until today's lecture (July 19th: Normal Distribution), all of problem sets 1 through 3 plus continuous random variables.

There will also be a midterm review session this Thursday (July 20), 2:30-3:20pm, in Gates B01. It will be recorded and available online.

Problem Set 3: Random Variables

Problem Set #3 is out. It has one programming problem that explores probability distributions in naturally occurring text (specifically, the text of the novel Moby Dick). There's also some more explanation of our paradoxical coin-flipping game, and a problem on election prediction.

Getting started with Python

For those who are interested in learning Python for this class, I've posted a handout on Getting started with Python. It discusses installation, running Python programs, and some useful library functions.

There will also be a Python tutorial led by TA Yuling Liu on Wednesday (7/5) at 2:30pm in Gates B03.

Problem Set #1

Problem Set #1 has been released! Office hours will start tomorrow—see the office hour calendar for times and locations.

If you haven't already been enrolled in Gradescope, the add code for the class is MJP7XM.


You can optionally write up your problem sets using the LaTex system. See this intro to LaTeX, and the LaTeX code used to generate it. You can use this LaTex template custom made for CS 109 problem sets. Though you may install LaTeX, it is often much easier to use an online LaTeX editor. Two good options are: www.overleaf.com and www.sharelatex.com.

Former CS 109 student Joe Delgado has written a nunber of snippets for Latex in Sublime, which he has made available on github.

NYT Article on Stats

An article from a few years ago in the New York Times discusses the increasing importance of statistics in computing. The article is entitled For Today's Graduate, Just One Word: Statistics.

All the Important Info

To help you keep track of where we are in CS 109 and how the course will work, there are two pages you'll want to refer back to often. The first one is the Administrivia handout, which contains most things you should need to know about the course logistics.

The second is the Course Schedule page, which shows you the topics that we are going to cover in CS 109 and the corresponding readings. Materials from lecture will be linked from the schedule page as well as available in the navigation bar at the top of every page.


Welcome to CS 109! We are looking forward to a fun quarter. Class starts Monday, June 26th at 12:30pm in NVIDIA Auditorium.