Skip to content

Add Bivariate Distributions lecture - #837

Open
jstac wants to merge 1 commit into
mainfrom
bivariate-distributions-lecture
Open

Add Bivariate Distributions lecture#837
jstac wants to merge 1 commit into
mainfrom
bivariate-distributions-lecture

Conversation

@jstac

@jstac jstac commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new lecture, Bivariate Distributions, placed after fitting_distributions and before lln_clt in the Probability and Distributions part.

The three existing lectures in that part (prob_dist, observed_distributions, fitting_distributions) all treat one variable at a time. This lecture is a quick, elementary bridge to pairs of variables, aimed at applied readers, before the series moves on to simple_linear_regression/mle.

Contents

  • Joint and marginal distributions (discrete case first, then continuous)
  • Independence, covariance, and correlation
  • Two ways joint distributions arise: independent components, and Y = aX + b + U
  • The bivariate normal distribution (density, contour plots, a 3D surface plot), including a counterexample showing that normal marginals do not imply joint normality
  • Back to real data: revisits the Ames house price dataset from observed_distributions/fitting_distributions, now looking at price vs. floor area jointly (hexbin/jointplot, sample correlation)
  • Fitting a bivariate normal by the method of moments
  • A closing preview showing that the bivariate normal's conditional mean coincides exactly with the OLS regression line, handing off to simple_linear_regression
  • One exercise (Amazon vs. Costco monthly returns), with solution

Verification

  • Re-executed all code cells (28 cells, including the live yfinance download in the exercise) standalone — clean run, no errors
  • Built the page locally with jupyter-book build bivariate_dist.md — notebook executed successfully (8.15s), HTML rendered correctly
  • Rendered the built HTML with headless Chromium and visually inspected every section: math, figure captions/numbering, notes, exercise/solution admonitions all render as expected
  • Confirmed in the built HTML that the exercise-solution figure is uncaptioned (no <figure>/<figcaption> wrapper), per the manual's guidance that captioned figures inside solution directives break the PDF build
  • The only build warnings are unresolved cross-page {doc} links and a bibtex key, expected for a standalone single-page build outside the full toc/bibliography context

🤖 Generated with Claude Code

Adds a new lecture introducing bivariate distributions, placed after
fitting_distributions and before lln_clt in the Probability and
Distributions part of the toc.

Covers joint/marginal distributions (discrete and continuous), independence,
covariance and correlation, ways joint distributions arise (independent
components; Y = aX + b + U), the bivariate normal distribution, and a
counterexample showing normal marginals don't imply joint normality. Moves
to observed data using the Ames house price dataset already used in
observed_distributions/fitting_distributions, fits a bivariate normal by
the method of moments, and closes with a preview showing the bivariate
normal's conditional mean coincides with the OLS line, handing off to
simple_linear_regression.

Built and rendered locally to verify execution and output.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Aug 15, 2026

Copy link
Copy Markdown

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
🔨 Latest commit 7a792d6
🔍 Latest deploy log https://app.netlify.com/projects/taupe-gaufre-c4e660/deploys/6a80de016a5a18000826c5af
😎 Deploy Preview https://deploy-preview-837--taupe-gaufre-c4e660.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Aug 15, 2026

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request August 15, 2026 21:55 Inactive
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.

1 participant