Skip to content
All tags

#probability

27 posts

Harvard CS50 AI Week 2: Uncertainty — Probability, Bayesian Networks, Markov Models & Genetic Inference

Week 2 shifts from deterministic to probabilistic: Bayes rule, Bayesian nets with D-separation, Markov chains, PageRank random walks. Projects: Heredity (genotype inference) and PageRank (web ranking).

Harvard CS50 AI Synthesis (1): From Search to Language — The Complete Arc of Seven Weeks

Synthesis 1: Tracing how seven weeks form a deliberate knowledge arc from symbolic search to language models, revealing the design philosophy from classical AI to modern ML.

Harvard CS181 HW0: Do These 4 Problems First — They Tell You What to Patch

HW0 checks CS181 prerequisites in four problems — y=Xw solvability, optimizing an objective, reasoning about randomness, and OLS in Python. The problem that slows you down most is the gap to patch before HW1.

CMU 07-280 Lecture 16: Unifying Logistic and Linear Regression with Maximum Likelihood

Lecture 16 starts from likelihood p(D|θ), uses i.i.d. to factor the joint probability and logs to turn products into sums; Bernoulli MLE yields sample proportions, conditional Bernoulli yields logistic cross-entropy, and Gaussian noise yields squared error.

Stanford CS109 Lecture 1 | What is Probability?: List outcomes first; only then assign probabilities to events.

List outcomes first; only then assign probabilities to events.

Stanford CS109 Lecture 2 | Conditional Probability: A condition restricts the sample space to outcomes still compatible with the evidence.

A condition restricts the sample space to outcomes still compatible with the evidence.

Stanford CS109 Lecture 3 | Bayes Theorem: Bayes’ theorem turns an easier generative direction into the inferential direction we need.

Bayes’ theorem turns an easier generative direction into the inferential direction we need.

Stanford CS109 Lecture 4 | Counting and Combinatorics: Decide whether order matters and repetition is allowed before choosing a formula.

Decide whether order matters and repetition is allowed before choosing a formula.

Stanford CS109 Lecture 5 | Random Variables and Expectation: A random variable maps outcomes to numbers; expectation is a weighted average, not necessarily an attainable value.

A random variable maps outcomes to numbers; expectation is a weighted average, not necessarily an attainable value.

Stanford CS109 Lecture 6 | Moments: Expectation, LOTUS, and linearity

Expectation compresses a distribution into a weighted average; LOTUS handles transformed values, while linearity makes sums tractable even without independence.

Stanford CS109 Lecture 7 | Variance and Poisson: From spread to rare-event counts

Variance describes a random variable's spread; Poisson models counts in a fixed interval and approximates a large-n, small-p binomial.

Stanford CS109 Lecture 8 | Continuous Random Variables: PDFs, CDFs, Uniform, and Exponential

A continuous variable assigns zero probability to a point and area to intervals; CDFs, Uniform, Exponential, and memorylessness build on that distinction.

Stanford CS109 Lecture 9 | Normal Distribution: Standardization, Phi, and continuity correction

Standardization maps Normal variables to Z; Phi, linear transforms, and continuity correction turn intervals and large binomials into computable probabilities.

Stanford CS109 Lecture 10 | Probabilistic Models: Joints, marginals, independence, and Bayes

A joint distribution retains the full relationship among variables; marginals, conditionals, independence, and Bayes extract different answers from it.

Stanford CS109 Lecture 11 | Inference: Prior times likelihood, then normalize

Inference multiplies each hidden-variable prior by an observation likelihood and normalizes; the same loop handles repeated evidence and discretized continuous beliefs.

Stanford CS109 Lecture 12 | General Inference: Bayesian networks, sampling, and rare evidence

A Bayesian network factorizes a huge joint through conditional independence; ancestral sampling generates joint samples, and rejection sampling filters them into a conditional.

Stanford CS109 Lecture 13 | Multinomial: Category counts, bag of words, and log probability

The Multinomial extends two-category Binomial counts to many categories; the same PMF models documents as word counts for Bayesian authorship with log-scores.

Stanford CS109 Lecture 14 | Beta: Turn an unknown probability into an updatable random variable

A Beta distribution represents full belief about an unknown success rate; success/failure data updates two parameters for posteriors, smoothing, and Thompson-sampling decisions.

Stanford CS109 Lecture 15 | Adding Random Variables and the Central Limit Theorem

A few independent sums have closed forms; general IID sums become approximately Normal under the CLT, with continuity correction for discrete sums.

Stanford CS109 Lecture 16 | Bootstrapping: Sampling statistics, error bars, and p-values

The bootstrap treats a sample histogram as a population proxy, resampling with replacement to approximate a statistic's sampling distribution, error bar, or null p-value.

Stanford CS109 Lecture 17 | Algorithmic Analysis: Conditional expectation, indicators, and recursion

Expected cost in randomized code can be conditioned on the first random choice; counting problems become indicator sums, often avoiding the full distribution entirely.

Stanford CS109 Lecture 18 | Information Theory: Surprise, entropy, information gain, and KL

Surprise turns rare events into bits; entropy is expected surprise, information gain selects uncertainty-reducing questions, and KL measures excess cost from a model distribution.

Stanford CS109 Lecture 19 | Maximum Likelihood Estimation: Hold data fixed and optimize the parameter

MLE fixes observed data and optimizes parameters; log-likelihood turns products into sums, but a maximum can also lie on a boundary.

Stanford CS109 Lecture 20 | Logistic Regression: Derive the gradient from Bernoulli likelihood

Logistic regression turns a linear score into a Bernoulli probability with sigmoid; the gradient xⱼ(y-ŷ) follows directly from the log-likelihood chain rule.

Stanford CS109 Lecture 21 | Comparing Classifiers: Beyond accuracy to calibration, error costs, and fairness

Classifier comparison requires held-out data, baselines, calibration, precision/recall, and an explicit fairness criterion—not accuracy alone.

Stanford CS109 Lecture 22 | Deep Learning: Derive backpropagation with the chain rule

A neural network stacks logistic units; a forward pass computes probabilities, while backpropagation reuses output error to obtain every gradient.

Stanford CS109: A Probability Course That Turned "How to Read This Lecture With an LLM" Into Official Coursework

Every lecture in CS109's Summer 2026 offering ships with an official LLM Learning Guide — six concepts, a Learn prompt and a Test me prompt for each, written week by week across the quarter for a total of 23 PDFs. The same course's honor code Rule 4 forbids asking an LLM to solve your homework, and 65% of the grade sits in proctored exam rooms. Those two facts are halves of one design.