Skip to content

ExactOneSampleKSTest rejects hypothesis incorrectly #280

@GHTaarn

Description

@GHTaarn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions