I know how to discover the 95% confidence interval, but not 99% I have a sample with 1000 people which 382 agree, 578 disagree and 40 can't decide. I want to find the 99% confidence interval of the proportion of people who agree.
I know how how to discover using R the standard error, and then use it to find the 95% confidence interval. It's just make this calculation: (0.382-2SE,0.382+2SE).
My question is how to find the 99% confidence interval. Do I need R programming or I can do as a simple calculation?
 A: If you choose a significance level $\alpha$, you get a confidence interval with confidence level $1-\alpha$:
$$C_{1-\alpha}=\left(X-z_{1-\frac{\alpha}{2}}\text{se},X+z_{1-\frac{\alpha}{2}}\text{se}\right)$$
where $z_{1-\frac{\alpha}{2}}$ is the $(1-\frac{\alpha}{2})$-quantile of a standard normal variable $Z$.
In your confidence interval, (0.382-2SE,0.382+2SE), that '2' actually is:
> alpha <- 0.05                     # significance level
> qnorm(1-alpha/2)
[1] 1.959964

If you wish a $0.99=1-0.01$ confidence level, you replace '2' with:
> alpha <- 0.01
> qnorm(1-alpha/2)
[1] 2.575829

A: If you are happy with R, you can use the binom.test function. E.g:
binom.test(382, 382+578+40, conf.level= 0.9654)

    Exact binomial test

data:  382 and 382 + 578 + 40
number of successes = 382, number of trials = 1000, p-value = 8.291e-14
alternative hypothesis: true probability of success is not equal to 0.5
96.54 percent confidence interval:
 0.3494766 0.415319
sample estimates:
probability of success 
                 0.382

(although I'm not sure how the 40 undecided should be treated)
