Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I have a data set which is a set of continuous distances from some origin. I originally modeled this as a negative binomial distribution by rounding the data and using it as an input in the Matlab function, nbinfit:

nbReg = nbinfit(round(data));

Using the output from nbinfit, I created the following CDF:

enter image description here

Here are the corresponding QQ Plots enter image description here

Questions

  1. Is it valid to use a negative binomial distribution to model a continuous distribution? Is there any documentation in the literature where negative binomial was used to model continuous data?

  2. It is possible to have a similarly distributed continuous distribution
    (you can remove the x == round(x) condition in nbinpdf to get a continuous distribution)?

  3. The CDF fits very well, but is there a "better" distribution you would recommend?**

share|improve this question
Those don't look like good fits. Plotting a CDF against an EDF is not very revealing: use probability plots instead. – whuber Jul 14 '11 at 15:33
@Whuber, added QQ plots to question – Elpezmuerto Jul 14 '11 at 15:37

1 Answer

up vote 4 down vote accepted

The fit of your approximation is not a great tool for evaluating the choice, since you have thrown out some of the information in the data. The more you do this, the easier it is to find a distribution that fits the data. For example, you could perfectly match the data to a bernoulli distribution if you "rounded" your data to a binary indicator above and below a threshold. Obviously your approximation is not so bad as this, but there is no reason to be rounding at all, as there are many other distributions you could be using, and no obvious connection between distances from an origin and the negative binomial.

For example, if you are looking for a continuous distribution that only has support for positive distances, you could use a lognormal or a gamma (or many others, but those are obvious choices). If you have data with exact zeros (it is hard to tell from the plot and the motivation), you could use a compound poisson-gamma (aka Tweedie with power between 1 and 2).

Without more information about the application, it is hard to give a more detailed answer, since the choice of distribution should reflect the data generating process (at least to the extent possible).

share|improve this answer
+1 A discretized gamma will closely approximate the negative binomial. To find a gamma corresponding to a negative binomial you can match moments, after first adjusting the mean of the gamma by half the bin width and its variance by 1/12 the squared bin width. – whuber Jul 14 '11 at 16:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.