I have no solid background in statistics so please bear with me. In general, I am trying to figure out methods to determine sample sizes required to establish a certain level of confidence for a population (e.g. out of 1000 computers, how many do I need to sample to be sure that the rest has the same properties with a certain level of confidence?).
There are online calculators for "sample sizes", often using the Cochran's (below) formula. But I am unsure whether that is valid for this purposes as basically no quality control book uses that, quoting ANSI sampling tables instead.
$$\text{Sample Size} = \frac{n}{1 + (n/\text{population})}$$ in which $n$ is equal to $Z * Z [P (1-P)/(D*D)]$ (using a 95% confidence and $5\%$ margin of error and $p = 0.5$) which gives me sample size $323$.
This formula tells me that for a population of 2000, I need to sample 323 (CL 95% and 5% margin of error). Is it valid for any sampling where I expect random distribution? Because my related question (Determine required sample size with unknown standard deviation) got quite complicated answers/comments for me so I suspect this is not gonna work..just do not know why.