7 routes42 sections324 units

Unit 3.1 · about 3 h

65 / 324

Probability axioms and random variables

Every later loss, sampler and posterior conditions on an event. A vague sample space now becomes a wrong conditional later.

  • explain
  • derive

You can now

  • Explain sample spaces, events, probability mass functions, density functions and cumulative distribution functions, and state when each one applies.
  • Derive a probability in a new finite model by counting, and check it by exact arithmetic and by simulation with a stated seed.

Covers

  • Sample spaces, events and probability axioms
  • Random variables, PMFs, PDFs and CDFs

Study, in this order

4 steps

  1. Sample spaces, counting and axioms
    Harvard Stat 110 - Probability

    Lectures 1 to 3: naive definition, counting, axioms and inclusion-exclusion

  2. Random variables, PMFs, PDFs and CDFs
    Harvard Stat 110 - Probability

    Lectures 7 and 8: Bernoulli and Binomial variables, CDFs, PMFs and Hypergeometric

  3. Counting and discrete-variable drills
    Stat 110 Strategic Practice

    Strategic Practice: Naive Definition Q1-4 and Story Proofs Q5-7; Homework Q1-7

  4. Probability and random-variable notation
    Probabilistic Machine Learning: An Introduction

    Chapter 2, Sections 2.1-2.2.2 (pp. 33-38): events, the conditional-probability definition, discrete and continuous variables, CDFs and quantiles

Focus on

  • The naive definition needs finite and equally likely outcomes. State both assumptions before counting.
  • A PMF gives probabilities that sum to 1. A density does not: only its integral over a set is a probability, and a density value can exceed 1.
  • The CDF \(F(x)=P(X \le x)\) works for every variable type and determines the distribution.
  • Universality: for continuous \(X\) with CDF \(F\), \(F(X)\) is \(\operatorname{Uniform}(0,1)\). This is the seed of inverse-CDF sampling in the transforms unit.

Reproduce closed-book

Closed-book, count \(P(\text{sum of two fair dice}=9)=4/36=1/9\) from the 36 ordered pairs. Then check with NumPy in float64: numpy.random.default_rng(7), a (200000, 2) int64 array from integers(1, 7); the fraction of sums equal to 9 is 0.11259 with standard error 0.00071, within about 2 standard errors of 1/9.

Traps

  • Reading a density value as a probability. For continuous \(X\), \(P(X=x)=0\); report \(P(X \in \text{an interval})\) instead.
  • Calling an outcome random without a distribution. Name the set, the probabilities on it and the sampling scheme.
  • Assuming distinct-looking formulas give distinct distributions. Compare the CDF or the PMF values, which settle identity.

Practice

Stat 110 Strategic Practice 1: Naive Definition Q1-4 and Story Proofs Q5-7

Strategic Practice Q1-7 with the inline solutions; Homework Q1-7 for counting drills

Attempt each problem before reading its solution. The solutions are printed in the same file.

Self-test

  1. Two dice: why is \(P(\text{sum }9)=4/36\) and not 4/11?

  2. Give a density that exceeds 1 somewhere and show it is still valid.

  3. \(X\) is continuous with strictly increasing CDF \(F\). Prove \(F(X)\) is \(\operatorname{Uniform}(0,1)\), naming each assumption.

  4. A learner simulates 2000 dice pairs, gets 0.125, and claims the exact answer is wrong. What is the error?

Completion criterion

Stop when

You derive the 1/9 by counting without notes, your rerun of the seed-7 simulation matches 0.11259 to 4 decimals, and you can state for any new finite model whether naive counting applies.

Mark passed, then open 3.2 Only mark this when you can do it without notes.

Leads to

Resources for this unit

  • Harvard Stat 110 - Probability
    Harvard Universityprimarycourse
    Follow lectures 4-14, 17-23 and 25-30 with matching Strategic Practice. Use lectures 1-3 only for prerequisite repair.
  • Stat 110 Strategic Practice
    Harvard Universityrequiredpractice
    Solve the matching sets before marking a probability topic Practised; use solutions to audit reasoning, not to begin it.
  • Probabilistic Machine Learning: An Introduction
    Kevin Murphyreferencetheory
    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 bridge
    MIT OpenCourseWarerequiredcourse
    Use classes 10-16 for MLE, Bayesian updating, posterior prediction, conjugacy, prior choice and credible intervals.
  • D2L - Information Theory
    D2L authorsrequiredimplementation
    Use §§22.11.1-22.11.5 for runnable entropy, cross-entropy, KL and mutual-information examples and exercises.

Quick find

Search Michi

Type to search every route, section, unit, topic and resource.

Enter opens the first result Esc closes

Reference

Keyboard shortcuts

n
Continue to the first unit not passed
j / k
Next / previous unit
1 2 3
Toggle learned, practised, passed
/
Open search
?
Show this help
Esc
Close open panels