Repository navigation
Conversation
…p draws The example fits TailCurve and TailBondy to the same 1,000 BootstrapODPSample draws of genins and to draws from a second seed. The shared-draw difference in total IBNR has a standard deviation of 1,540,822 against 4,728,455 for independent draws, a ratio of 0.326, close to sqrt(1 - rho) at a correlation of 0.885. A second table runs 200, 1,000 and 2,000 draws to show that the ratio stays near a third while the standard error of the mean difference falls from 105,259 to 35,350. Developed with an AI assistant (Árbol, running Muse).
scks1
requested review from
genedan,
henrydingliu and
kennethshsu
as code owners
November 19, 2026 11:47
Pyright Type CompletenessView the full Project (full
Other symbols referenced but not exported by
Symbols without documentation:
Patch (exported symbols added or changed by this PR): no exported symbol type-completeness changes detected. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1672 +/- ##
=======================================
Coverage 95.03% 95.03%
=======================================
Files 100 100
Lines 6471 6471
Branches 819 819
=======================================
Hits 6150 6150
Misses 203 203
Partials 118 118
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary of Changes
Adds
docs/gallery/plot_paired_bootstrap.ipynb, a gallery example that fits two methods to the sameBootstrapODPSampledraws and looks at the difference on each draw. It compares TailCurve with TailBondy ongenins, once on shared draws and once on draws from a second seed. It shows the identity Var(B − C) = Var B + Var C − 2 Cov(B, C), the ratio near √(1 − ρ), and that more draws shrink the standard error of the mean difference but leave the gap between the two standard deviations in place. The gallery index gets a card and a toctree entry, anddocs/images/plot_paired_bootstrap.pngis the card image.Related GitHub Issue(s)
Closes #1664
AI/LLM Usage
I used Árbol, an AI assistant running on Muse, under my direction to write the notebook, run it and draft this description. I reviewed the notebook and its numbers.
Additional Context for Reviewers
Results on main 687e329, 1,000 draws with seeds 42 and 7:
The correlation of the two totals across shared draws is 0.885, √(1 − ρ) is 0.338 and the observed ratio of standard deviations is 0.326.
pytest --nbmakepasses on the notebook, and ruff 0.16.1 check and format pass.jb build docswith execution off succeeds. The new page adds no warnings, and the link toplot_bootstrap_comparison, theshapland2016citation and the gallery card all resolve.fit_transformcall feeding both methods. [FEAT] Record the seed each random draw used asrandom_state_, and handlerandom_stateas documented #1605 changes how estimators recordrandom_state, and nothing in this notebook depends on that change.Submitter's Checklist
[FIX],[FEAT],[DOCS],[TST],[CHORE], or[BRK]).Reviewer's Checklist