when I want to compare the difference of two percentages, I input the value in the code:
prtesti 1196 273 1549 313, count
the result shows as below:
Two-sample test of proportions x: Number of obs = 1196
y: Number of obs = 1549
------------------------------------------------------------------------------
| Mean Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x | .2282609 .0121363 .2044742 .2520475
y | .2020658 .0102024 .1820694 .2220623
-------------+----------------------------------------------------------------
diff | .026195 .0158549 -.0048801 .0572701
| under Ho: .0157729 1.66 0.097
------------------------------------------------------------------------------
diff = prop(x) - prop(y) z = 1.6608
Ho: diff = 0
Ha: diff < 0 Ha: diff != 0 Ha: diff > 0
Pr(Z < z) = 0.9516 Pr(|Z| > |z|) = 0.0968 Pr(Z > z) = 0.0484
P value is 0.097, >0.05, which means we don't reject Ho. That means there's no difference between two percentages.
But Pr(Z > z) = 0.0484<0.05, which seems that we reject Ho. That means percentage of x is higher than percentage of y.
Please help correct it! Thanks
prtesti 1196 273 1549 313, count
the result shows as below:
Two-sample test of proportions x: Number of obs = 1196
y: Number of obs = 1549
------------------------------------------------------------------------------
| Mean Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x | .2282609 .0121363 .2044742 .2520475
y | .2020658 .0102024 .1820694 .2220623
-------------+----------------------------------------------------------------
diff | .026195 .0158549 -.0048801 .0572701
| under Ho: .0157729 1.66 0.097
------------------------------------------------------------------------------
diff = prop(x) - prop(y) z = 1.6608
Ho: diff = 0
Ha: diff < 0 Ha: diff != 0 Ha: diff > 0
Pr(Z < z) = 0.9516 Pr(|Z| > |z|) = 0.0968 Pr(Z > z) = 0.0484
P value is 0.097, >0.05, which means we don't reject Ho. That means there's no difference between two percentages.
But Pr(Z > z) = 0.0484<0.05, which seems that we reject Ho. That means percentage of x is higher than percentage of y.
Please help correct it! Thanks
Comment