I created a problem where I am having my students complete a hypothesis test and confidence interval for proportions to highlight the connection between the two. However, in doing the problem I am getting conflicting results.
With a random sample of n = 300, X = 235, and a confidence level of 99%, I obtained the following CI for the population proportion p: ( 0.72207 , 0.8446 ). I used the TI-84 calculator to get this interval and I checked using various online calculators as well. They all agreed with the interval.
The problem is set up such that the null hypothesis is Ho: p = 0.72 and the alternative hypothesis is Ha: p =/= 0.72. I am using a 1% significance level. Using the TI-84 calculator, I got a test statistic of Z = 2.443 and a P-value of 0.0145 (being 2(0.0072)). Because this P-value exceeds 0.01, I would fail to reject Ho. However, my null value of 0.72 is not within my 99% confidence interval. It is my understanding that the hypothesis test and the confidence interval must always agree as long as I have a two tailed test and the significance level and confidence level sum to 1.
Does anyone see where the contradiction occurs? Thanks much!