'How do I determine the likelihood of my data coming from a model distribution using Julia?

I am trying to do a statistical analysis in Julia on experimental data. I tried to create a model and use Turing to obtain distributions for the mean and standard deviation. However, I am unsure of what to do after this to judge the fit of my data to these distributions. Apologies if this is trivial, I am new to coding and new to statistics so any explanation is appreciated.

@model function normal_fit(data,index)
    μ ~ Uniform(0,triple_max_pink_values[index])
    σ ~ Uniform(0,std_double_pink[index])
    data ~ MvNormal(Fill(μ,length(data)),σ)
end

function distr_det(data)
    index=1;
    model1 = normal_fit(data,index)
    chain = Turing.sample(model1,NUTS(0.65),1000)
    plot(chain)
end


Solution 1:[1]

You can compare various distributions for fit with

using Distributions
fit_mle(D, data)

where D is one of: Bernoulli, Beta, Binomial, Categorical, DiscreteUniform, Exponential, LogNormal, Normal, Gamma, Geometric, Laplace, Pareto, Poisson, Rayleigh, InverseGaussian, Uniform, Weibull

See the Distributions.jl docs at https://juliastats.org/Distributions.jl/stable/fit/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bill