Rewrite MLE as an elementary lecture on maximum likelihood - #849
Merged
Merged
Conversation
- Compare the lognormal MLE with the method-of-moments fit, using the KS statistic - Replace the by-eye tail comparison with log-scale Q-Q plots and KS - Show why the method of moments fails for a Pareto tail with b <= 1 - Add a Student's t MLE fit to Amazon returns, as promised in fitting_distributions - Fix the lognormal density, the sign of the derivative with respect to mu, and use \partial and aligned - Add figure captions, axis labels and lw=2 per the style guide Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for taupe-gaufre-c4e660 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build up the method through Bernoulli (loan defaults), Poisson, normal and Pareto examples; add consistency and asymptotic normality simulations, a comparison with the method of moments for Pareto tails, numerical MLE for the gamma distribution, and keep the Student's t fit to stock returns. The wealth tax application moves to a separate lecture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Go slowly through the Bernoulli example: likelihood as a product, plot, then the log likelihood derivation; use a seed where the estimate differs from the truth - Move the underflow point to the numerical MLE section, using house prices - Identify the normal MLEs as sample mean and standard deviation - Drop the asymptotic normality discussion - Reframe the method of moments comparison: invalid for alpha <= 1, unstable for heavy tails Co-Authored-By: John Stachurski <john.stachurski@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 29, 2026
mmcky
added a commit
to QuantEcon/data-lectures
that referenced
this pull request
Sep 30, 2026
QuantEcon/lecture-python-intro#849 (merged 2026-09-29 21:17 UTC) rewrote mle.md to download monthly AMZN prices with yfinance and refit by maximum likelihood the Student's t that fitting_distributions fits by moments. The read has no annotation, so the strict audit fails on main with `missing_api_annotations: lecture-python-intro:mle:yfinance`, and the next push to main or the Monday 05:17 UTC run goes red, opens an audit-drift issue and skips the Pages deploy. The entry follows fitting_distributions', which reads the same series the same way: pedagogy incidental. Checked 2026-09-30 with build_audit.py all --strict over the eight lecture repos at main: exit 1 on main alone, exit 0 with this entry. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrites
mleas an elementary introduction to maximum likelihood. The wealth tax application moves to a separate lecture,wealth_tax, in a follow-up PR.Contents
bayes_intro). It covers:scipy.optimize.minimize, checked againstgamma.fit.fitting_distributionsaccurate.Also:
Builds locally with no warnings.
🤖 Generated with Claude Code