Probability, Information & Bayesian Reasoning
Model outputs, losses, sampling and uncertainty all depend on conditioning correctly and keeping the data-generating assumptions visible.
Section 3 of 5 · 7 units · about 25 hours
By the end you can Solve a new conditional-probability problem, verify it by simulation, and derive a posterior predictive calculation with its assumptions.
Units
- Probability axioms and random variables3h
- Joint, marginal and conditional distributions, and independence3h
- Expectation, variance, covariance and conditioning laws4h
- Common distribution families and transformations4h
- Bayes rule, conjugate priors and posterior predictives4h
- Laws of large numbers, CLT, concentration and Monte Carlo4h
- Entropy, cross-entropy, KL divergence and mutual information3h
Build it
Mini project · about 8 to 12 hours
A Monte Carlo verifier for conditional probability, posterior predictives and information
Build exact enumeration on finite spaces, a Monte Carlo estimator that reports its standard error, a Beta-Binomial posterior predictive and discrete information measures. Solve new conditioning problems exactly, confirm them by simulation with an error-aware rule, and show where a wrong model or a heavy tail breaks the check.
- 1Write an exact-enumeration helper over finite sample spaces with
fractions.Fraction, and a Monte Carlo estimator that returns the estimate, its standard error and the sample count. State an acceptance rule for simulation checks and justify it. - 2Solve Stat 110 Homework 2 Problem 6 and 18.05 Problem Set 7 Problem 1 exactly by enumeration, then by simulating each story including how the information was revealed. Encode one tempting wrong answer as well and show the simulation rejecting it.
- 3Check the law of total variance on a two-stage model of your own, comparing the exact decomposition with a simulation of both stages.
- 4Derive the Beta-Binomial posterior predictive for further trials, naming each assumption, and match
scipy.stats.betabinomand a two-stage simulation drawing from the posterior. Then generate data whose chance drifts mid-stream and show the predictive intervals missing later batches more often than claimed. - 5Compare Chebyshev and Hoeffding bounds with simulated tail probabilities for a bounded variable. Then simulate a heavy-tailed variable with a mean but no variance and show standard-error intervals for its mean missing far more often than claimed.
- 6Implement entropy, cross-entropy and KL divergence in bits and nats, handling zero probabilities and the infinite case. Match
scipy.stats.entropyand check the cross-entropy identity and the asymmetry of KL on a pair of your own.
What you hand in
numlab/prob/: enumeration, the Monte Carlo estimator, the posterior predictive and information measures.- Tests with exact and simulated answers for both problems and the rejected wrong answer, plus the variance, predictive, drift, tail and information checks.
notes/probability.mdwith the derivations, each with its assumptions, and the simulation acceptance rule.
How to check it
- Self-grade with the rubric below
How it's graded
Exact answers
Pass: Both conditioning problems are solved exactly by enumeration and match the official solutions.
Great: The notes say which event was conditioned on in each version and why the tempting answer conditions on the wrong one.
Simulation discipline
Pass: Every simulation states its sample count and standard error, and acceptance uses the stated rule.
Great: The wrong answer is rejected by the same rule that accepts the right one.
Posterior predictive
Pass: The Beta-Binomial predictive is derived, matches scipy.stats.betabinom and agrees with the two-stage simulation.
Great: The drift experiment names the failed assumption and shows how the predictive intervals miss.
Limits and information
Pass: Bounds are compared with simulated tails, the heavy-tail failure is shown, and information measures match SciPy with zeros handled.
Great: The heavy-tail note explains the failure through the missing variance, not through too few samples.
Resources
- Harvard Stat 110 - ProbabilityHarvard University
Follow lectures 4-14, 17-23 and 25-30 with matching Strategic Practice. Use lectures 1-3 only for prerequisite repair.
- Stat 110 Strategic PracticeHarvard University
Solve the matching sets before marking a probability topic Practised; use solutions to audit reasoning, not to begin it.
- MIT 18.05 - Bayesian bridgeMIT OpenCourseWare
Use classes 10-16 for MLE, Bayesian updating, posterior prediction, conjugacy, prior choice and credible intervals.
- D2L - Information TheoryD2L authors
Use §§22.11.1-22.11.5 for runnable entropy, cross-entropy, KL and mutual-information examples and exercises.
- Probabilistic Machine Learning: An IntroductionKevin Murphy
Consult targeted parts of Chapters 2, 3, 4 and 6 for ML notation, Monte Carlo, factorization, posterior prediction and information theory.