Manuel B. Garcia

Manuel B. Garcia serves as the Senior Director for Educational Technology and Digital Learning at FEU Institute of Technology, Manila, Philippines. Read More

Contact Info

1607, FEU Tech Building,
P. Paredes St, Sampaloc,
Manila, Philippines
mbgarcia@feutech.edu.ph

Follow Me

Can Generative AI Select the Correct Sample Size Formula?

Generative AI can suggest sample size formulas, but the correct method depends on the research objective, outcome, statistical analysis, and sampling design. Learn how to evaluate formula selection and avoid using familiar equations for inappropriate research questions.

277
AI for Selecting Sample Size Formulas Guide 277 of 1196
01 · The Question

Can AI Choose the Right Sample Size Formula, or Will It Choose the Most Familiar One?

You ask generative AI to calculate the required sample size for your research. It asks for the population size, then recommends a familiar formula involving a confidence level and margin of error.

However, your study is designed to examine whether academic self-efficacy predicts students' intention to use generative AI. You plan to use multiple regression rather than estimate a population proportion.

Why did AI select a survey formula instead of a calculation aligned with your intended analysis?

Sample size formulas are not interchangeable. Each calculation is developed for a particular statistical objective, model, outcome structure, and set of assumptions.

The central question is therefore whether AI can recognize the statistical problem your study actually presents before choosing how many observations are required.

02 · The Short Answer

AI Can Suggest Candidate Formulas, but Formula Selection Requires Statistical Context

In Brief

Generative AI can help researchers identify potentially appropriate sample size formulas by examining the primary research objective, outcome type, statistical test, effect or precision requirements, and study design. However, AI may select a familiar formula based on population size or research keywords without verifying whether its assumptions apply. Researchers must independently establish that the calculation method corresponds to the intended estimand, analytical strategy, and data structure.

The appropriate formula is not determined by the research title or population size alone. It follows from what the researcher needs to estimate or test and the conditions under which the evidence will be collected.

03 · What You Need to Know

How to Evaluate AI-Recommended Sample Size Formulas

Why Are There Different Sample Size Formulas?

Different statistical problems require different quantities of information.

Estimating a population proportion within a specified margin of error is not the same as detecting a difference between two means, estimating a correlation, or testing a regression coefficient.

Each objective has a different sampling distribution, variance structure, and relationship between sample size and uncertainty.

For example, a two-group experiment requires consideration of the allocation ratio and the variability of the outcome, while a descriptive survey may require an anticipated proportion and desired confidence interval width.

AI should identify the statistical objective before recommending a calculation method.

What Information Should Be Established Before Selecting a Formula?

Information Why it matters
Primary research objective Determines whether the study seeks estimation, comparison, prediction, or another form of inference.
Outcome type Distinguishes continuous, binary, count, time-to-event, and other data structures.
Primary estimand or hypothesis Identifies the parameter or effect that the calculation must address.
Planned statistical analysis Determines which statistical model or testing framework is relevant.
Sampling or assignment design Identifies clustering, stratification, repeated measurements, and allocation requirements.
Planning assumptions Provides the effect size, variability, precision, power, or other values required by the calculation.

Without this information, AI may produce a mathematically complete calculation that does not correspond to the intended study.

Which Sample Size Methods Are Commonly Used for Different Research Objectives?

Research objective Common calculation approach Important inputs
Estimate one population proportion Precision-based proportion formula. Confidence level, anticipated proportion, desired margin of error, and sampling design.
Estimate one population mean Precision-based mean formula. Confidence level, anticipated standard deviation, and desired margin of error.
Compare two independent means Power- or precision-based two-group comparison. Target difference, outcome variability, allocation ratio, and relevant statistical criteria.
Compare two proportions Two-proportion power or precision calculation. Anticipated proportions, target difference, allocation ratio, and testing assumptions.
Estimate or test a correlation Correlation-specific precision or power calculation. Target correlation, desired precision or power, and relevant assumptions.
Test a regression effect Model-specific power analysis or simulation. Target coefficient or effect, predictor structure, residual variability, and model assumptions.
Analyze clustered or longitudinal data Design-specific analytical or simulation-based calculation. Cluster structure, correlations, timing, attrition, and intended analysis.

These are methodological categories rather than universal formulas. Each category may contain several valid procedures depending on the exact study design.

