= Solution
Under the null hypothesis of independence between treatment and outcome, the expected counts in each treatment row are one half of the column totals:
$$
(10,20,10,10).
$$
The <Pearson chi-squared test of independence> statistic is
$$
\begin{aligned}
X^2
&=2\left(
\frac{(14-10)^2}{10}
+\frac{(21-20)^2}{20}
+\frac{(10-10)^2}{10}
+\frac{(5-10)^2}{10}
\right)\\
&=\boxed{8.30}.
\end{aligned}
$$
The number of <degrees of freedom> is
$$
(2-1)(4-1)=3.
$$
At the 5% level the critical value is $7.81$. Since $8.30>7.81$, we reject the null hypothesis and find statistically significant evidence that the drug and placebo have different effects.
Back to article page