Calculation of Pearson's Chi-squared statistic I am having difficulty in how to calculate the Pearson's $\chi^2$ statistic for a contingency table with entries: (3, 0) and (0, 3) (row-wise).
I was studying Agresti's categorical data analysis and found this table. He calculated it as 6.
Through what calculation did he reach this answer?
 A: Here is the procedure to be followed in order to compute Pearson's Chi-squared statistic.

Assume this is your observed 2x2 contingency table:
$$\begin{array}{c|cc|c}
\hline
 X/Y               & \textrm{cat 1}  & \textrm{cat 2}  & \textrm{tot}      \\
\hline
\textrm{cat 1}  & O_{11}          & O_{12}          & O_{1.}\\
\textrm{cat 2}  & O_{21}          & O_{22}          & O_{2.}\\
\hline
\textrm{tot}    & O_{.1}          & O_{.2}          & O_{..}
\end{array}$$


*

*there are $O_{11}$ observations that fall within the first category of $X$ $\underline{\textrm{and}}$ within the first category of $Y$;

*There are $0_{2.}$ observations that fall within the second category of $X$;

*the total sample size is $O_{..}$.
1st step: Compute the expected contingency table
$$\begin{array}{cc}
\hline
E_{11} & E_{12} \\
E_{21} & E_{22}
\end{array}$$
where 
$$E_{ij} = \frac{O_{i.} O_{.j}}{O_{..}} \cdot$$
2nd step Compute Pearson's statistic:
$$\chi^2 = \sum_{ij} \frac{(O_{ij} - E_{ij})^2}{E_{ij}} \cdot$$