What Formula Is Used to Estimate a Population Proportion?

For a conventional large-sample confidence interval for a population proportion under simple random sampling assumptions, a common starting formula is:

Single Proportion Formula

n₀ = Z² × p(1 − p) / e²

Where:

n₀ = initial sample size.

Z = normal critical value for the desired confidence level.

p = anticipated population proportion.

e = desired absolute margin of error.

For a 95% confidence level, p = 0.50, and e = 0.05, the initial result is approximately 384.16, conventionally rounded upward to 385.

The formula may be appropriate for a descriptive prevalence estimate under the stated assumptions.

It is not automatically appropriate for comparing two intervention groups or testing relationships between constructs.

When Is a Finite Population Correction Appropriate?

For a defined finite population sampled without replacement under appropriate probability sampling conditions, a common adjustment is:

Finite Population Adjustment

n = n₀ / [1 + (n₀ − 1) / N]

Where:

n = adjusted sample size.

n₀ = initial sample size.

N = finite population size.

For example, with N = 5,000 and n₀ approximately 384.16, the adjusted result is approximately 357.

However, the correction is not appropriate merely because the researcher knows how many people are enrolled at an institution.

Its use depends on the sampling design and intended population estimate.

AI should explain the justification rather than apply the correction automatically.

What Formula Is Used to Estimate a Population Mean?

For a conventional large-sample precision calculation under independent observations and an anticipated population standard deviation, a common starting expression is:

Single Mean Formula

n₀ = Z² × σ² / e²

Where:

σ = anticipated population standard deviation.

e = desired absolute margin of error for the mean.

The calculation depends on the variability of the outcome and the desired precision.

For example, estimating the average academic self-efficacy score requires an anticipated standard deviation or another defensible planning estimate.

AI should not substitute an arbitrary standard deviation simply because the researcher provides the scale's minimum and maximum possible scores.

Finite population and design adjustments may be necessary depending on the sampling procedure.

What Formula Is Used to Compare Two Independent Means?

For an illustrative two-sided comparison of independent group means with equal allocation, common variance, and a normal-approximation power calculation, a simplified expression is:

Two Independent Means: Approximate Per-Group Sample Size

n ≈ 2(Z₁₋α/₂ + Z₁₋β)²σ² / Δ²

Where:

n = required sample size per group.

α = significance level.

1 − β = desired statistical power.

σ = anticipated common outcome standard deviation.

Δ = target difference between group means.

The expression assumes a particular independent-group comparison and uses a normal approximation. Exact or alternative procedures may produce different requirements.

It should not be applied unchanged to paired measurements, cluster-randomized trials, or other designs with different variance structures.

Researchers should verify whether the planned analysis corresponds to the calculation.

Why Does the Allocation Ratio Matter?

In comparative studies, the number of participants assigned to each condition influences the precision of the estimated difference.

Equal allocation is often statistically efficient for comparing two groups when observations have similar costs and outcome variances.

However, unequal allocation may be justified by ethical, operational, or other design considerations.

A formula assuming equal group sizes may be inappropriate when the planned ratio is 2:1 or another unequal distribution.

AI should therefore request the allocation ratio rather than assume that every experimental study uses equal-sized groups.

What Formula Is Used for Correlation Studies?

Sample-size planning for correlation may involve testing whether a population correlation differs from a specified value or estimating a correlation with desired precision.

Under common bivariate normal assumptions, Fisher's z transformation provides a basis for approximate calculations.

For testing a correlation against zero, an illustrative approximation is:

Correlation Power Approximation

n ≈ 3 + (Z₁₋α/₂ + Z₁₋β)² / [atanh(ρ)]²

Where:

ρ = anticipated population correlation.

atanh(ρ) = Fisher's z transformation of the correlation.

The approximation is not a universal correlation sample-size formula. Its suitability depends on the hypothesis, assumptions, and selected testing procedure.

For example, planning to estimate a correlation within a desired confidence interval width requires a different precision-oriented calculation.

AI should distinguish correlation estimation from hypothesis testing before selecting the method.

Can AI Select a Formula for Multiple Regression?

AI may identify model-specific power or precision methods for regression analysis.

However, multiple regression does not have one universal sample-size formula suitable for every research question.

For example, testing whether a group of predictors explains additional variance may involve an F-test-based power analysis.

Testing one regression coefficient may require assumptions about the predictor's relationship with other covariates and the residual variability of the outcome.

