The formula for computing the \(\chi^2\) value is
$$\chi^2 = \sum_{i=1}^2 \sum_{j=1}^k \frac{(A_{ij} - E_{ij})^2}{E_{ij}}$$
\(k =\) number of (no.) classes,
\(A_{ij} =\) no. patterns in the \(i\)th interval, \(j\)th class,
\(R_i =\) no. patterns in the \(j\)th class = \(\sum_{j=1}^k A_{ij}\),
\(C_j =\) no. patterns in the \(j\)the class = \(\sum_{i=1}^2 A_{ij}\),
\(N =\) total no. patterns = \(\sum_{i=1}^2 R_ij\),
\(E_{ij} =\) expected frequency of \(A_{ij} = R_i * C_j /N\).
If either \(R_i\) or \(C_j\) is 0, \(E_{ij}\) is set to 0.1. The degree of freedom of the \(\chi^2\) statistic is on less the number of classes.