Confidence intervals for men and women separately. Let capital letters denote estimates: The point estimates for the proportions
of men and of woman who agree are $0.264$ and $0.323,$ respectively. The
corresponding Wald confidence intervals, based on normal approximation, are
$(0.225, 0.303)$ for men and $(0.288, 0.357)$ for women.
P.m = 132/500; P.m
[1] 0.264
SE.m = sqrt(P.m*(1-P.m)/500); SE.m
[1] 0.01971314
CI.m = P.m + qnorm(c(.025,.975))*SE.m
CI.m
[1] 0.225363 0.302637
P.w = 226/700; P.w
[1] 0.3228571
SE.w = sqrt(P.w*(1-P.w)/700); SE.w
[1] 0.01767243
CI.w = P.w + qnorm(c(.025,.975))*SE.w
CI.w
[1] 0.2882198 0.3574945
The procedure binom.test
in R gives (slightly different) exact binomial
confidence intervals, $(0.226, 0.305)$ for men and $(0.288, 0.359)$ for women, as shown below.
binom.test(132,500)$conf.int
[1] 0.2258560 0.3049604
attr(,"conf.level")
[1] 0.95
binom.test(226,700)$conf.int
[1] 0.2883144 0.3589013
attr(,"conf.level")
[1] 0.95
CI for the difference between men and women.
As in the last section of the table in your question and in @Ben's Answer (+1), the (estimated) standard error for the difference P_w - P_m
is as follows:
SE.d = sqrt(SE.w^2 + SE.m^2); SE.d
[1] 0.02647495
Then a 95% confidence interval for the difference, based on normal approximations,
is (0.0070, 0.1107),$ which is essentially the same
P.w-P.m + qnorm(c(.025,.975))*SE.d
[1] 0.006967198 0.110747087
In R the procedure prop.test
gives the same 95% confidence interval
$(0.0070, 0.1107).$ [This interval is also based on a normal approximation; the continuity correction was declined on account
of the large sample sizes.]
prop.test(c(226,132), c(700,500), cor=F)$conf.int
[1] 0.006967198 0.110747087
attr(,"conf.level")
[1] 0.95
Notice that this 95% confidence interval does not include $0.$
Accordingly, a test the women and men have equally favorable opinions
is rejected at the 5% level (against the two-sided alternative).
The P-value of the (approximate normal) test is $0.028 < 0.05 = 5\%.$
prop.test(c(226,132), c(700,500), cor=F)$p.val
[1] 0.02802182
Best Answer
My original answer that was accepted by OP assumes a two-sample setting. OP's question deals with a one-sample setting. Hence, @Robert Lew's answer is the correct one in this case.
Original answer
Your formulas and calculations are correct.R
s internal function to compare proportions yields the same result (without continuity correction though):