Detecting a small interaction effect may require substantially more information than estimating a larger main effect.

Researchers should specify the primary regression hypothesis rather than request a sample size for multiple regression in general.

Why Are Fixed Respondent-to-Variable Rules Problematic?

AI may recommend collecting five, ten, or twenty participants per predictor or questionnaire item.

Such rules of thumb can be misleading when treated as universal requirements.

For regression, sample adequacy depends on the intended effects, predictor relationships, outcome variability, estimation method, and other assumptions.

For factor analysis and structural equation modeling, the measurement model, factor loadings, communalities, identification, and estimator may substantially affect sample requirements.

Wolf and colleagues (2013) demonstrate through simulation that sample-size requirements in structural equation modeling vary considerably with model characteristics.

AI should therefore avoid presenting a fixed participant-to-item ratio as proof of adequate sample size.

Can AI Select a Formula for Structural Equation Modeling?

AI can explain candidate approaches, including simulation-based sample-size planning.

However, structural equation modeling involves different models, estimation methods, parameters, and inferential objectives.

A model involving a small number of well-measured latent variables may have different requirements from a complex model with weak factor loadings and numerous parameters.

Monte Carlo simulation can be useful when researchers need to evaluate power, precision, convergence, or other performance characteristics under a specified model.

However, simulation results are only as defensible as the assumptions used to generate them.

AI may assist with simulation code, but the model specification and implementation require independent verification.

Can AI Choose a Formula for Cluster-Randomized Studies?

Cluster-randomized studies require attention to the number of independent clusters, cluster sizes, intraclass correlation, allocation, and the intended analytical method.

AI may suggest multiplying an individually randomized sample-size estimate by a design effect.

Such approximations can be useful under particular assumptions, but they are not universally adequate.

For example, a study with only two classrooms cannot be made into a conventionally well-powered cluster-randomized trial simply by recruiting more students within those classrooms.

The number of independent allocation units remains a critical constraint.

Researchers should use a design-specific calculation and verify whether the proposed design effect is appropriate.

Can AI Select a Formula for Repeated-Measures Studies?

Repeated-measures studies require consideration of within-participant correlation, number and timing of measurements, expected missingness, and the planned analytical model.

For example, comparing pretest and posttest scores within participants differs from comparing repeated trajectories across intervention groups.

The two designs may require different calculations because the relevant estimands and variance structures differ.

AI should not assume that adding more measurement occasions automatically reduces the required number of participants.

The benefit of repeated observations depends on their correlation structure and the intended analysis.

What About Qualitative Research?

Qualitative research generally does not use the same sample-size formulas as conventional quantitative estimation or hypothesis testing.

For example, a qualitative interview study may justify its sample through information power, methodological purpose, participant specificity, or an appropriate approach to saturation.

Malterud, Siersma, and Guassora (2016) describe information power as one framework for evaluating sample adequacy in qualitative interview studies.

AI should not select a survey formula for qualitative research merely because the researcher provides the total population size.

The appropriate approach depends on the qualitative tradition and the kind of evidence required.

Can AI Determine the Correct Formula From the Statistical Test Name Alone?

Not always. A statistical test name may leave important details unresolved.

For example, a researcher may state that the analysis will use a t-test without specifying whether the comparison involves independent groups, paired observations, or another structure.

Similarly, regression may refer to different models and hypotheses.

AI should ask clarifying questions about the outcome, estimand, design, and assumptions before selecting a calculation method.

Choosing a formula based only on a familiar statistical term risks matching the wrong calculation to the study.

Can the Same Research Question Have Different Valid Sample Size Calculations?

Yes. Different planning approaches may be defensible when they address different inferential objectives.

For example, a researcher comparing two instructional conditions might plan the sample to achieve a specified statistical power for a meaningful effect.

Alternatively, the researcher might prioritize estimating the intervention effect with a desired confidence interval width.

Both approaches may be appropriate, but they answer different planning questions and may produce different required sample sizes.

Lakens (2022) discusses several approaches to sample size justification, including power analysis, accuracy in parameter estimation, and other considerations.

AI should explain which justification is being used rather than imply that only one formula can ever be correct.

How Can You Verify an AI-Selected Formula?

