Skip to content

fix: harden p/u validation and Hotelling simulation - #98

Merged
flaviobarros merged 26 commits into
masterfrom
fix/post-merge-validation-hardening
Jul 28, 2026
Merged

fix: harden p/u validation and Hotelling simulation#98
flaviobarros merged 26 commits into
masterfrom
fix/post-merge-validation-hardening

Conversation

@flaviobarros

Copy link
Copy Markdown
Owner

Summary

Closes #97. Hardens the scientific validation merged in #93, #95 and #96.

Changes

Reusable validation evidence

p chart

  • replaces circular nUCL = n * published_UCL checks with n * oracle_UCL;
  • records tolerance ratios from independently calculated limits;
  • distinguishes risk reproduced from rounded table limits from risk computed with unrounded production limits.

u chart

  • replaces the truncated Poisson sum with exact ppois() tails;
  • evaluates the CF2 second-order correction at the signed lower quantile for the LCL;
  • documents and tests both three-sigma tail formulas;
  • adds a regression test against the former same-sign LCL convention.

Hotelling T² simulation

  • factors the elliptical multivariate-t sampler into an internal testable helper;
  • tests that one radial chi-square factor is shared across components of each observation;
  • tests approximate covariance scaling;
  • replaces the chi-square-density MCSE with an empirical order-statistic spacing estimate;
  • preserves the public return structure.

CI/documentation

  • synchronizes generated Rd files;
  • extends inst/WORDLIST for the Hotelling terminology that was leaving documentation-quality red.

Review notes

The u-chart CF2 LCL changes numerically for non-truncated two-sided cases. This is intentional: the lower-tail Cornish-Fisher expansion must be evaluated at z_lower < 0; the previous implementation reused the upper-tail second-order adjustment.

No merge, tag or release action is requested automatically.

Copy link
Copy Markdown
Owner Author

Revisão científica e de integração concluída. Confirmei: fixtures reutilizáveis e não circulares para p; caudas Poisson exatas e LCL CF2 avaliada no quantil inferior assinado para u; MCSE empírico e gerador t elíptico testável para Hotelling T²; documentação sincronizada; todos os workflows verdes em Linux, macOS e Windows. Não encontrei bloqueadores para integração.

@flaviobarros
flaviobarros marked this pull request as ready for review July 28, 2026 03:51
@flaviobarros
flaviobarros merged commit 22c2a8a into master Jul 28, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P0][FIX] Endurecer as validações pós-merge de p, u e Hotelling T²

1 participant