ExactOneSampleKSTest rejects hypothesis incorrectly
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.
I'm having the same issue with ApproximateTwoSampleKSTest and continuous distributions, where scipy.stats.kstest gives the correct answer.
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?
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?
@simonbyrne You approved https://github.com/JuliaStats/HypothesisTests.jl/pull/29 ten years ago. ;-) Do you have any idea what may be going on?