I have the following problem: two groups A and B.
The proportions of married and single are ($p_1$) and ($p_2$) respectively, and the standard deviations ($s_1$) and ($s_2$). The sample consists of ($n_1$) A and ($n_2$) B observations.
Now I want to test whether the proportions are equal. I use the following formula to compute the z-statistic:
z = $abs(p_1 - p_2) / \sqrt{ \frac{p_1(1-p_1)}{n_1} + \frac{p_2(1-p_2)}{n_2} }$
and test the hypothesis: h0: $p_1 \neq p_2$
An alternative approach I tried is to estimate the t-value based on the standard deviations (hence just comparing means), that is by the formula (assuming unequal variances):
t = $abs(p_1-p_2)/\sqrt{ s_1^2/n_1 + s_2^2/n_2 }$
My question are:
- do you agree with my approach or;
- should it be two-sided or one-sided?
Thank you.