Repository navigation
Replace ttest with a local Welch's t-test - #22075
Merged
Merged
Conversation
Compute statcmp's two-sided p-values using the regularized incomplete beta function, removing `ttest` and its three transitive dependencies. Add Scilab reference tests to `gulp externaltest`, with the script used to generate the expected values included in the test file.
calixteman
requested review from
Snuffleupagus
and
a balanced review from Copilot
October 5, 2026 14:35
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #22075 +/- ##
==========================================
- Coverage 90.28% 90.28% -0.01%
==========================================
Files 269 269
Lines 67362 67362
==========================================
- Hits 60818 60817 -1
- Misses 6544 6545 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The local implementation is numerically sound, well tested, correctly integrated, and cleanly removes the dependency chain.
Review effort: Balanced
Findings: None
What changed in this PR
Replaces the ttest dependency with a tested local Welch’s t-test implementation for statistical performance comparisons.
Changes:
- Adds incomplete-beta-based Welch’s t-test calculations and Scilab reference tests.
- Integrates the implementation into
statcmpand external tests. - Removes
ttestand its transitive dependencies.
| File | Description |
|---|---|
test/stats/welch_ttest.js |
Implements the statistical calculations. |
test/stats/welch_ttest_spec.js |
Adds Scilab-based reference tests. |
test/stats/statcmp.js |
Uses the local Welch’s t-test. |
gulpfile.mjs |
Runs the new tests in externaltest. |
package.json |
Removes ttest. |
package-lock.json |
Removes obsolete dependency entries. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compute statcmp's two-sided p-values using the regularized incomplete beta function, removing
ttestand its three transitive dependencies.Add Scilab reference tests to
gulp externaltest, with the script used to generate the expected values included in the test file.