I want to know whether the proportions for two samples are the same.
0-hypothesis: The proportions are the same for both samples Alternative hypothesis: The proportions are different.
I know the sample sizes (200 and 1800) and the proportions (45 % and 40 %).
The problem is that I arrive at different conclusions when I do different kinds of tests.
When calculating confidence intervals (95 %), I arrive at the conclusion that the CI's are overlapping, meaning that I can't reject the 0 hypothesis.
SampleSize1 = 200 SampleSize2 = 1800 SampleOccurrences1 = 90 SampleOccurrences2 = 680 SampleProportion1 = 45 % SampleProportion2 = 38 %
I calculate the confidence interval for each of the samples using Excel:
z = 1.96 StdError = SQRT(SampleProportionX*(1-SampleProportionX)/SampleSizeX) MarginOfError = z * StdError Confidence interval = SampleProportionX +/- MarginOfError
As the confidence intervals are overlapping, I can't reject the 0-hypothesis.
When calculating the Z-value, I arrive at the conclusion that the 0-hypothesis should be rejected.
I calculate the Z-value as follows:
p1 = SampleProportion1 p2 = SampleProportion2 p = (SampleOccurrences1 + SampleOccurrences2) / (SampleSize1 + SampleSize2)
Z = (SampleProportion1 - SampleProportion2) / SQRT(p*(1-p)*(1 / SampleSize1 + 1 / SampleSize2))
As Z > 1.96, I reject the 0-hypothesis.
Why do I get different results, and which test is the correct to use?