1. Identify the primary estimand. Specify the parameter or effect the study intends to estimate or test.
2. Confirm the outcome and data structure. Determine whether observations are continuous, binary, paired, clustered, repeated, or otherwise structured.
3. Examine the planned analysis. Establish which statistical model or inferential procedure will address the primary question.
4. Identify candidate calculation methods. Compare formulas or computational approaches that correspond to the objective.
5. Review assumptions. Verify effect sizes, variability, precision, power, allocation, and dependence as applicable.
6. Check design adjustments. Determine whether clustering, finite population correction, attrition, or other modifications are necessary.
7. Reproduce the calculation. Use appropriate statistical software or a transparent computational procedure.
8. Document the rationale. Explain why the selected method is appropriate and what assumptions determine the result.

The correct formula should follow from the statistical problem rather than from the convenience of a familiar equation.

Watch Out

Do not use a sample-size formula merely because it is widely cited, easy to calculate, or commonly recommended by AI. A formula is appropriate only when its statistical objective and assumptions correspond to the actual research design.

04 · A Practical Example

When AI Recommends a Population Proportion Formula for Multiple Regression

Hypothetical Example

Academic Self-Efficacy and Intention to Use Generative AI

A researcher plans a quantitative study examining whether academic self-efficacy predicts students' intention to use generative AI after accounting for selected background characteristics.

The university has approximately 8,000 undergraduate students.

AI recommends calculating the sample size using a 95% confidence level, 5% margin of error, and anticipated population proportion of 0.50.

However, the primary analysis is multiple regression, and the research objective concerns a specified predictor effect.

Planning question AI's initial approach Required consideration
Primary estimand Population proportion. Regression coefficient or incremental explained variance.
Outcome Binary characteristic assumed. Intention score modeled under an appropriate regression framework.
Effect size Not specified. Define the predictor effect of interest.
Predictor structure Not considered. Account for the primary predictor and relevant covariates.
Statistical power Not specified. Establish an appropriate power or precision objective.
Sampling design Assumed simple random sampling. Verify actual recruitment and sampling procedures.

The researcher rejects the proportion formula as the justification for the primary regression analysis.

Instead, the researcher specifies the intended regression hypothesis and considers an appropriate model-specific power or precision calculation.

Relevant inputs may include the minimum predictor effect of interest, residual variability, relationships among predictors, significance level, and desired power.

The decision: The sample-size method is selected according to the intended regression effect, not simply the total number of students at the university.

The researcher then verifies the calculation using appropriate statistical software and documents the assumptions.

The example demonstrates why the formula must follow the statistical objective rather than the most familiar calculation associated with research sampling.

05 · What Researchers Often Get Wrong

Common Mistakes When AI Selects Sample Size Formulas

Misconception

Every Quantitative Study Can Use the Same Survey Formula

Different statistical objectives require different calculations. A population proportion formula does not automatically apply to experiments, correlations, or regression models.

Misconception

The Population Size Determines Which Formula to Use

Formula selection primarily depends on the estimand, outcome, design, and analysis. Population size may matter under particular sampling conditions but is not sufficient by itself.

Misconception

Slovin's Formula Is Appropriate for Every Research Design

A population-size-based shortcut does not automatically address statistical power, effect size, outcome variability, clustering, or complex analytical requirements.

Misconception

Ten Respondents per Predictor or Item Guarantees Adequacy

Fixed ratios do not account for the full set of assumptions and model characteristics affecting precision, power, or estimation performance.

Misconception

Knowing the Statistical Test Name Is Always Enough

The same broad test category may involve different hypotheses, outcome structures, and dependence assumptions. Additional information may be necessary.

Misconception

The Formula Producing the Smallest Sample Is the Best Choice

A smaller result may reflect inappropriate assumptions or a different inferential objective. Formula selection should not be driven by recruitment convenience.

06 · What This Means for You

Identify the Statistical Question Before Asking AI for the Equation

When requesting a sample-size formula, describe the primary outcome, research hypothesis, planned analysis, and sampling or assignment structure.

Ask AI to compare candidate methods and explain the conditions under which each would be appropriate or inappropriate.

A simple decision framework

If the study estimates one population proportion
Consider a precision-based proportion calculation with justified sampling assumptions.
If the study estimates one population mean
Consider a mean-estimation calculation based on anticipated variability and desired precision.
If the study compares experimental conditions
Use a calculation corresponding to the primary contrast, outcome, and allocation structure.
If the study tests a regression or correlation effect
Specify the primary parameter and use a model-appropriate power or precision method.
If the design is clustered, longitudinal, or analytically complex
Consider design-specific analytical methods or simulation rather than a generic formula.

