I need some help with calculating the confidence interval for a range of sample sizes and according population sizes. So I have a data frame with 3 columns; 1 column has the country name in it, one column the sample size of a survey that was done in that country, and one column has the population size. I want to iterate through those sample sizes and population sizes and calculate the confidence interval for each sample. Only thing is, I have no idea where to start.
Basically, I want to build something like the 'find confidence interval' calculator (the 2nd one) on this page: http://www.surveysystem.com/sscalc.htm, only thing is I want to pass a list of sample sizes and population sizes. I hope you guys can help! Thank you in advance.