Step 1
Given information
\(\begin{array}{|c|c|c|}\hline&\text{Yes}&\text{No}&\text{Total}\\\hline\text{Group 1} &710 & 277 & 987\\ \hline\text{Group 2}& 1175 & 323&1498\\\hline \ \text{Total}&1885&600&2485 \\ \hline \end{array}\)
Step 2
Expected value is given by
\(\begin{array}{|c|c|c|}\hline&\text{Yes}&\text{No}\\\hline\text{Group 1} & \frac{1885\times987}{2485}=748.7 & \frac{600\times987}{2485}=238.3 \\ \hline\text{Group 2}&\frac{1885\times1498}{2485}=1136.3 & \frac{600\times1498}{2485}=361.7\\\hline\end{array}\)
Test statistic
\(x^2=\sum \frac{(O_i-E_i)^2}{E_i}\)

\(x^2=\frac{(710-748.7)^2}{748.7}+\frac{(277-238.3)^2}{238.3}+\frac{(1175-1136.3)^2}{1136.3}+\frac{(323-361.7)^2}{361.7}=13.737\)

\(x^2=\frac{(710-748.7)^2}{748.7}+\frac{(277-238.3)^2}{238.3}+\frac{(1175-1136.3)^2}{1136.3}+\frac{(323-361.7)^2}{361.7}=13.737\)