How to rigorously test if variables are drawn from a certain distribution Say I have a list of numbers $X = \{x_1, x_2, \dots, x_n\}$, and I expect them to be drawn from a certain distribution. For my case it is the Binomial distribution $P(x) = \binom{n}{x}p^x(1-p)^{n-x}$, but I think I general answer would be the most helpful. What is the standard and most rigorous way I could determine if the samples $X$ are from that distribution?
 A: So this doesn't remain unanswered.
1) You can't determine that observations are from a given distribution. 
2) You may sometimes be able to be pretty confident they aren't - and in some circumstances, completely certain of it (e.g. for a binomial, if n=10, none of 11, -5 or 3.4 are even possible, so if you see them, you can reject), but since something that's not binomial may be arbitrarily close to binomial, no test can tell you that they are certainly binomial
Alexis points out the existence of equivalence tests, which could allow you to see whether you have something that's only trivially different ('close enough') from some base case. It might be worth considering these tests, but to my knowledge we don't presently have some nice TOST procedure for our equivalence test for binomialness.
A: Maybe to add some form of more practical answer.
One could use the Kolmogorov–Smirnov test which would quantify the distance between the empirical and the reference distribution.
One problem of the KS test is that you would like not to reject the null that that the samples are drawn from the same distribution. Nevertheless, the KS test is rather widely used in a number of different fields.
I think you could further increase the power of the KS test by transforming the original distribution (see here).
Hope this is helping in a more practical sense.
