Why do two different population sizes result in nearly equal sample sizes? I have calculated the sample size for two different populations, N1= 29414 and N2= 625 (see code below). Why do I almost get the same sample size n1= 380 and n2= 239. There is not much difference, although the population size is very different...
#z-score (confidence level) 95%
z = 1.96

#Sample proportion)
p = .5

#Margin of error
e = .05

#population size
N1= 29414
N2= 625


# calculate sample size for finite population
Sam= function(z, p, e, N) {
  n = (z^2*p*(1-p)*N)/(z^2*p*(1-p)+N*e^2)
  return(n)
}
Sam(z,p,e,N1)


You learn two things from sampling from a population:

*

*You know the exact answer from the members of the population you sampled (which constrains what the overall population answer can be).

*You learn something about the distribution for the population.

What's the difference between (2) and (1)? Imagine if you were interested about a population, but you could never sample from this population, instead you can get samples from a population with the same properties (but no members of the two populations overlap). You can still get (2) from this second population, but not (1).
On the other hand, the first effect (1) reaches its largest effect, if you sample every member of the population, you know the exact answer for the whole population then.
Now, at some point, once a population is large enough, the first effect (1) becomes almost irrelevant (while it is much more influential for small populations). Then, everything you learn comes from the second effect (2) and for that, the sample size does not really depend on the population size (i.e. you tend towards the limit of an infinite population size).
