Skip to content

Impliment ntdist pdfs.#201

Open
oscardssmith wants to merge 2 commits intoJuliaStats:masterfrom
oscardssmith:os/ntdist
Open

Impliment ntdist pdfs.#201
oscardssmith wants to merge 2 commits intoJuliaStats:masterfrom
oscardssmith:os/ntdist

Conversation

@oscardssmith
Copy link
Contributor

This fails tests because this implementation is more accurate than the Rmath version (confirmed via wolframalpha and bigfloats). What should we do here when we are testing against an incorrect implementation?

@devmotion
Copy link
Member

I'd suggest relaxing the tolerances for the problematic cases (but only those), and additionally adding tests for the problematic cases against a more accurate reference (e.g. using hardcoded values from WA).

@tpapp
Copy link
Contributor

tpapp commented Feb 12, 2026

Since there is no numerical approximation in this implementation per se, I would suggest testing against a table, exported from any software you prefer, with reasonable tolerances, since you are just testing that you coded the formula correctly.

(In the long run I would prefer transitioning to this approach instead of comparing to Rmath)

@oscardssmith
Copy link
Contributor Author

How about comparing with 1e-8 tolerances to Rmath (to ensure that the shape is about right) and a stricter tolerance check against the BigFloat implementation (if available) One major benefit of pure Julia implementations is that many of them handle BigFloat arguments without any problem.

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.

3 participants