feat: add @stdlib/stats/strided/dttest#11228
feat: add @stdlib/stats/strided/dttest#11228shaktimaanO-O wants to merge 2 commits intostdlib-js:developfrom
Conversation
|
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
|
👋 Hi there! 👋 And thank you for opening your first pull request! We will review it shortly. 🏃 💨 Getting Started
Next Steps
Running Tests LocallyYou can use # Run tests for all packages in the math namespace:
make test TESTS_FILTER=".*/@stdlib/math/.*"
# Run benchmarks for a specific package:
make benchmark BENCHMARKS_FILTER=".*/@stdlib/math/base/special/sin/.*"If you haven't heard back from us within two weeks, please ping us by tagging the "reviewers" team in a comment on this PR. If you have any further questions while waiting for a response, please join our Zulip community to chat with project maintainers and other community members. We appreciate your contribution! Documentation Links |
|
An automated check found potentially unrelated issue/PR references in this PR:
Why this matters: GitHub automatically closes issues referenced with closing keywords (Resolves, Closes, Fixes) when the PR is merged. Incorrect references can accidentally close unrelated issues. What to do:
This assessment was generated by an AI model and is informational only.
|
This adds @stdlib/stats/strided/dttest, a one-sample Student's t-test for double-precision strided arrays. Part of #179.
Modeled closely on dztest. Main differences are that sigma is not a parameter since it gets estimated from the data using dmeanvar in a single pass, the CDF is Student's t instead of normal, and the output includes df and mean fields. Minimum N is 2 since you need at least 2 points to estimate variance.
Files included: lib/ndarray.js, lib/dttest.js, lib/main.js, lib/index.js, test/test.js, benchmark/benchmark.js, examples/index.js, docs/repl.txt, docs/types/index.d.ts, README.md
JS only for now. The t/cdf C backend is blocked because betainc has no C implementation yet.
Reference check against R: t.test(c(4,4,6,6,5), mu=0) gives t=11.18034, df=4, p=0.000369. dttest gives statistic=11.180340, df=4, pValue=0.000364.