Skip to content

p-values for T-test are not accurate enough #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
estebanz01 opened this issue Oct 30, 2017 · 2 comments
Closed

p-values for T-test are not accurate enough #13

estebanz01 opened this issue Oct 30, 2017 · 2 comments
Assignees
Labels

Comments

@estebanz01
Copy link
Owner

I found while building the paired t-test that the p-values (1 - P(x <= X)) calculated using the Student's T distribution are behind of the expected value. A couple of test shows a difference of two decimal values from the expected one:

I traced this back to the way how ruby handles the decimal points. The calculated ones by minitab or R are different than the ones calculated by Ruby itself.

I'm logging this as a bug, but it's not related to the code itself (😅). I'm logging it for future references.

@estebanz01
Copy link
Owner Author

Due to a monkeypatch made by the descriptive_statistics gem, I was seeing a stacktrace pointing to ruby classes instead of the real issue. I tried to do more detailed debugging process and I found out that the problem is in the variance calculation (see: thirtysixthspan/descriptive_statistics#43) So, this bug can be fixed! 😃 🎉

@estebanz01
Copy link
Owner Author

Fixed in #19

@estebanz01 estebanz01 moved this to Done in Statistics Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

1 participant