# Correlated Variable Cholesky Monte Carlo Sampling API

- **Canonical HTML**: https://simulate.fastmesh.dev/seo_geo/correlated-cholesky-monte-carlo-api.html
- **Target Keyword**: `correlated cholesky monte carlo api` (`how_to`)
- **Template**: `saas_pricing_retention` | **Trials**: `10000` | **Seed**: `42` | **Latency**: `102.78 ms`
- **Receipt SHA-256**: `934137235d7c381f686155d73928e588345a73a8b91a3895ee8bf0406ecfa62a`

## Direct Answer
Eliminate naive independence errors in probabilistic modeling with Gaussian-copula Cholesky correlation sampling across normal, lognormal, uniform, triangular, and beta marginals via pure Python stdlib.

## Empirical 10,000-Trial Baseline Metrics
- Mean: **$537,216** (Std Dev: $570,925)
- P5 / P10: -$247,972 / -$118,944
- P25 / P50 (Median) / P75: $141,835 / $461,791 / $862,145
- P90 / P95: $1,283,486 / $1,572,739
- Ruin Probability: **15.83%** (Cash exhaustion within 24 months (ending_cash_24m_usd <= $0))
- CVaR-10: -$296,111
- Top Tornado Sensitivity Driver: `arpu_monthly_usd`

## Key Capabilities
- Supports pairwise and multi-variable positive semi-definite correlation matrices (rho in (-1, 1)) while preserving exact marginal distributions.
- Deterministically enforces correlation invariants (e.g., ARPU-to-CAC +0.50, CPM-to-CTR -0.35, Freight-to-FBA +0.45) using Acklam inverse normal CDF mapping.
- Rejects non-PSD correlation matrices or invalid rho bounds (|rho| >= 1.0) at HTTP 422 with zero billing.

## 10,000-Trial A/B Scenario Comparison (Seed 42)

- `usage_hybrid_nrr_lift`: mean $857,462 (+59.6%), P50 $768,383, ruin 5.96% (-9.87 pp), outperform baseline 74.30%
- `seat_contraction_stress`: mean $314,524 (-41.5%), P50 $253,084, ruin 28.88% (+13.05 pp), outperform baseline 31.56%

## Programmatic Calling Example
```bash
curl -sS -X POST "https://simulate.fastmesh.dev/v1/simulate" -H "Content-Type: application/json" -d '{"template_id": "saas_pricing_retention", "seed": 42, "trials": 10000}'
```

## Engineering-Only Disclaimer
Simulate-Anything is a pure quantitative engineering and probabilistic sensitivity simulation tool. All outputs (means, percentiles, ruin probabilities, break-even boundaries, Tornado swings, and SVG charts) are deterministic mathematical computations over user-supplied parameters and public reference benchmarks. It is NOT licensed investment advice, securities trading advice, tax counsel, or CPA attestation. Zero customer financial model retention, zero resale, and zero third-party model training.
