Pearson's chi-square statistic for goodness-of-fit in generalized linear models To test the goodness-of-fit in generalized linear models with parameter $\beta$, from a note

Another measure of discrepancy is the generalized Pearson’s chi-square statistic
  $$\sum_{i=1}^m \frac{(y_i − \hat{μ_i})^2}{V(\hat{μ_i})}$$

where $\hat{μ_i} := μ_i(\hat{\beta})$, $\mu_i$ is the mean of $Y_i$ under $x_i$, and $V$ is the variance function of the mean.
But according to Wikipedia, the Pearson’s chi-square statistic seems to be
$$\sum_{i=1}^m \frac{(y_i − \hat{μ_i})^2}{\hat{μ_i}}$$
So why are these two different? Thanks!
 A: The usual expression is goodness of fit (edited in your question). (Strictly, chi-square is a measure of badness of fit as it increases with what R.A. Fisher called the discrepancy between observed and fitted, but "badness of fit" is much rarer as a term, although sometimes used by Joseph B. Kruskal.) 
You have answered your own question if you look carefully. The generalized definition has variance of fitted as denominator: whenever variance of fit is equal to mean fit, the definitions coincide, which corresponds to Poisson variation. 
The standard idea, which is really important, is that chi-square statistics are the sum of terms which each have the flavour (value $-$ mean)$^2$/variance or [(value $-$ mean) / SD]$^2$. 
A: The question can be answered much more easily. See the numerator. It is a squared value (dimension or Power as two). To generate statistics, the denominator must have dimension (power) as two. The statistics is ratio with variance.
Else, if we go with definition with mean as denominator, our statistics will increase indefinitely. 
