Skip to main content
Stanford
Computer Science
5 credits

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.

What 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. 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. 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. 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. 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. 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.

Today

Today's CS 109 plan

Preview
65 min

What a Fennie Daily Plan looks like for CS 109. Yours is built from your own syllabus and adapts every day to your deadlines and progress.

0 / 4 done~65m remaining
Keep this plan free

First plan free, no card required. Fennie is independent and unaffiliated with your school.

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.

More Stanford courses