Commit Graph

1 Commits

Author SHA1 Message Date
Víctor Falcón 013a237242 refactor(stats): extract statistical inference into a Services/Stats service
The command carried ~95 lines of private inference math (Wilson, Fisher,
Newcombe, pooled z, log-factorials), so it changed for two unrelated reasons
- presentation and statistical method - and the math was reachable only through
brittle toContain() assertions on rendered output. Move it to
App\Services\Stats\ProportionSignificance (matching the repo's 'compute in
Services/Stats, present in the command' convention) with a BinomialProportion
value object for the (successes, trials) clump, memoise the log-factorials, and
add unit tests that pin the exact interval and p-value numbers. Behaviour of the
command is unchanged.
2026-07-15 09:04:50 +02:00