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")