Skip to content
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

ExactOneSampleKSTest rejects hypothesis incorrectly #280

Open
GHTaarn opened this issue Nov 10, 2022 · 3 comments
Open

ExactOneSampleKSTest rejects hypothesis incorrectly #280

GHTaarn opened this issue Nov 10, 2022 · 3 comments

Comments

@GHTaarn
Copy link

GHTaarn commented Nov 10, 2022

The following code results in h_0 being rejected even though the sample was carefully chosen to match the distribution:

using HypothesisTests, Distributions
n = 50
x = 0.5 .^ (1:n)
d = DiscreteNonParametric(1:n, x ./ sum(x))
sample = vcat(ones(Int64,16), 2*ones(Int64,8), 3*ones(Int64,4), 4,4,5)
display(ExactOneSampleKSTest(sample, d))

In https://discourse.julialang.org/t/komolgorov-smirnov-test/89990/6 a person also found a big difference between results obtained with ApproximateTwoSampleKSTest and those obtained with scipy stats.

@jtackm
Copy link

jtackm commented Feb 15, 2023

I'm having the same issue with ApproximateTwoSampleKSTest and continuous distributions, where scipy.stats.kstest gives the correct answer.

@johnabs
Copy link

johnabs commented Jul 2, 2023

Hey, I posted on this too a while back, I see a pretty big difference between this package and what I get out of R...anybody have any clue which one is right?

@johnabs
Copy link

johnabs commented Jul 2, 2023

Also, I just compared the test statistic values to R and Mathematica (which are in agreement), and this package produces results which differ. What's the deal?

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

No branches or pull requests

3 participants