An article in the British Medical Journal ["Comparison of Treatment of Renal Calculi by Operative Surgery, Percutaneous Nephrolithomy, and Extra-Corporeal Shock Wave Lithotrips" (1986, Vol. 292, pp. 879-882)] repeated that percutaneous nephrolithotomy (PN) had a success rate in removing kidney stones of $289$ of $350$ patients. The traditional method was $78\%$ effective. Is there evidence that the success rate for PN is greater than the historical success rate at a $5\%$ level?
Answer: Reject $H_0$.
This is the Exercise 9-95 from (Douglas Montgomery, "Applied Statistics and probability for Engineers", 6ed)
My attempt:
$\hat p=\frac{289}{300}\\x=289\\n=350\\\alpha=0.05\\p=0.78$
$\begin{cases} H_0:p=0.78\\ H_1:p>0,78 \end{cases}$
Critical region: $z_{0.005} = 1.64$
$z_0=\frac{x-np}{\sqrt{np(1-p)}}=\frac{289-350\times0.78}{\sqrt{350\times0.78\times0.22}}=0.15$
$z_0=\frac{\hat p - p}{\sqrt{\frac{p(1-p)}{n}}}=\frac{0.83-0.78}{\sqrt{\frac{0.78\times0.22}{350}}}=2.26$
I've tried to solve using the two different definitions of the test statistics for population proportions but the results are different. What i did wrong?
Your approaches are both right. But you have miscalculated at the first one.
$$z_0=\frac{289-350\times0.78}{\sqrt{350\times0.78\times0.22}}\approx 2.065$$
See here the result of the calculator. The result is still different from your second approach. This comes from the rounding of $\frac{289}{350}=0.825714...$. If you use the fraction the result is
$$z_0=\frac{\frac{289}{350}-0.78}{\sqrt{\frac{0.78\times0.22}{350}}}\approx 2.065$$
Check the calculator again. So we reject the $H_0$, since $2.065>1.64$