Skip to content

Add law of conditional probability, Bayes' theorem, LOTUS, and law of iterated expectations to probability chapter#438

Merged
d-morrison merged 10 commits intomainfrom
copilot/add-definitions-examples-probability-chapter
Apr 10, 2026
Merged

Add law of conditional probability, Bayes' theorem, LOTUS, and law of iterated expectations to probability chapter#438
d-morrison merged 10 commits intomainfrom
copilot/add-definitions-examples-probability-chapter

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

  • Add law of conditional probability (definition + theorem + proof + example)
  • Add Bayes' theorem (theorem + proof + example)
  • Add law of total probability (theorem + proof)
  • Add LOTUS (theorem + proof + notes + example)
  • Add law of iterated expectation (theorem + proof + example)
  • Add proofs of all theorems
  • Address first round of code review feedback
  • Generalize @def-probability property 3 to countable additivity
  • Generalize @thm-total-prob to countable partition
  • Add continuous case proof to @thm-lie
  • Explain how countable additivity is stronger than finite additivity (notes div after property 3)
  • Improve #def-cond-expectation: add conditional pmf/pdf definitions (Hogg-TZ style) for both discrete and continuous cases
  • Add Wikipedia citation for the additive-but-not-σ-additive counterexample

@d-morrison
Copy link
Copy Markdown
Owner

@copilot include proofs of those theorems

Copilot AI and others added 2 commits April 10, 2026 19:24
…d expectations to probability chapter

Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/a5017273-e125-4eed-8aec-bde88b78b0c8

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/a5017273-e125-4eed-8aec-bde88b78b0c8

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copilot AI changed the title [WIP] Add definitions and examples to probability chapter Add law of conditional probability, Bayes' theorem, LOTUS, and law of iterated expectations to probability chapter Apr 10, 2026
Copilot AI requested a review from d-morrison April 10, 2026 19:28
Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/c8b859e2-e33e-4851-903d-105ccad98af3

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 10, 2026

@copilot include proofs of those theorems

Done in 5702435. All five theorems now have proofs:

  • #thm-law-conditional-prob — rearrangement of the definition of conditional probability
  • #thm-total-prob — follows from mutual exclusivity of $A \cap B_i$ and the multiplication rule
  • #thm-bayes — apply the definition of conditional probability to $\Pr(A \cap B)$ from both sides
  • #thm-lotus (new) — let $Y = g(X)$ and expand $\E{Y}$ via @def-expectation, then rearrange the double sum over $x$ and $y$ values
  • #thm-lie — expand $\E{\E{Y \mid X}}$ via @def-expectation and apply the law of total probability

@d-morrison d-morrison marked this pull request as ready for review April 10, 2026 19:57
Copilot AI review requested due to automatic review settings April 10, 2026 19:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the Probability chapter with key foundational results (conditional probability, total probability, Bayes’ theorem, LOTUS, and the law of iterated expectations), including definitions, proofs, and illustrative examples to support later statistical modeling content.

Changes:

  • Added conditional probability definition, the law of conditional probability, and an applied example.
  • Added the law of total probability and Bayes’ theorem with proofs and a medical-test PPV example.
  • Added LOTUS and the law of iterated expectations with proofs, notes, and examples.

Comment thread probability.qmd Outdated
Comment thread probability.qmd Outdated
Comment thread probability.qmd
Comment thread probability.qmd Outdated
Comment thread probability.qmd
@d-morrison
Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 10, 2026

@copilot apply changes based on the comments in this thread

Applied all four review suggestions in 08385ab:

  • probability.qmd:195 — Changed "By property 3" → "By repeated application of property 3 of @def-probability" in the @thm-total-prob proof.
  • probability.qmd:433-438 — Scoped the LOTUS theorem (#thm-lotus) to the discrete case only; the continuous analogue is now presented as an unproved remark inside the notes block after the proof.
  • probability.qmd:498-503 — Added #def-cond-expectation defining $\E{Y \mid X = x}$ (with discrete and continuous forms) and the conditional expectation function $\E{Y \mid X}$, placed immediately before #thm-lie.
  • probability.qmd:510-513 / 517-520 — Narrowed the #thm-lie statement to "discrete random variables with finite ranges"; updated the proof intro to explicitly invoke @thm-total-prob for the finite partition ${X = x : x \in \mathcal{R}(X)}$ by repeated application of property 3.

Comment thread probability.qmd Outdated
Comment thread probability.qmd
@d-morrison
Copy link
Copy Markdown
Owner

@copilot see my comments above

Copilot AI requested a review from d-morrison April 10, 2026 20:58
Comment thread probability.qmd
Comment thread probability.qmd
…on definition

Agent-Logs-Url: https://github.com/d-morrison/rme/sessions/3106c408-d4cb-405d-9dae-addcd97867ce

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 10, 2026

@copilot apply changes based on the comments in this thread

All comments from that review thread have been addressed in 905f483.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • demorrison.ucdavis.edu
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from d-morrison April 10, 2026 21:46
Comment thread probability.qmd Outdated
Copilot AI requested a review from d-morrison April 10, 2026 22:14
@github-actions
Copy link
Copy Markdown
Contributor

PR Preview Action v1.8.1
🚀 Preview available at: https://d-morrison.github.io/rme/pr-preview/pr-438/

Built to branch gh-pages at 2026-04-10 22:44 UTC.

@d-morrison d-morrison merged commit 01a0411 into main Apr 10, 2026
3 checks passed
@d-morrison d-morrison deleted the copilot/add-definitions-examples-probability-chapter branch April 10, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add definitions and examples to probability chapter

3 participants