Power Play
Medical Affairs stats suite
Design a trial, run it thousands of times, then turn published results and test performance into absolute numbers you can say out loud. Offline, on your device.
By Aitor MartÃnez Rosell. Version 1.0, released 4 November 2026. MIT licence.
Blueprint
Every tool in the lab is documented the same way, from the operational problem to the MLR questions a reviewer will ask.
- 1
Operational problem
Medical Affairs handles statistics every day without a statistician in the room: an investigator-initiated study proposal with an unjustified sample size, a doctor asking what a hazard ratio of 0.75 means for their patients, a diagnostic claim quoted only as sensitivity and specificity.
The options are expensive statistical software or single-purpose calculators that explain nothing. None shows how a trial behaves before it is run.
- 2
Hypothesis
If one free tool connects design, simulation and interpretation, medical teams will challenge assumptions earlier, explain results in absolute terms more often, and spot fragile or over-optimistic evidence before it reaches a slide.
Watching a design play out thousands of times builds an intuition for power, uncertainty and the winner's curse that a formula alone does not.
- 3
Solution architecture
- Statistics engine (
stats.js, 27 KB): pure functions with no dependencies, shared by the page, the simulation worker and the Node tests. - Monte Carlo in a Web Worker, streamed to the page so trials appear as they finish. Seeded xoshiro128** random numbers make every run reproducible.
- Charts drawn on canvas, with no chart library.
- Validation: 88 checks against SciPy, statsmodels and lifelines (
node tests/validate.js); 21 of them re-run on every visitor's device in the Methods tab. - Sharing through the link fragment: inputs travel after the
#and never reach a server. - Installable PWA, fully offline, strict Content Security Policy.
- Statistics engine (
- 4
HCP and patient impact
HCPs: clearer conversations about trial results in absolute terms (how many patients avoid an event, at what baseline risk), with honest uncertainty.
Patients: indirect. Better-designed investigator-initiated studies and more accurate communication of benefit and harm.
No patient-level data is processed at any point.
- 5
Regulatory and MLR considerations
- No data leaves the device; no personal or HCP data is requested.
- A planning and teaching aid, not validated software for regulatory submissions. Final sample sizes belong to a qualified statistician.
- Any output used externally (slides, materials) goes through Medical, Legal and Regulatory review.
- Methods and references are listed in the app, and results are reproducible from the seed.
Discussion wall
No login. Feedback, use cases and bug reports welcome. Links are switched off to keep spam out.
- Loading the wall…