What is the difference of two Chi-square formula, and how can I use them properly? I found two formula for chi-square:
$$\chi^2 = \sum_i ^N \frac{(\text{measured}_i - \text{expected}_i)^2}{\text{variance}}$$
and
$$\chi^2 = \sum_i ^N \frac{(\text{measured}_i - \text{expected}_i)^2}{\text{expected}_i}$$

*

*What is the difference between them?


*How should I handle the case of small variance? (which makes large value of chi-square)
Also, If I don't know the variance, then should I use later one?


*If order of given data is not $\mathcal O(1)$, then chi-square value is extremely low or high. (for second formula)
For example, if the order of data is $10^{-3}$, then chi-square has $10^{-6}$ order.
Then, should I make the order of data become $\mathcal O(1)$?


*If data is given $N$ bins histogram, then DOF is $N-1$?
 A: For Poisson-distributed data such as the number of events in a histogram, the variance and the observed value are the same.  That is, if I measure 1000 events, my uncertainty due to “counting statistics” is $\sqrt{1000}\approx30$.
If you are doing a chi-squared fit to some problem where your uncertainties are not Poissonian, you have to explicitly use the variance.  The whole point of the chi-squared fit is to normalize your data relative to its error bars; you can’t start introducing infinities and negatives if your predicted curve passes through or below zero.
A chi-squared per degree of freedom $\chi^2/\nu\approx 1$ is a hint that your data are a good fit to your model and that you are probably estimating your uncertainties correctly.  A result of $\chi^2 \gg \nu$ suggests that your data don’t follow your model; a result of $\chi^2 \ll \nu$ suggests that your uncertainties are large enough to “fit” any model you like.
Your favorite statistics textbook will have a thoughtful discussion about when to use $N$ versus $N-1$ degrees of freedom.  I prefer to solve this problem by making $N$ large.
