1. Dependence can disappear when we condition
Use rain as a hidden variable in the coats-and-accidents example. See marginal association appear even though coats and accidents are independent within each weather condition.
Open activityAID202 · Foundations of Machine Learning
Eight classroom activities that turn probability assumptions, likelihood, priors, Bayes’ rule, and Naïve Bayes into things students can manipulate and test.
Use rain as a hidden variable in the coats-and-accidents example. See marginal association appear even though coats and accidents are independent within each weather condition.
Open activityFlip a coin, watch the likelihood curve change, locate the MLE, compare 5 vs. 50 flips, and calculate how many samples Hoeffding’s inequality asks for.
Open activityEstimate μ and σ² from continuous samples, inject an outlier, then repeat the experiment hundreds of times to see why the MLE variance is biased.
Open activityMove a Beta prior, add heads and tails, and see prior, likelihood, and posterior together. Compare MLE and MAP and watch the prior get washed out.
Open activityRecreate the diagnostic-test example using expected counts. Then add a conditionally independent follow-up test and see why two different tests can be much more informative.
Open activityCompare parameter counts with and without conditional independence, then assemble a posterior feature-by-feature and see what happens when evidence is duplicated.
Open activityUse the Chinese/Tokyo/Japan example from the lecture, edit the test document, turn smoothing on and off, and verify that word order does not matter in the bag-of-words model.
Open activityMove a continuous 2-D query point through two class models and inspect the per-feature Gaussian likelihoods that combine into the class posterior.
Open activity