Gallup runs a variety of opinion polls. In August of 2017 and again in August 2018, they asked survey participants about their feelings on the computer industry. Simplifying the results a bit: in 2017, 59% of those surveyed said they had positive feelings towards the computer industry. But in 2018, that percentage dropped to 45%. Let’s say there were 300 adults surveyed in 2017 and 400 adults surveyed in 2018.
Do you think there is sufficient evidence to say that the proportion of adults who felt positively towards the computer industry decreased between 2017 and 2018?
My solution: I got the error bound interval as (0.0645,0.2155), but how can I answer the above question?
In 2017, you had $x_1= .59(300) = 177$ favorable votes out of $n_1 =300,$ and in 2018 you had $x_2=.48(400) = 180$ favorable votes out of $n_2=400.$
In R, the procedure
prop.testtests $H_0: p_1=p_2$ against $H_a: p_1 \ne p_2$ and provides a 95% confidence interval for $p_1 - p_2,$ as shown below. I declined a continuity correction on account of the relatively large sample sizes.The null hypothesis is rejected at any reasonable significance level on account of the P-value almost $0.$ [The chi-squared statistic $13.445$ is the square of the z-score used in an approximate normal test.]
The CI for the difference in proportions is $(0.066, 0.214).$ This is substantially the same as your result. So you are on a correct track.
The slight discrepancy may be due to the use of a continuity correction or to the method of estimating the standard error of $\hat p_1 - \hat p_2.$
To make a confidence interval, the standard error of the difference $\hat p_1 - \hat p_2$ is found by estimating the variances of $\hat p_i = x_i/n_i$ separately, adding them, and taking the square root. The R procedure for the hypothesis test above uses the same standard error.
Some forms of the hypothesis test use a standard error based on $p = p_1 = p_2,$ according to $H_0,$ and using $\hat p = (x_1+x_2)/(n_1+n_2).$ However, some statisticians say that this 'pooled' method should not be used for making the CI.
Overall, I have seen at least four versions of this test in various authoritative textbooks and popular statistical software programs--depending on whether a continuity correction is used and how the standard error is estimated.