I have a (large) array of data points. When plotting the histogram it looks somewhat gamma distributed. Exactly what would be the procedure for testing whenever this is the case, using Julia?

I think I could fit the data to a gamma distribution using `fit_mle`

and then do a hypothesis test whenever the data come from that distribution using `ExactOneSampleKSTest`

. However, if I do this, do I somehow need to take into account that the distribution I am testing against have actually been selected to test the data as well as possible?

Now I tried something like:

```
gd = fit_mle(Gamma,data)
ExactOneSampleKSTest(data, gd)
```

which gives the output

```
WARNING: This test is inaccurate with ties
WARNING: cdf(d::UnivariateDistribution, X::AbstractArray) is deprecated, use cdf.(d, X) instead.
Stacktrace:
[1] depwarn(::String, ::Symbol) at ./deprecated.jl:70
[2] cdf(::Distributions.Gamma{Float64}, ::Array{Float64,1}) at ./deprecated.jl:57
[3] ksstats(::Array{Float64,1}, ::Distributions.Gamma{Float64}) at /home/...
[4] HypothesisTests.ExactOneSampleKSTest(::Array{Float64,1}, ::Distributions.Gamma{Float64}) at /home/...
[5] include_string(::String, ::String) at ./loading.jl:522
[6] execute_request(::ZMQ.Socket, ::IJulia.Msg) at /home/...
[7] (::Compat.#inner#17{Array{Any,1},IJulia.#execute_request,Tuple{ZMQ.Socket,IJulia.Msg}})() at /home/...
[8] eventloop(::ZMQ.Socket) at /home/...
[9] (::IJulia.##14#17)() at ./task.jl:335
while loading In[17], in expression starting on line 2
Exact one sample Kolmogorov-Smirnov test
----------------------------------------
Population details:
parameter of interest: Supremum of CDF differences
value under h_0: 0.0
point estimate: 0.029463211572353598
Test summary:
outcome with 95% confidence: fail to reject h_0
two-sided p-value: 0.7666836151907656
Details:
number of observations: 500
```

(I am able to get *a lot* for observations than 500, I just wanted to make a quick example here)