0
$\begingroup$

I have some data I suspect is drawn from a Laplace distribution rather than a Gaussian one. I can use the Kolmogrov-Smirnov test and the ability to create Uniform and Gaussian distributions of the desired size to come up with a somewhat reliable test to disqualify that distribution as Guassian with p=0.001. How can I do a similar exercise to disqualify the distribution as Laplace?

My guess is that values (for these samples) away from the mean decay at an exponential rate. I would like to validate (or invalidate) that hypothesis.

My current code looks something like the following.

import scipy.stats as sct
    reference_dist = sct.uniform(loc = self.f_min, scale = self.f_max-self.f_min)
    ks_D_stat, p = sct.kstest(self.fa, reference_dist.cdf)
    if 0.001 < p:
        self.categorize(f"    {ks_D_stat = :.8} {p = :.8} uniform distribution\n")
    elif 20 <= self.fa.size:
        chi, p = sct.normaltest(self.fa)
        if 0.001 < p:
            self.categorize(f"    {chi = :.8} {p = :.8} Gaussian (Normal) distribution\n")
$\endgroup$
3
  • $\begingroup$ Hi @Chris. I don't know a specific Py package for this. I suspect survival style packages are typically well-used for distribution identification. $\endgroup$
    – EB3112
    Commented Oct 30, 2023 at 9:53
  • $\begingroup$ Thanks, that helps direct my search. $\endgroup$ Commented Oct 30, 2023 at 10:06
  • $\begingroup$ Questions solely about how software works are off-topic here, but you may have a real statistical question buried here. You may want to edit your question to clarify the underlying statistical issue. You may find that when you understand the statistical concepts involved, the software-specific elements are self-evident or at least easy to get from the documentation. $\endgroup$ Commented Nov 6, 2023 at 12:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.