How well the experiment would do in excluding alternative hypothesis? The experiment has $N$ observations $N_i$ which are Poisson Distributed random variables (i.e. we have histogram with $N$ bins. The width of bins is not fixed so I can adjust it  ) . I have two hypothesis.The null hypothesis predicts $\lambda_i^{null}$ values of corresponding parameters of Poisson Distribution, alternative  predicts $\lambda_i^{alt}$. The more data we collect, the better confidence level of excluding of alternative hypothesis we get. But how to calculate this confidence level as a function of size of data we collect? In other words I would like to estimate how many data should I collect to exclude alternative hypothesis at specified confidence level. 
Firstly, I thought about using chi-squared test and calculate the expected value of chi-square i.e. $\left<\chi^2\right>$. But when I tried different width of bins to obtain the optimal binning, I discovered that the less bins we use the better result we get. So I think it's not the optimal test for this task because we don't fully use information from predictions when we have just a few bins.
I would like to know which tests are more appropriate for such problems. 
I would also be grateful for any kind of advice regarding the literature on this subject.
P.S. I've asked the same question at physics.stackexchange, but with some physical details. 
 A: If the $\lambda$ values are smooth and ordered, the chi-square test has very low power for this situation, and as a result the optimal number of bins for the chi-square tends to be surprisingly small; there are numerous papers on this if you want to follow it up.
There are tests with better power.
One approach would be to look at Smooth Tests of Goodness of Fit (see, for example, the book by that title by Rayner and Best); these work by constructing orthogonal polynomials (usually in the log-probability or log-density) with respect to a  probability function or density function as a weight function. (Though it can be done unweighted, as with the original versions of this test, and if there's no suitable set of orthogonal polynomials for the given model, this may be a good choice.)
Incidentally, in the case of a chi-squared test (on all bins), the unweighted smooth test corresponds to partitioning that chi-square into orthogonal components corresponding to the coefficients on the orthogonal polynomials and then taking the lowest-order components of that (yielding a $\chi^2_4$, say, rather than a $\chi^2_{N-1}$).
This can deal with estimation of parameters (e.g. in the case of say the normal, it can encompass estimated mean and variance by omitting the first two orthogonal components).
There's also many many papers on this topic. One reasonable starting point is this:
J. C. W. Rayner and D. J. Best (1990),
"Smooth Tests of Goodness of Fit: An Overview"
International Statistical Review
Vol. 58, No. 1 (Apr.), pp. 9-17  
