I have the following 2x2 table

                NO     YES
                9690   5    LOW
                26354  39   HIGH

I want to

  1. plot the proportions and their exact confidence intervals in two bar
  2. plots test if the proportion YES in LOW differs significantly from the proportion YES in high (2 sided test.


I used the binconf funtion, Hmisc package in R to compute the exact condidence intervals


PointEstimate of proportion: 0.0005157298

CI.LOWER BOUND: 0.0002203084

CI.UPPER BOUND: 0.001206817


PointEstimate of proportion: 0.001477665

CI.LOWER BOUND: 0.0009812456

CI.UPPER BOUND: 0.002224666

These confidence intervals overlap.


I used the fisher.test function in R to do an exact test on the proportions


p-value = 0.01716 --> significant

How can it be that if the confidence intervals overlap so strongly, the p-value is still significant.

Thanks in advance for any help.

Yours sincerely, Martin Rijlaarsdam

@whuber: thanks for pointing me to this answer. I have seen this thread but I was wondering if such a big mismatch between CI and significance of the test is to be expected and if the answer holds for proportions as well. Thanks. Best wishes, Martin

  • $\begingroup$ Dear whuber, I have edited the question to make more clear what my specific issue is. Best wishes, Martin $\endgroup$ – Martin Mar 26 '14 at 15:36
  • $\begingroup$ What do you mean by "big mismatch"? It is strange that you are using 99% confidence intervals (which would correspond to 99.5% confidence limits on either side), yet you declare a p-value of 1.7% = 100-98.3% to be "significant." This inconsistency casts doubt on what you are really asking. $\endgroup$ – whuber Mar 26 '14 at 15:44
  • $\begingroup$ Sorry for the confusion. I have edited the question to resemble a 95% CI still, the upper bound of the lowest proportion (0.05%, UB=0.12%) lies above the lower bound of the lower bound of the highest proportion (0.1%, LB=.098%). So the issue remains. $\endgroup$ – Martin Mar 26 '14 at 15:50
  • $\begingroup$ Thank your for the cross link and I apologize for not finding this myself. I assume the same story holds for proportions then? And in light of your comments on that question, would you advise not to show the CIs, but just the results of testing the proportions? $\endgroup$ – Martin Mar 26 '14 at 15:58
  • $\begingroup$ Both are useful: they address different questions. The test of proportions evaluates whether the data indicate a difference in proportions of yeses between the low and high groups. The CIs provide intervals in which the true proportions are likely to lie. You should consider including estimates of those proportions in your summary. $\endgroup$ – whuber Mar 26 '14 at 16:26