Unit 2 of 7 · about 3 hours · derive

Joint, marginal and conditional distributions, and independence

Conditioning is the operation behind every Bayes update, every missing-data marginalization and every independence assumption in a graphical model.

You'll be able to

  • Explain joint, marginal and conditional distributions and apply the chain rule to a new finite model.
  • Distinguish independence, conditional independence and uncorrelatedness with a counterexample for each confusion.
  • Derive a Bayes-rule conditional flip and verify it by simulation with a stated seed.

Covers

Joint, marginal and conditional distributionsIndependence and conditional independence
1

Read

In this order, only the parts listed

0 of 4 done

  1. Conditional probability, Bayes rule and independenceHarvard Stat 110 - Probability

    Lectures 4 and 5: conditional probability, Bayes rule, law of total probability and conditional independence

  2. Joint, conditional and marginal distributionsHarvard Stat 110 - Probability

    Lecture 19: joint, conditional and marginal distributions, 2-D LOTUS and the chicken-egg example

  3. Joint, marginal and conditional drillsStat 110 Strategic Practice

    Strategic Practice Q1-5: ball in sphere, uniforms, Rock-Paper-Scissors Multinomial, chicken-egg; Homework Q1-7

  4. Chain rule and conditional independenceProbabilistic Machine Learning: An Introduction

    Chapter 2, Sections 2.1.3.4-2.1.3.6 and 2.2.3-2.2.4 (pp. 35, 38-40): conditional probability, product and chain rules, independence and conditional independence

2

Focus on

  • restricts the sample space to . Write the restricted space before computing.
  • The chain rule factors any joint distribution. An independence claim drops a conditioning bar and must be justified, never assumed silently.
  • Conditioning can reverse a comparison, as Simpson examples show. Report the conditioning set with every rate.
  • Monty Hall rewards writing the host protocol as a conditional distribution, not as unconditional door odds.
Common mistakes · 3
  • Swapping with . Write both conditionals with their different denominators.
  • Reading pairwise independence as mutual independence. A three-coin Bernstein-style construction breaks it by hand.
  • Confusing conditional with marginal independence in either direction. The chess problem in Strategic Practice 2 (Q5, given the opponent's skill level) separates the two.
3

Try it yourself

Closed-book, before checking anything

Closed-book, derive : the reduced space {BB, BG, GB} is equally likely and one outcome in three is BB. Check with NumPy in float64: numpy.random.default_rng(11), a (300000, 2) array from integers(0, 2) with 1 coding a boy; the conditional fraction is 0.33357 over 225364 conditioned pairs, with standard error 0.00099.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.Derive Bayes rule from the definition of conditional probability and name the step that needs .Answer

    and ; eliminating gives . Division needs , and expanding by total probability needs a partition of the space.

  2. 2.Two fair coins. Are {first is heads} and {at least one head} independent?Answer

    No. and , so independence needs . The intersection is {first is heads} itself, {HH, HT}, with probability 1/2.

  3. 3.Give variables that are conditionally independent given but marginally dependent.Answer

    Two symptoms given disease status: given they are independent by the modeling assumption, but unconditionally they correlate through the unobserved common cause .

  4. 4.In Reproduce, why is the answer 1/3 and not 1/2?Answer

    Conditioning on at least one boy leaves {BB, BG, GB}, three equally likely outcomes. The 1/2 answer conditions on a different event, namely that a specified child is a boy.

5

Practice

You're done when

You derive the 1/3 and a Bayes flip without notes, your rerun of the seed-11 simulation matches 0.33357 to 3 decimals with its standard error, and you can exhibit a pairwise-but-not-mutual independence example.

Only when you can do this without notes.

Leads to

Notes

Resources · 3 for this unit, 2 more in the section
  • Harvard Stat 110 - ProbabilityHarvard University · primary

    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 · required

    Solve the matching sets before marking a probability topic Practised; use solutions to audit reasoning, not to begin it.

  • Probabilistic Machine Learning: An IntroductionKevin Murphy · reference

    Consult targeted parts of Chapters 2, 3, 4 and 6 for ML notation, Monte Carlo, factorization, posterior prediction and information theory.

Also in this section

  • MIT 18.05 - Bayesian bridgeMIT OpenCourseWare · required

    Use classes 10-16 for MLE, Bayesian updating, posterior prediction, conjugacy, prior choice and credible intervals.

  • D2L - Information TheoryD2L authors · required

    Use §§22.11.1-22.11.5 for runnable entropy, cross-entropy, KL and mutual-information examples and exercises.