Skip to content
All categories

learning

345 posts

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

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

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

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.

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

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

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

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.

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

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

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

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

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

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

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

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

Welcome to CS111! | Stanford CS111 Lecture 1

Lecture 1 follows shared I/O cards in the 1940s, batch processing, multiprogramming, and personal computers to explain how OS responsibilities accumulated as hardware costs and user needs changed.

Threads, Processes, and Dispatching | Stanford CS111 Lecture 2

Lecture 2 defines shared and private process/thread state, then uses fork, execvp, waitpid, and thread creation to show how the kernel creates execution units.

Threads, Processes, and Dispatching, Continued | Stanford CS111 Lecture 3

Lecture 3 follows running, blocked, and ready transitions to show how PCBs, context save/restore, and the dispatcher complete one CPU-control handoff.

Concurrency | Stanford CS111 Lecture 4

Lecture 4 defeats each Too Much Milk attempt with an explicit schedule, deriving race condition, atomicity, critical section, and synchronization requirements from concrete interleavings.

Mutexes, Condition Variables, and Mesa Semantics | Stanford CS111 Lecture 5

Lecture 5 uses an eight-slot circular Pipe to prove that a mutex supplies exclusion, while a condition variable atomically releases the lock and blocks when a predicate is false; under Mesa semantics, wait must return to a while loop that rechecks the predicate.

Implementing Locks | Stanford CS111 Lecture 6

Lecture 6 evolves a one-core interrupt-masking lock through multicore version 5, tracking guard, lock, and wait-queue state to prevent races and lost wakeups.

Deadlock Conditions and Global Lock Ordering | Stanford CS111 Lecture 7

Lecture 7 extracts four necessary deadlock conditions from request/ownership graphs, then compares detection, prevention, and lock ranking; breaking circular wait is common in practice, but every module must obey one global order.

FIFO, Round Robin, Priorities, and Multicore Scheduling | Stanford CS111 Lecture 8

Lecture 8 moves from FIFO and round robin through the unimplementable SRPT ideal to adaptive priority queues and the multicore conflict among queue contention, core affinity, and work conservation.

Linkers and Dynamic Linking | Stanford CS111 Lecture 9

Lecture 9 follows source through assembly, object, executable, and process, explaining the linker's three passes and how a dynamic loader resolves shared-library addresses through a jump table at startup.

Dynamic Storage Management | Stanford CS111 Lecture 10

Lecture 10 moves from predictable LIFO stacks to heap free lists, first/best fit, and slabs, then compares reference counting with mark-and-sweep across dangling pointers, leaks, cycles, and fragmentation.

Dynamic Storage Management, Continued | Stanford CS111 Lecture 11

Lecture 11's official PDF is byte-identical to Lecture 10; this article preserves that artifact gap and focuses on reachability, dangling pointers, leaks, reference-count cycles, and mark/compact garbage collection.

Trust and Operating Systems | Stanford CS111 Lecture 12

Lecture 12 defines trust as voluntary vulnerability, separates over-trust from untrustworthiness, and applies assumption, inference, and substitution to the Linux TCB, the xz attack, and AI-code policy.