# Testing samples against a distribution

Suppose I have some data sitting in front of me, which is supposed to be sampled from a specific distribution. How would I go about testing whether it is from that distribution?

I've seen several tests which appear to do this - Pearson's chi-squared test, the one-sample Kolmogorov-Smirnov test, and the Anderson-Darling test, to name a few. Which one do I want here? (And if the answer is "it depends", then what does it depend on?)

• I am affraid the answer to this is going to be a looong list of tests, model comparison techniques, goodness of fit tests, graphical tools, ... I believe a QQ plot is a good starting point in the univariate case. Actually, model selection in a more general scenario is one of the open problems in statistics proposed by Michael Jordan (the statistician).
– user10525
Apr 27, 2012 at 16:18

Buja, A., Cook, D. Hofmann, H., Lawrence, M. Lee, E.-K., Swayne,

Which consists of making several plots of data simulated from the null distribution along with the plot of the actual data, then see if someone not familiar with the data can tell which is the real data. This is implemented in the vis.test function in the TeachingDemos package for R or can be easily implemented using other tools.