Corsica is a RESTful service for generating random samples of some common probability distributions. Basically, it's random samples as a service (RSaaS).
Samples of random variables can be helpful in many settings. Having a service to generate them on demand would be even more helpful. Corsica tries to accomplish this in a light and straightforward way. All that's needed is an Internet connection and a utility like
Invoke-RestMethod if you are using Windows/PowerShell. You can also use your favourite mainstream browser like Chrome or Firefox instead if you prefer.
Ok, But Why the Name - Corsica?
Monte Carlo methods are a set of approaches where numerical results are calculated using random numbers. This applies to a broad class of problems from financial options pricing to statistical mechanics. Due to applying stochastic approaches to deterministic problems, Monte Carlo methods are named after a famous destination for gambling.
Corsica is an island region of France approximately 300 kilometers from Monte Carlo. Corsica is close enough to get to Monte Carlo fairly easily (with a little work) but is also an island unto itself. This is the motivation for the name of this service.
Currently supported probability distributions are:
See the interactive documentation for examples of how to generate samples of each distribution.
This is a cutting art, state of the edge project, built with:
- FastAPI for the API layer
- Deta for hosting the application
- Poetry for general dependency management and scripting
Questions or Concerns?
Let me know how I'm doing. Please try this out and post bugs or issues.
You can also find me on Twitter. Thank you for your interest.