Appropriate test for exponential data?

I have a set of univariate data (n=1000) that I believe to be exponentially distributed. I also have a separate, but inexact, prior estimation for the mean or parameter of the distribution I expect the data to follow; that estimate is roughly normally distributed. I am looking for an appropriate goodness of fit test:

  1. to check if the data does indeed follow an exponential distribution (with any parameter)
  2. to check if the mean/"parameter" of the distribution of the data is consistent with the prior estimate for the mean.

I'm not really a statistician, but I've heard a Kolmogorov-Smirnov test might be the closest thing to what I'm looking for, if I have a specific distribution in mind. However I think I'm looking for something a little more nuanced than that. Is there a better approach here?

If it helps, I'm running my code in Python, so if anyone knows of a particularly good implementation it would also be much appreciated. Thanks!

1 comments · 66% upvoted · other discussions

comments

efrique

The Kolmogorov-Smirnov is a test for a fully specified distribution; here you haven't specified the parameter.

There are a host of specific tests for the one and two-parameter (location-scale) exponentials, including one related to the Kolmogorov-Smirnov (the Lilliefors test for an exponential). e.g. see the book by D'Agostino and Stephens, though there are other tests than the ones listed there.

The problem with goodness of fit tests is that they are usually the wrong tool for what people tend to use them for (the question people are getting an answer to, we already know the answer to, and the question people really need an answer to, it doesn't really help much with).

The result of that mismatch between choice of tool and their needs is that people are often led into doing the wrong thing -- avoiding an exponential model when it's perfectly adequate for the purpose, or using it when it's not.

[A warning: If you're using the same data to select a model (e.g. exponential vs something else) that you use for later estimation / inference, the properties of that subsequent calculation are impacted by that model selection.]