Confidence interval of the proportion in case of 0 I am trying to estimate the (say 95%) confidence interval of a proportion.
For instance, I want to estimate how many students will take a particular course next year. There are N1 students in total. I asked randomly N2 students, and N3 students say yes. I estimate the proportion is N3/N2.
I tried to estimate the confidence interval as:

Source: https://openstax.org/books/introductory-business-statistics/pages/8-3-a-confidence-interval-for-a-population-proportion
However, if p' is 0 or 1, how could I calculate the standard deviation because it will become 0, regardless of the sample size?
 A: Here is an excerpt from Biostatistical Methods 

One then desires a one sided confidence interval of size $1-\alpha$ of the form $(0, \hat{\pi}_u$) where the upper confidence limit satisfies the relation $\hat{\pi}_u=\pi : B(0,\pi,n)=\alpha$, the ":" meaning "such that".  Solving for $\pi$ yields $$\hat{\pi}_u = 1-\alpha^{1/n}$$

When you have 0 successes in $n$ samples, your 95% confidence interval is $(0, 1-0.05^{1/n}$).
A: First, you should apply the finite population correction factor (FPCF) to the standard deviation of for a small mean or proportion if your sample is in excess of 5% of the parent population. The FPCF is given by:
${FPCF =\sqrt{\frac{(N-1)}{(N-n)}}}$
Reference: See Example 7.1 (click Answer).
Now, if all N2 students said no, then N2/N1 is the proportion of students who are not intending to take the course. Construct a two-sided confidence interval (per my provided source) including the FPCF center at the sample mean. 
Now, the count below the mean may (or more likely not) actually attend with probability specified by the confidence interval conditional on other factors (in essence, closer to an upper limit). For example, other available courses meeting an elective for graduation, limit on class sizes in popular courses, and required credit load that a student must carry. These constraints could, in essence, force students to select from available courses, including the one in question, for which there was no prior intent.
