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.
Best Answer
here's what R's
prop.test
(Test of Equal or Given Proportions) says:So far, I cannot see any reason in your question why $p_{Single}$ cannot be larger than $p_{Married}$.
Obviously, neither did you specify the alternative hypothesis that $p_{Married} > p_{Single}$ beforehand (there'd not be any discussion about it now).
So unless you/your prof can give a hard reason why $p_{Married} \leq p_{Single}$ (like a law that Singles are allowed to enter the group only if they bring each at least one Married who is not yet member into the group), the test should be two-sided.
Deciding for "larger" afterwards just because the observed $p_{Married}$ happens to be a bit larger than the observed $p_{Single}$ at the third digit is cherry-picking.