A Prompt for Selecting an Appropriate Sample Size Formula

Example Prompt

"My study examines whether academic self-efficacy predicts university students' intention to use generative AI after adjusting for selected covariates. The primary analysis is multiple linear regression, assuming the outcome and model requirements are appropriate. Identify the relevant sample-size planning approaches for testing the primary predictor effect or estimating it with desired precision. Explain which inputs are required, including the effect of interest, predictor relationships, residual variability, significance level, and power where applicable. Do not recommend a population proportion formula merely because I provide the university's enrollment size. Compare suitable methods, identify missing assumptions, and explain how the final calculation should be independently verified."

After selecting the method, researchers should examine the assumptions required for the calculation and verify that the resulting sample-size estimate is reproducible.

When a formula produces a number that differs substantially from another approach, the researcher should investigate whether the methods address different statistical objectives before deciding which result is appropriate.

The purpose is not to find an equation that produces a convenient sample size, but to identify the calculation that corresponds to the evidence the study requires.

07 · A Quick Checklist

Before Accepting an AI-Selected Sample Size Formula

Before using the formula, check:
Have I specified the primary outcome, estimand, or hypothesis?
Does the calculation method correspond to the intended statistical analysis?
Are the outcome type and data structure compatible with the formula?
Have I identified all required effect size, variability, power, or precision inputs?
Are the formula's statistical assumptions appropriate for the study?
Have I considered unequal allocation, clustering, or repeated observations where relevant?
Is any finite population correction justified by the sampling design?
Have I avoided universal respondent-to-variable or respondent-to-item rules?
Can the calculation be independently reproduced using appropriate software or mathematical procedures?
Can I explain why this method is preferable to plausible alternatives?
08 · Frequently Asked Questions

Frequently Asked Questions About AI and Sample Size Formula Selection

Can ChatGPT select the correct sample size formula?

It can suggest appropriate methods when the research objective and design are clearly specified, but its recommendation requires independent methodological verification.

Is there one sample size formula for all quantitative research?

No. Different outcomes, statistical objectives, comparisons, and sampling structures require different calculation methods.

Can I use Slovin's formula for regression research?

A population-size-based shortcut does not directly address the power or precision requirements of a specified regression effect. A model-appropriate calculation is generally more defensible.

What formula should I use for a descriptive survey?

It depends on whether the primary objective is to estimate a proportion, mean, or another parameter and on the desired precision and sampling design.

What formula should I use for an experimental study?

The calculation should correspond to the primary intervention contrast, outcome type, allocation structure, planned analysis, and justified effect or precision assumptions.

Can I use a sample size formula based only on population size?

Population size alone generally does not provide sufficient information for a defensible calculation. Other design-specific assumptions are usually required.

Is there a universal sample size formula for structural equation modeling?

No. Requirements vary with model structure, identification, estimation, measurement properties, and the inferential objective. Simulation may be useful for complex models.

Can different formulas produce different valid sample sizes?

Yes. Different methods may address distinct objectives, such as hypothesis-testing power or estimation precision. The appropriate choice depends on the study's primary purpose.

09 · The Bottom Line

The Correct Formula Is the One That Answers Your Statistical Question

The Bottom Line

Generative AI can help identify candidate sample size formulas, but selecting the appropriate method requires understanding the primary estimand, outcome, study design, statistical analysis, and planning assumptions. Familiar formulas should not be applied automatically to research questions they were not designed to address.

Use AI to compare calculation methods and clarify their assumptions. The final formula should be chosen because it matches the statistical problem, not because it is easy to use or produces a convenient number of participants.

10 · Sources and Further Reading

Sources and Further Reading

11 · Cite this Guide

How to Cite This Guide

This guide is intended to be read, shared, and used in research, teaching, and academic work. If you draw on its ideas, explanations, or other content, please acknowledge the source by citing the guide. Doing so gives appropriate credit and helps your readers locate the original resource.

Has the Field Guide helped your research?

If a guide helped clarify a question, inform a research decision, or move your work forward, I would love to hear about your experience. Your story may also help other researchers discover the Field Guide.

Share Your Experience
Takes only a few minutes