Rare-Event Importance-Sampling Laboratory
A completed mathematics study comparing crude Monte Carlo, importance sampling, cross-entropy adaptation, mixture proposals and splitting for very small probabilities.

Software compatibility
The pinned local environment and Docker workflow use Python 3.12. No MATLAB, Julia, cloud account or private dataset is required.
Project definition
Problem statement
Ordinary Monte Carlo can return no observed failures when the target probability is much smaller than the reciprocal of the available sample budget.
The mathematical problem is to estimate a five-sigma probability accurately while preserving unbiased weighting, event coverage and honest uncertainty diagnostics.
Project objectives
- Calculate one-sided and two-sided normal-tail probabilities as analytical controls.
- Compare crude Monte Carlo with shifted importance sampling at the same retained budget.
- Adapt a proposal with the cross-entropy method and retain its iteration trace.
- Use a symmetric mixture proposal for a disconnected two-sided event.
- Estimate the same tail probability with fixed intermediate splitting levels.
- Measure sensitivity to sample budget, proposal shift, dimension, mixture balance and splitting design.
Project structure
Project components
Probability controls
Calculates exact standard-normal survival probabilities for direct estimator checks.
Sampling estimators
Implements crude, shifted, mixture and splitting estimators with explicit random generators and standard errors.
Cross-entropy adaptation
Updates the Gaussian proposal from retained elite samples while recording each iteration.
Experiment runner
Executes replicated method comparisons and five controlled sensitivity studies.
Evidence builder
Writes eight CSV tables, a summary file and thirteen labelled figures in raster and vector formats.
Methodology
Project workflow
- 01Load the study
The program reads the seed, thresholds, budgets, grids and adaptation settings.
- 02Calculate the truth
SciPy evaluates the analytical one-sided and two-sided normal-tail probabilities.
- 03Run replications
Four estimators process the same five-sigma case across eighty controlled replications.
- 04Test sensitivity
Budget, proposal, dimension, mixture and splitting settings are varied independently.
- 05Compare uncertainty
Bias, relative RMSE, zero frequency, standard error and interval coverage are retained.
- 06Export evidence
The complete tables, summary and paired figures are generated from one versioned configuration.
Demonstration scenario
The five-sigma event has probability 2.8665157188e-07. With 20,000 samples, every crude Monte Carlo replication returns zero, while mean-shift importance sampling reaches 1.669 percent relative RMSE and the cross-entropy proposal reaches 1.513 percent.
Engineering
Tools and method
- Tools
- The project uses Python 3.12, NumPy 2.5.2, SciPy 1.18.1, Pandas 3.0.5, Matplotlib 3.11.1 for subject analysis, simulation, and results.
- Reference problem
- One-sided five-sigma and two-sided 4.5-sigma standard-normal events with exact probabilities.
- Importance weights
- Exact log likelihood ratios correct samples drawn from shifted or mixture proposals.
- Adaptive proposal
- Six cross-entropy iterations use an elite fraction and smoothed mean update.
- Splitting method
- Strictly increasing conditional levels decompose the rare event into estimable factors.
- Verification
- Analytical comparisons, automated tests, branch coverage, lint, dependency audit, Docker reproduction and document checks.
Testing
Evaluation
Evaluation measures
- Mean estimate and relative bias against the analytical probability
- Empirical standard deviation and reported standard error
- Relative root mean square error across eighty replications
- Zero-estimate frequency and 95 percent interval coverage
- Event count and effective sample size
- Accuracy across sample budgets and proposal shifts
- Robustness across dimensions, mixture weights and splitting levels
Project boundaries
- The retained cases use independent standard-normal models so exact probabilities are available.
- The dimension study retains a one-coordinate event and is not a complete structural-reliability model.
- Efficiency conclusions apply to the declared proposals, budgets, thresholds and diagnostics.
- The results support mathematical study and do not certify a physical system or safety decision.
Included
- 01Complete Python source code
- 02Crude Monte Carlo reference estimator
- 03Gaussian mean-shift importance sampling
- 04Cross-entropy proposal adaptation
- 05Symmetric mixture importance sampling
- 06Fixed-level conditional splitting
- 07Budget, proposal, dimension, mixture and splitting studies
- 08Eight CSV evidence tables and thirteen paired PNG and SVG figures
- 09100-page project documentation in PDF and editable Word formats
- 1010-page setup and usage guide in PDF and editable Word formats
- 1140 annotated references and one licensed literature image
- 1219 automated tests with 98.20 percent branch-aware coverage
Project record
No information is collected on this page.
- Permanent project ID
- GP-MA-1CWMHLW
- Catalogued
- 21 Aug 2026
- Completed
- 28 Aug 2026
- Verified
- 28 Aug 2026
- Demonstration
- Included in repository
Handover
After purchase
- 01Payment is confirmed
The project is marked unavailable and cannot be purchased again.
- 02Repository access is granted
The buyer's submitted GitHub account receives access to the private repository.
- 03The purchase record is delivered
The certification sheet is prepared from the reviewed buyer details and sent privately by email.