You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Distributions, HypothesisTests
sigma =1/2.0
xi =-0.1
gpd =GeneralizedPareto(0.0, sigma, xi)
X =rand(gpd, 10000)
TestType = OneSampleADTest
test =TestType(X, gpd)
p =pvalue(test)
fig, ax =hist(X; bins =50, normalization =:pdf, label ="pvalue = $(round(p; digits=3))")
xrange =range(0, maximum(X); length =100)
lines!(xrange, pdf.(gpd, xrange); color =:black, label ="analytic")
axislegend(ax)
fig
Irrespectively of the parameters sigma, xi, and the RNG realization, the result is always very high p values. Instead the correct result would have been very low p values, because the data have very high confidence to come from the prescribed distribution. In the MWE the data are literally sampled by the distribution.
I've tried as hypothesis tests: OneSampleADTest, ApproximateOneSampleKSTest, ExactOneSampleKSTest. They all "fail" in the sense of not giving low enough p values.
The text was updated successfully, but these errors were encountered:
Here is a MWE:
Irrespectively of the parameters
sigma, xi
, and the RNG realization, the result is always very high p values. Instead the correct result would have been very low p values, because the data have very high confidence to come from the prescribed distribution. In the MWE the data are literally sampled by the distribution.I've tried as hypothesis tests:
OneSampleADTest, ApproximateOneSampleKSTest, ExactOneSampleKSTest
. They all "fail" in the sense of not giving low enough p values.The text was updated successfully, but these errors were encountered: