I have random population sample data that I would like to describe using a distribution. If I plot the estimated kernel density, the data appear positively skewed and using functions in R such as fitdistr and fitdistrplus, it looks like a gamma or log-normal distribution could fit (by QQ plot). I have read the numerous discussions (sometimes in comments so I won't link the questions) that real data is rarely ever well modeled by something so simple as a two-parameter distribution, but I was hoping that it might still be appropriate, if I acknowledge that I accept it as an approximation.

There has also been discussion about distinguishing between a gamma and log-normal distribution. I trust this will not be a duplicate however, because in deciding between the two, I took a suggestion I saw in a comment (the post to which I can no longer find, as I forget what I searched at the time) that if one plots the log transformation of the data, it should flip the skew if gamma and become normal (by definition) if log-normal.

I took multiple 10,000 point samples of my data, fit gamma and log-normal parameters, plotted the original and the log normal. The sample data definitely changes from positive to negative skew, the modeled log-normal looks normal, and the modeled gamma probably switches, but it's very slight. The normality test comes in (much maligned I see) where I thought to try Anderson-Darling on the log-transformed data to suggest that the sample data may be more appropriately described with gamma parameters than log-normal. Resulting p-values for the log transformed data: data sample, 4.7e-5; lognormal, 0.18; gamma 3.6e-22

From the point of view of someone more knowledgeable, is it fair to say that by AD test, log-transformation of the respective datasets indicates that the sample data and the gamma modeled data are not consistent with a normal distribution, while that for the lognormal is not inconsistent with normality, but that it cannot be proven normal? (except, I suppose, by definition of log-normality) And thus provide some (certainly not be all, end all) justification for choosing gamma between the two?

  • $\begingroup$ You don't expect consistency with normality - in fact with such large samples, you expect to reject. Rather than compare p-values (which given you don't think the data are either normal or lognormal, aren't really useful) why not compare the A-D statistics themselves (which at least are a measure of discrepancy)? More generally, I'd stay away from hypothesis testing altogether (it answers the wrong question) and focus more on the underlying question, which seems to be something like "how would I choose between a gamma and lognormal model given neither model is quite appropriate?" ...(ctd) $\endgroup$ – Glen_b Nov 2 '14 at 1:16
  • $\begingroup$ (ctd)... Personally on that question I'd be inclined toward perhaps considering a Bayesian approach, though I might first pursue an even more basic question still (i.e. why are you choosing between those two rather than doing something else? -- what problem does this choice solve that can't be done directly from the ECDF?) $\endgroup$ – Glen_b Nov 2 '14 at 1:16
  • $\begingroup$ hi and thanks for your insights. It was actually your comments to which I was referring, where I have followed your noting that no simple two parameter distribution will model real data. As to why I'm trying to do what I'm doing, really, the ideal would be something you'd advised someone previously who was also trying to model data, in looking instead for some kind of parametric description rather than seeking a distribution. I thought a distribution might work as it's modeling of data that is random sampling and my understanding of statistics is about the level of this kind of approximation $\endgroup$ – JasonD Nov 2 '14 at 10:38
  • $\begingroup$ (ctd) and otherwise not really getting how Bayesian stats work, or how such a parametric model you had suggested might be implemented. Hence my saying that I sort of (horribly) accept it's flawed, but if approximations and shortcomings are acknowledged that it might be ok. The "model" of this random data is to then score test samples, so I can say something about how a test for something of interest relates to the set of all randomly drawn scores generated using simulated data $\endgroup$ – JasonD Nov 2 '14 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.