STAT1003 – Statistical Techniques
Dr. Emi Tanaka
Australian National University
These slides are best viewed on a modern browser like Google Chrome on a desktop or laptop. Some interactive components may require some time to fully load.
There is a new blood thinner drug that is believed to improve the survival rate of patients who underwent cardiopulmonary resuscitation (CPR) for a heart attack. Does the new drug improve the survival rate?
| Group | Survived | Died | Total |
|---|---|---|---|
| Treatment | 11 | 39 | 50 |
| Control | 14 | 26 | 40 |
| Total | 25 | 65 | 90 |
\[\class{highlight mark-yellow}{\hat{p}_1 - \hat{p}_2 \sim N\left(p_1 - p_2, \sqrt{\frac{p_1(1-p_1)}{n_1} + \frac{p_2(1-p_2)}{n_2}}\right)}\]
\[\class{highlight mark-yellow}{\hat{p}_{1} - \hat{p}_{2} \pm z_{\alpha / 2} \sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_{1}} + \frac{\hat{p}_2(1-\hat{p}_2)}{n_{2}}}}\]
| Group | Survived | Died | Total |
|---|---|---|---|
| Treatment | 11 | 39 | 50 |
| Control | 14 | 26 | 40 |
| Total | 25 | 65 | 90 |
A 90% confidence interval for \(p_1 - p_2\) is given by:
\[\frac{11}{50} - \frac{14}{40} \pm z_{0.05} \sqrt{\frac{\frac{11}{50}(1-\frac{11}{50})}{50} + \frac{\frac{14}{40}(1-\frac{14}{40})}{40}} = (-0.2871, 0.0271).\]
where \(z_{0.05} \approx 1.645\).
\(H_0: p_1 = p_2\)
\[\class{highlight mark-yellow}{Z = \dfrac{\hat{p}_{1} - \hat{p}_{2}}{\sqrt{\hat{p}_{p}(1-\hat{p}_{p})(\frac{1}{n_{1}} + \frac{1}{n_{2}})}}} \sim N(0, 1) \text{ under } H_0\]
where \(\hat{p}_p = \dfrac{X_1 + X_2}{n_1 + n_2}\) is the pooled sample proportion.
where \(z^* = \dfrac{\frac{x_1}{n_1} - \frac{x_2}{n_2}}{\sqrt{\frac{x_1 + x_2}{n_1 + n_2}\left(1-\frac{x_1 + x_2}{n_1 + n_2}\right)\left(\frac{1}{n_{1}} + \frac{1}{n_{2}}\right)}}\).
\[\begin{align*} z^* &= \dfrac{\frac{11}{50} - \frac{14}{40}}{\sqrt{\frac{11 + 14}{50 + 40}\left(1-\frac{11 + 14}{50 + 40}\right)\left(\frac{1}{50} + \frac{1}{40}\right)}}\\ &= -1.37 \end{align*}\]
P-value \(= P(Z \geq -1.37) \approx 0.9147\).
Since P-value \(> 0.05\), there is no evidence to support the claim that the new drug improves the survival rate.
A quadcopter company is considering a new manufacturer for rotor blades. The new manufacturer would be more expensive, but they claim their higher-quality blades are more reliable, with at least 3% more blades passing inspection than their competitor. Is there evidence to support the claim?
\(H_0: p_1 = p_2\)
\[n_1\hat{p}_1 \geq 10, n_1(1-\hat{p}_1) \geq 10, n_2\hat{p}_2 \geq 10\text{, and }n_2(1-\hat{p}_2) \geq 10\]
Confidence interval for \(\mu_1 - \mu_2\)
\[\hat{p}_{1} - \hat{p}_{2} \pm z_{\alpha / 2} \sqrt{\frac{\hat{p}_1(1-\hat{p}_1)}{n_{1}} + \frac{\hat{p}_2(1-\hat{p}_2)}{n_{2}}}\]
\(\hat{p}_1 = \dfrac{X_1}{n_1}\), \(\hat{p}_2 = \dfrac{X_2}{n_2}\) and \(\hat{p}_p = \dfrac{X_1 + X_2}{n_1 + n_2}\)
Test statistic under \(H_0: p_1 = p_2\)
\[Z = \dfrac{\hat{p}_{1} - \hat{p}_{2}}{\sqrt{\hat{p}_{p}(1-\hat{p}_{p})(\frac{1}{n_{1}} + \frac{1}{n_{2}})}} \sim N(0, 1)\]
P-value:
| \(H_A\) | P-value |
|---|---|
| \(H_A: p_1 \neq p_2\) | \(P(|Z| \geq |z^*|)\) |
| \(H_A: p_1 > p_2\) | \(P(Z \geq z^*)\) |
| \(H_A: p_1 < p_2\) | \(P(Z \leq z^*)\) |

STAT1003 – Statistical Techniques