# Test for proportions

1. Dec 16, 2008

### axnman

Test and CI for Two Proportions

Sample X N Sample p
1 3 839 0.003576
2 20 1662 0.012034

Difference = p (1) - p (2)
Estimate for difference: -0.00845801
95% upper bound for difference: -0.00290435
Test for difference = 0 (vs < 0): Z = -2.51 P-Value = 0.006

Fisher's exact test: P-Value = 0.025

Cannot understand how the value for upperbound and z, p value were obtained....Fisher's exact test value too? Was checking answer for a problem...and this is given with no explanatations...could anyone please ellaborate? am trying meanwhile

Thanks

2. Dec 16, 2008

### NoMoreExams

So far I only looked at the upper bound

The following formulas were used

$$\hat{p_{1}} = 0.003575685, \hat{p_{2}} = 0.012033694 \Rightarrow \hat{p_{1}} - \hat{p_{2}} = -0.008458009$$

$$SE_{1} = \sqrt{\frac{\hat{p_{1}} (1 - \hat{p_{1}})}{N_{1}}} = 0.002060729$$

and

$$SE_{2} = \sqrt{\frac{\hat{p_{2}} (1 - \hat{p_{2}})}{N_{2}}} = 0.002674577$$

Therefore

$$SE_{Total} = \sqrt{SE^{2}_{1} + SE^{2}_{2}} = 0.003376383$$

And finally upper CI is

$$\hat{p_{1}} - \hat{p_{2}} + 1.645 \cdot SE_{Total} = -0.002903859$$