Finding quality of fit for two discrete variables with low statistics I have data from an experiment which I am trying to explain using a model. I do not have an analytic formula for the prediction of the model but instead I got its prediction through a simulation. The results look something like this (this here is fictional data but hopefully you get the idea):
$
\begin{array}{c|c|c}
& Experiment & Model \\ \hline
\mbox{Bin 1} & 5 \pm 2& 3 \\
\mbox{Bin 2}&6 \pm 2&7 \\
\mbox{Bin 3 }&2 \pm 1 & 3 \\
\vdots & \vdots & \vdots
\end{array}
$
where the different bins are independent. I'd like to quantify how good the model fits to the data. Chi-squared appears to be the perfect measure if it weren't for the low statistics. 
I'm also aware of the likelihood method but the resources I found online explain the method in the context of a continuous distribution with unknown parameters. I've also read about the Fischer test but I'm not sure where it applicable here.
How can I quantify the quality of fit?
 A: If you're already simulating from a model, you can use still use the chi-squared test. All you have to do is, instead of analytically calculating the null distribution using the (invalid) large-sample approximation, you figure out its distribution by simulating from your model. That is:


*

*Calculate the expected count in each row using your simulations.

*Calculate the $\chi^2$ statistic of your observed data using these expected counts.

*Simulate a bunch more data sets from your model and calculate the $\chi^2$ statistic for each one. This is known as (one kind of) bootstrapping.

*Your p-value is the percentile of the observed $\chi^2$ value among the bootstrapped $\chi^2$ statistics. So if the observed $\chi^2$ is larger than 95% of the simulated ones, then you might reject the hypothesis that the observed data was drawn from your model.
Note that, if your model has high variance and you have low counts, this test may not have very much power, that is, it may not reject even extreme data.
