Stanford CS 109: Probability for Computer Scientists
CS 109 is probability built for CS — counting, conditional probability, random variables and distributions, the central limit theorem, then maximum likelihood and the first real machine learning algorithms. It bridges the core sequence to CS 221 and CS 229 and is many students' favorite course in the major.
Fennie is independent and not affiliated with Stanford University. This is an unofficial study guide.
Build my CS 109 study planWhat makes it hard
Probability problems punish almost-right reasoning: a small modeling error — wrong conditioning, double-counted outcomes — produces a confidently wrong answer with no compiler to object. Counting problems early and the inference material late are the classic stumbles, and the exam questions are word problems where the setup is the entire battle.
What you'll cover
- • Combinatorics and counting
- • Conditional probability and Bayes' theorem
- • Discrete and continuous random variables
- • Common distributions
- • Central limit theorem
- • Maximum likelihood and intro machine learning
The CS 109 study guide
How to study for Stanford CS 109, step by step.
- 1
Treat counting as a skill, not a topic
The early combinatorics is where 109 grades quietly diverge. Do many small counting problems and articulate why each uses permutations, combinations, or neither — the discrimination is the skill.
- 2
Practice the setup phase out loud
Exam problems are scenarios, and the loss happens translating them into the right probability statement. For every practice problem, write the formal setup before computing anything.
- 3
Make Bayes' theorem mechanical
Conditioning errors are the course's signature mistake. Drill Bayes and law-of-total-probability problems until identifying what to condition on is reflexive.
- 4
Connect every distribution to its story
Each named distribution models a situation — know the story, the parameters, and when it applies. Exams reward recognizing which distribution a scenario is wearing.
- 5
Do the psets without solutions open
Probability intuition only builds through honest failure. Attempt every problem cold, struggle, then consult — the struggle is the studying.
- 6
Build the reps on a Fennie Daily Plan
Upload the CS 109 syllabus and Fennie schedules daily problem practice paced to psets and exams, weighting the counting and inference units, with practice questions generated from your actual materials. Free to start.
Start my CS 109 plan free
How Fennie helps with CS 109
Fennie's Daily Plans pace CS 109's problem volume across the quarter so counting is automatic before conditional probability needs it and inference doesn't arrive on a weak base. Chat through problem setups — what to condition on, which distribution fits — since the setup is where these exams are won or lost.
FAQ
Is CS 109 hard?
It's beloved but real: probability punishes slightly-wrong reasoning invisibly, and exam word problems put all the difficulty in the setup. Students who do high problem volume — especially counting early — consistently do well.
What math do I need for CS 109?
Calculus comfort (integrals appear with continuous distributions) and the discrete-math maturity of CS 103. The harder prerequisite is tolerance for word problems where the model, not the arithmetic, is the question.
Does CS 109 cover machine learning?
The final stretch builds real ML from the probability up — maximum likelihood, naive Bayes, logistic regression. It's the conceptual on-ramp to CS 221 and CS 229, which is much of why the course is so popular.
Pass CS 109 with a plan, not a cram
Upload your CS 109 materials and Fennie generates a Daily Plan paced to your deadline — plus chat, flashcards, and quizzes built from the actual course content.
Get started freeMore Stanford courses
CS 106A — Programming Methodology
CS 106A is Stanford's famous introduction to programming, taught in Python — control flow, functions, decomposition, lists, dictionaries, and graphics — assuming zero prior experience. Its lectures and assignments are public, and through Code in Place it has been taught free to hundreds of thousands of people, so it's studied worldwide by enrolled students and self-learners alike.
CS 106B — Programming Abstractions
CS 106B follows 106A with programming abstractions in C++ — recursion, ADTs and the standard collections, big-O, linked structures, trees, and hashing. It's the course where Stanford CS gets real, and like 106A its materials are public and heavily used by self-learners.
CS 107 — Computer Organization and Systems
CS 107 takes students from C++ down to the machine: C programming, pointers and memory, bit-level representation, x86-64 assembly, and how the heap actually works — culminating in the famous heap allocator assignment. It's the systems gateway of the Stanford CS core.
CS 103 — Mathematical Foundations of Computing
CS 103 is Stanford's discrete math and theory gateway — proof techniques, set theory, induction, graph basics, then finite automata, regular languages, and the first look at computability and P vs NP. For most students it's the first course where the deliverable is a proof, not a program.