NOTE: this website is out of date. This is the course web site from a past quarter, Spring 2020. If you are looking for summer quarter's website, you should visit https://web.stanford.edu/class/archive/cs/cs109/cs109.1208/ instead. Please be advised that courses' policies change with each new quarter and instructor, and any information on this out-of-date page may not apply to you.


EXAMS

Quiz #1
Thursday, April 30
Quiz #2
Thursday, May 21


TEACHING TEAM

cs109 @ cs.stanford.edu

INSTRUCTOR

Lisa Yan
yanlisa @ stanford
Online
MW 11:20am-12:30pm, Th 3:00-5:00pm

ANNOUNCEMENTS

Contest Results
2020061512

We received 11 contest entries this quarter and were impressed by the creativity and probability know-how the entries showed!

Winner: Derek Chong, Modernizing Community Moderation

Runner Up: Soraya Fereydooni, Extra Credit Project

Honorable Mention: Joshua Shongwe, Judicial Perspective on Systemic Privilege

Honorable Mention: Andrea Pasinetti, Using Data on Student-Teacher Ratios and School Capital Investments to Predict Educational Outcomes for Middle and High School Children in New York State

Preliminary Final Grade
2020060513

Your preliminary course grade is available here.

End-quarter schedule revisions
2020052912
  • Problem Set 6. Published deadline will remain Wednesday June 10th, 10am. Late deadline will be Friday June 12th, 11:59pm. There will be no late penalties. Update June 4: This problem set is now optional if you have passed the rest of the course (see this Ed post for details.
  • Problem Set 5. The deadlines will not change, but there will be no late penalties.
  • Contest. Deadline will remain Monday, June 8th, 11:59pm. Late deadline will be Friday, June 12th, 11:59pm. If you submit by the late deadline, we will still accept it for the same course credit as before, but you may not be in the running for prizes.
  • Passing work requirement. You must present passing work on 6 of the 8 required components (Problem Sets 1 to 6, Quiz 1, Quiz 2) and receive a weighted course grade of 65%.

Please join the conversation on Ed to show support and solidarity to all members of our community.

Final PSet
2020053015

The final problem set is now available. 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.

Extra Topic Survey
2020052912

We have two extra topic slots before our Dead Day (no class on Wednesday, June 10). I want to give you the power to steer your own learning! Fill out the Extra Topic Survey to choose the extra topic you're most excited about hearing, or to suggest your own. This survey will close Tuesday, June 2nd.

Preliminary Final Grade
2020052810

To clear up any misconceptions about how to obtain a satisfactory grade in this course, we've computed preliminary final course grades (available here).

These grades were last pulled May 26th from Gradescope. At the bottom, we have marked whether you have demonstrated passing work on the three components of the course. If you have any remaining questions or cannot access your grade, please email the staff list.

Quiz #2 Released
2020052100

Quiz #2 is released. Your personalized PDF is available here. If you have issues downloading your PDF, please email the staff mailing list (cs109 @ cs.stanford.edu) or post privately to Edstem so that we can email you your exam as soon as possible. The LaTeX template is available here.

This take-home, open-book, open-notes exam is to be completed individually, and is due on Thursday, 5/21 11:59pm Pacific time.

The quiz should correspond to about 2 hours of active work time (plus any typesetting). The Gradescope assignment submission portal will be up through the end of the 24-hour window, so please make sure your final submission is uploaded by then. Also please make sure to tag your PDF submission pages to each question answered.

If you have an emergency situation where you are unable to set aside a few hours to complete the exam in this timeslot, please email Lisa and Cooper at any time. We will try our best to accommodate you.

Good luck!

PSet #5 is out
2020051419

The penultimate problem set is now available! This problem set has only 8 questions (plus extra credit).

Midquarter Feedback
2020050811

How are you doing so far? Please fill out an anonymous feedback form here: https://forms.gle/DnWbEd5G95Dm5muF9. We'll keep the form open through Friday night, May 15.

Grading Rubric Adjustment + Quiz #2 Next Thursday
2020051316

We have adjusted the grading rubric as follows (more info in Administrivia handout and EdStem Discussion). To get a satisfactory grade in this course, you must:

  • Present passing work on 6 of the 7 following components: Problem Sets 1 to 5, Quiz 1, and Quiz 2;
  • Present passing work on Problem Set 6; and
  • Have a weighted final course grade of at least 65%.

Quiz #2 for CS109 is coming up: It is Thursday, May 21st, 12:00am-11:59pm Pacific. It should correspond to about 2 hours of active work time. The quiz will cover material up to and including lecture 17, which includes up to part of Problem Set 5. PS5 will be released by tomorrow so that you have extra practice. Practice exams, section handouts, and psets are all great ways to study.

Review session: Tim, one of our outstanding TAs, will be hosting a review session on Saturday, May 16th, 12:00pm-2:00pm Pacific, accessible via this Zoom link. The session recording and materials will be posted on the quiz website afterwards.

If you have an emergency situation where you are unable to set aside a few hours to complete the exam in this timeslot, please email Lisa and Cooper at any time. We will try our best to accommodate you.

Older concept checks
2020051112

If you're looking for older concept checks to aid your studying, we've included links to PDFs of them down below in the schedule.

PSet #4 is out
2020050821

Errata (May 10): The starter code has been updated to fix an error with probSymptom(i, f, c). Please re-download the starter code if you have already started working on the coding question. Thanks!

Problem Set #4 has been released! It has you predict flu or cold based on binary symptoms and risk factors.

CS109 Contest
2020050811

This quarter we are going to hold the sixth Stanford Probability for Computer Scientists Contest. The contest is completely optional and is intended to replace any passing work requirement in this course. See the contest handout for more details.

Optional proposal deadline: Saturday, May 23, 11:59pm Gradescope form
Final contest deadline:Monday, June 8 11:59pm

Quiz #1 Released
2020043000

Quiz #1 is released and on the exam page. The take-home, open-book, open-notes exam is to be completed individually, and is due on Thursday, 4/30 11:59pm Pacific time.

The quiz should correspond to about 2 hours of active work time (plus any typesetting). The Gradescope assignment submission portal will be up through the end of the 24-hour window, so please make sure your final submission is uploaded by then. Also please make sure to tag your PDF submission pages to each question answered.

If you have an emergency situation where you are unable to set aside a few hours to complete the exam in this timeslot, please email Lisa and Cooper at any time. We will try our best to accommodate you.

PSet #3 is out
2020042310

Problem Set #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). We're releasing this problem set early to give you more practice for the quiz. It is due post-quiz, Friday, May 8, 10:00AM Pacific Time.

Quiz #1 Next Thursday
2020020215

Quiz #1 for CS109 is coming up: It is Thursday, April 30th, 12:00am-11:59pm Pacific. It should correspond to about 2 hours of active work time. The quiz will cover material up to and including lecture 9, which includes Problem Sets 1, 2, and part of Problem Set 3. PS3 has been released early so that you have extra practice.

The best way to study is to work through the practice exams and section handouts. This website also has quiz administration details.

Review session: Tim, one of our outstanding TAs, will be hosting a review session on Tuesday, April 28th, 12:00pm-2:00pm Pacific, accessible via this Zoom link. The session recording and materials will be posted on the quiz website afterwards.

Update (4/28): Review session recording is here, and review session whiteboards are here.

If you have an emergency situation where you are unable to set aside a few hours to complete the exam in this timeslot, please email Lisa and Cooper at any time. We will try our best to accommodate you.

Python Tutorial #2 this Friday
2020042212

Sandra, one of our outstanding TAs, will be hosting the second of three Python help sessions covering concepts, tips and tricks for Problem Sets 2 and 3. IT will be held this Friday, April 24 at 5:00pm - 6:00pm Pacific. You can join the session at this zoom link and we will post the recording afterwards. Here is a link to the Jupyter notebook in case you want to get started.

Update (4/26/20): The session slides and Zoom recording are now up on the Python page..

PSet #2 is out
2020041710

Congratulations on finishing PSet #1! Problem Set #2 has been released! This problem set is just 10 problems to adjust for your workload in this course. Here is a Latex template for pset 2.

About Zoom Lecture
2020041515

Updated lecture Zoom link: To comply with University policy, we turned on a password link and updated all links to reflect the embedded, encrypted password. Sorry about any confusion this caused. If you log out of all Zoom/Stanford WebAuth then log back in, the link should work. The meeting passcode is now also available on the staff page. Also, today's last example on hash tables was quite challenging, so it has been re-recorded and uploaded onto Canvas.

Breakout rooms: We have gotten mixed responses about Breakout rooms. To make lecture as flexible as possible for all of you, we will continue to have breakout rooms, but I want to remind everyone that you can return to the main lecture at any time. We are not requiring any of you to participate in an environment that you feel uncomfortable with—that is not the spirit of this quarter, much less of CS109. Hope this will encourage your continued participation in live lecture.

Have a great day!

Free Online CTL Tutoring
2020041410

Want to meet with an experienced peer to discuss course concepts, think through a problem set, or prepare for an upcoming exam? CTL offers appointment tutoring for CS 109, in addition to tutoring for a number of other courses. For more information and to schedule an appointment, visit our tutoring appointments and drop-in schedule page. We also have a variety of remote learning resources and academic coaching available to assist with all of your learning needs!

Python Tutorial this Friday
2020010817

The first of three Python help sessions will be held this Friday, April 10 at two different times to accomodate students: 12:30am - 1:30am and 1:30-2:30pm Pacific. These times are on the CS109 calendar and you can join the session at this zoom link.

Please make sure you have installed or attempted to install Python per this website guide to Python. During the session we will be covering Python language basics, important Python libraries, and get you set up to start Problem Set #1. There will be a Q&A and debugging setup session at the end. The meeting will also be recorded and posted on Canvas after the fact for those who cannot make it live. Looking forward to seeing you all there!

Update (4/10/20): The session slides and Zoom recording are now up on the Python page..

Sign up for Section!
2020040823

Update (4/14/20): Section assignments have been released. If you did not receive an email, please contact the staff mailing list. For any other section scheduling questions, please fill out the Late & Swap form ASAP. Section starts this week.

Please sign up for section by filling out this form (sign in with Stanford email): https://forms.gle/DADWHJazqfptWgJm8.

Once a week you are going to meet in a small group section. We are going to find the best weekly time for everyone. Section signups will close on Saturday, April 11 at 11:59pm Pacific. Preferences are not first come first serve. For more information, visit the Section Attendance page.

If you are living in a different timezone, a CS109 student this quarter, Derek Chong, wrote a spreadsheet to convert the form's Pacific Time listings to your home timezone. Just enter your time zone in the highlighted cell and it'll do the rest. If someone is using it when you click in, you can make your own copy from the File menu. Thanks Derek!

PSet #1 is out
2020010810

Problem Set #1 has been released! It is due next Friday, April 17 at 10:00am Pacific. Submission will be via Gradescope with entry code M2YZ88. Office hours will start today, and the office hours calendar will have times and Zoom links.

You are encouraged to write up your problem sets using LaTeX. Templates for each Problem Set are located on their respective webpage. See this installation guide and intro to LaTeX. Though you may install LaTeX, it is often much easier to use an online LaTeX editor. A great option is: overleaf.com.

Concept Checks
2020040700

We've published Canvas videos for Lectures 1 and 2. The corresponding concept check is due (on-time) before class on Wednesday 4/8, 10:30am PT. You can submit infinitely many times. Here is a quick tutorial on how to navigate the course resources to prepare for lecture.

We've also synced the class roster with Gradescope, so your Stanford email is likely to be registered already. If not, 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 M2YZ88, your full name, email address, and 8-digit student id.

Administrivia
2020040600

If you're having trouble accessing the Zoom link, make sure you are logged into your Stanford account on Zoom. Try opening the link in an incognito/private browser, or use the Zoom app and log in via SSO. Otherwise access Zoom via Canvas (check out the sidebar).

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. Also, read the FAQ page to understand what' different this quarter.

We will be using the Ed discussion forum this quarter. Post your follow-ups during lecture on the lecture threads, and discuss with your classmates. Here is a Quick Start Guide.

The Staff / Office Hours page has contact information for TAs and the office hour calendar. Office hours will start Wednesday, April 8.

Once the quarter starts, you will need to sign up for a weekly 50-minute discussion section. Details on how to sign up for section will be provided during the first week of class.

Course FAQs
2020040310

Thank you for everyone who filled out the optional course planning survey! You can still fill out the form (we are also still reading the jokes you contributed).

The exact details of this course will be available in an Administrivia document to be posted over the weekend, but for now we've written up answers to commonly asked questions regarding prerequisites/whether this course counts towards degree requirements/what fluency of Python/LaTeX is needed/whether lecture/section attendance is mandatory: FAQ link. Stay tuned for the first day of class for more details

Welcome
2020033000

Welcome to CS109! We are looking forward to a fun quarter. Class starts Monday, April 6, at 10:30am PT Online. Online Zoom lectures will be recored and posted to Canvas if you cannot attend the live sessions. More details to be released soon!

Course planning survey: To help us help you in this exciting Spring 2020 online-only quarter, please fill out this survey form that asks for your timezone, your technological accessibility situation, and your course expectations. This form is completely optional and is intended to inform how we can better structure CS109 to meet your learning goals and accessibility needs this quarter.

Course schedule: 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.

Once the quarter starts, you will need to sign up for a weekly 50-minute discussion section. Details on how to sign up for section will be provided during the first week of class.


Schedule

Week Monday Wednesday Friday
1

Apr 6

1: Counting

Read: Ch 1.1-1.2

Apr 8

2: Permutations and Combinations

Read: Ch 1.3-1.6
Out: PSet #1

Apr 10

3: Axioms of Probability

Read: Ch 2.1-2.5, 2.7

2

Apr 13

4: Conditional Probability and Bayes

Read: Ch 3.1-3.3

Apr 15

5: Independence

Read: Ch 3.4-3.5

Apr 17

6: Random Variables and Expectation

Read: Ch 4.1-4.4
Due: PSet #1
Out: PSet #2

3

Apr 20

7: Variance, Bernoulli, Binomial

Read: Ch 4.5-4.6

Apr 22

8: Poisson and More

Read: Ch 4.7-4.10

Apr 24

9: Continuous Random Variables

Read: Ch 5.1-5.3, 5.5

4

Apr 27

10: The Normal Distribution

Read: Ch 5.4
Due: PSet #2
Out: PSet #3

Apr 29

11: Joint Distributions

Read: Ch 6.1
Thursday Apr 30: Quiz #1

May 1

12: Independent Random Variables

Read: Ch 6.2-6.3

5

May 4

13: Joint Random Variable Statistics

Read: Ch 6.4-6.5

May 6

14: Conditional Expectation

Read: Ch 7.1-7.2

May 8

15: General Inference

Read: Lecture Notes
Due: PSet #3
Out: PSet #4

6

May 11

16: Continuous Joint Distributions I

Read: Ch 6.1

May 13

17: Continuous Joint Distributions II

Read: Ch 7.3-7.4

May 15

18: Central Limit Theorem

Read: Ch 8.3

7

May 18

19: Sampling/Bootstrapping

Read: Lecture Notes
Due: PSet #4
Out: PSet #5

May 20

20: Parameters and MLE

Read: Lecture Notes
Thursday May 21: Quiz #2

May 22

21: Beta

Read: Ch 5.6.1-5.6.4, 7.5-7.6

8

May 25

Memorial Day
No Class

May 27

22: Maximum A Posteriori

Read: Lecture Notes

May 29

23: Naive Bayes

Read: Lecture Notes
Due: PSet #5
Out: PSet #6

9

Jun 1

24: Gradient Ascent and Linear Regression

Read: Lecture Notes

Jun 3

25: Logistic Regression

Read: Lecture Notes

Jun 5

26: Utility of Money, Simulating Probabilities, and Jensen's Inequality

10

Jun 8

27: Deep Learning & Beyond CS109

Jun 10

No lecture
No Class

Read: Everything :)
Due: PSet #6
Last day to submit assignments

Jun 12

End of quarter
No Class