You can check the article by R V Krejcie and D W Morgan, 1970: Determining Samle Size for Research Activities.Education and Psychological Meaurement,30,607- 610
The appropriate equation for determining sample size depends on the specific research or experimental design, the objectives of the study, and the statistical methods being used. There is no one-size-fits-all equation for sample size calculation. Here are some common methods and equations used for sample size determination in different scenarios:
1. **Margin of Error (MOE) and Confidence Interval for Proportions**:
- For estimating proportions or percentages with a certain level of confidence, you can use the formula for sample size:
\[n = \frac{Z^2 * p * (1-p)}{E^2}\]
Where:
- \(n\) = required sample size
- \(Z\) = Z-score corresponding to the desired confidence level
- \(p\) = estimated proportion
- \(E\) = margin of error (desired precision)
2. **Margin of Error and Confidence Interval for Means**:
- For estimating population means with a certain level of confidence, you can use the formula:
\[n = \frac{Z^2 * σ^2}{E^2}\]
Where:
- \(n\) = required sample size
- \(Z\) = Z-score for the desired confidence level
- \(σ\) = estimated population standard deviation
- \(E\) = margin of error (desired precision)
3. **Simple Random Sampling**:
- When using simple random sampling, you can calculate sample size as:
4. **Power and Effect Size for Hypothesis Testing**:
- In the context of hypothesis testing, sample size can be calculated to achieve a desired statistical power and effect size. The formula can be complex and depends on the specific statistical test (e.g., t-test, ANOVA) and the software or tables you are using.
5. **Complex Survey Sampling**:
- When dealing with complex survey designs, sample size calculation becomes more involved and may require software or specialized knowledge of survey sampling methods.
6. **Non-Parametric Methods**:
- Sample size determination for non-parametric tests (e.g., Wilcoxon-Mann-Whitney test) may involve different equations based on the nature of the data and the specific test.
The appropriate equation or method will depend on the specific details of your research, including the research question, the type of data, the desired level of confidence or power, and the statistical test you plan to use. Additionally, sample size should be determined while considering practical constraints such as budget and time.
As Mark said, it depends on various specifics. Basically there are methods based on probability of selection, the simplest being simple random sampling, and there are methods based on models, generally regression models, also called "prediction." There are also model-assisted randomized methods (or model-assisted design-based approaches). There are many variants. But generally they assume that bias is under control, and you just want to calculate what sample size, under your conditions, will hold variance below some desirable level. This also depends on inherent variability. (Please research the difference between standard deviation and standard error.)
I found it interesting that although a simple model-based ("prediction-based" - but not forecasting) method that is helpful in Official Statistics where sample surveys and census surveys are repeated to monitor markets, and simple random sampling are very different theoretically, I obtained a formula for the former that is in the same format as what W.G. Cochran developed for the latter in his book, Sampling Techniques, 3rd ed, 1977, Wiley, in Chapter 4. See Knaub, J.R., Jr. (2013), “Projected Variance for the Model-Based Classical Ratio Estimator: Estimating Sample Size Requirements,” JSM Proceedings, Survey Research Methods Section, American Statistical Association, pp. 2885-2889, https://www.researchgate.net/publication/261947825_Projected_Variance_for_the_Model-based_Classical_Ratio_Estimator_Estimating_Sample_Size_Requirements
Note that stratification is often a good way to increase efficiency. If you are only interested in overall results (not those from each stratum), it can be used to reduce sample size.
If you search the internet on specific terms of interest, and include "Pennsylvania State University" in your search, you may find that they have helpful material available online for you on statistics.