install.packages("pwrss")
library(pwrss)Challenge: Many Ways to Find the Sample Size
Metin Bulus
2026-09-15
Installing and loading the {pwrss} package in R:
| Effect Size Category | Cohen’s d Range |
|---|---|
| Very Small Effect | d < 0.20 |
| Small Effect | 0.20 ≤ d < 0.50 |
| Medium Effect | 0.50 ≤ d < 0.80 |
| Large Effect | d ≥ 0.80 |
In the calculations below, 0.35 will be used for a SMALL effect size (which lies between 0.20 and 0.50), and 0.65 for a MEDIUM effect size (which lies between 0.50 and 0.80). Standardized regression coefficients, R-squared values, and eta-squared values should be obtained from these values using conversion formulas.
Assume balanced allocation, α = 0.05, power = 0.80, and a two‑tailed test.
1 Posttest-Only Control Group Design
| Group | Randomization | Pretest Measured | Treatment Applied | Posttest Measured |
|---|---|---|---|---|
| Experimental | ✓ | — | ✓ | ✓ |
| Control | ✓ | — | — | ✓ |
1.1 t Test Approach
Using the t test approach, a total of at least 260 participants are required to detect a SMALL effect, and a total of at least 78 participants are required to detect a MEDIUM effect.
Find out how:
If the expected or minimum meaningful effect can be characterized as SMALL:
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Student's T-Test (Independent Samples)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : d - null.d = 0
H1 (Alternative) : d - null.d != 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (d) = 0.350 (vs. null.d = 0)
Sample Size = 130 and 130 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.197
Statistical Power = 0.803
If the expected or minimum meaningful effect can be characterized as MEDIUM:
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Student's T-Test (Independent Samples)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : d - null.d = 0
H1 (Alternative) : d - null.d != 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (d) = 0.650 (vs. null.d = 0)
Sample Size = 39 and 39 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.191
Statistical Power = 0.809
1.2 Regression Approach
1.2.1 Regression Omnibus F Test
Using the regression omnibus F test, at least 259 participants are required to detect a SMALL effect, and at least 77 participants are required to detect a MEDIUM effect.
Find out how:
If the expected or minimum meaningful effect can be characterized as SMALL:
[1] 0.02971498
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Linear Regression (F-Test) - Fixed Predictors
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : R-squared = 0
H1 (Alternative) : R-squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (R-squared) = 0.030
Sample Size = 259 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.199
Statistical Power = 0.801
If the expected or minimum meaningful effect can be characterized as MEDIUM:
[1] 0.0955342
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Linear Regression (F-Test) - Fixed Predictors
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : R-squared = 0
H1 (Alternative) : R-squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (R-squared) = 0.096
Sample Size = 77 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.196
Statistical Power = 0.804
1.2.2 Regression Coefficient t Test
Using the regression coefficient t test, at least 259 participants are required to detect a SMALL effect, and at least 77 participants are required to detect a MEDIUM effect.
Find out how:
If the expected or minimum meaningful effect can be characterized as SMALL:
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Linear Regression Coefficient (T-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : beta - null.beta = 0
H1 (Alternative) : beta - null.beta != 0
----------------------------------------------------
Results
----------------------------------------------------
Target Effect (Std. beta) = 0.175
Sample Size = 259 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.199
Statistical Power = 0.801
If the expected or minimum meaningful effect can be characterized as MEDIUM:
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Linear Regression Coefficient (T-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : beta - null.beta = 0
H1 (Alternative) : beta - null.beta != 0
----------------------------------------------------
Results
----------------------------------------------------
Target Effect (Std. beta) = 0.325
Sample Size = 77 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.196
Statistical Power = 0.804
1.3 ANCOVA Approach
Using the ANCOVA approach, at least 260 participants are required to detect a SMALL effect, and at least 78 participants are required to detect a MEDIUM effect.
Find out how:
If the expected or minimum meaningful effect can be characterized as SMALL:
[1] 0.02971498
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
One-Way Analysis of Variance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.030
Total Sample Size = 260 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.197
Statistical Power = 0.803
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
One-Way Analysis of Covariance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.030
Total Sample Size = 260 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.197
Statistical Power = 0.803
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
One-Way Analysis of Covariance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.030
Total Sample Size = 260 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.199
Statistical Power = 0.801
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Single Contrast Analysis (T-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : psi = 0
H1 (Alternative) : psi != 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (d) = 0.350
Total Sample Size = 260 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.199
Statistical Power = 0.801
If the expected or minimum meaningful effect can be characterized as MEDIUM:
[1] 0.0955342
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
One-Way Analysis of Variance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.096
Total Sample Size = 78 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.191
Statistical Power = 0.809
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
One-Way Analysis of Covariance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.096
Total Sample Size = 78 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.191
Statistical Power = 0.809
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
One-Way Analysis of Covariance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.094
Total Sample Size = 78 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.196
Statistical Power = 0.804
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Single Contrast Analysis (T-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : psi = 0
H1 (Alternative) : psi != 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (d) = 0.650
Total Sample Size = 78 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.196
Statistical Power = 0.804
1.4 Repeated-Measures ANOVA Approach
Using the repeated-measures ANOVA approach, at least 260 participants are required to detect a SMALL effect, and at least 78 participants are required to detect a MEDIUM effect.
Find out how:
If the expected or minimum meaningful effect can be characterized as SMALL:
[1] 0.02971498
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Analysis of Variance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.030
Total Sample Size = 260 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.197
Statistical Power = 0.803
If the expected or minimum meaningful effect can be characterized as MEDIUM:
[1] 0.0955342
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Analysis of Variance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.096
Total Sample Size = 78 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.191
Statistical Power = 0.809
Bonus question: Why do regression approaches differ by a unit?
2 Pretest–Posttest Control Group Design
| Group | Randomization | Pretest Measured | Treatment Applied | Posttest Measured |
|---|---|---|---|---|
| Experimental | ✓ | ✓ | ✓ | ✓ |
| Control | ✓ | ✓ | — | ✓ |
Treatment and pretest explains 50% of the variance in the posttest.
2.1 Regression Approach
2.1.1 Regression Omnibus F Test
Using the regression omnibus F test, at least 131 participants are required to detect a SMALL effect, and at least 40 participants are required to detect a MEDIUM effect.
Find out how:
If the expected or minimum meaningful effect can be characterized as SMALL:
[1] 0.05771496
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Hierarchical Linear Regression (F-Test) - Fixed Pred
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : Change in R-squared = 0
H1 (Alternative) : Change in R-squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (R-squared) = 0.058
Sample Size = 131 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.197
Statistical Power = 0.803
If the expected or minimum meaningful effect can be characterized as MEDIUM:
[1] 0.1744066
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Hierarchical Linear Regression (F-Test) - Fixed Pred
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : Change in R-squared = 0
H1 (Alternative) : Change in R-squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (R-squared) = 0.174
Sample Size = 40 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.192
Statistical Power = 0.808
2.1.2 Regression Coefficient t Test
Using the regression coefficient t test, at least 131 participants are required to detect a SMALL effect, and at least 40 participants are required to detect a MEDIUM effect.
Find out how:
If the expected or minimum meaningful effect can be characterized as SMALL:
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Linear Regression Coefficient (T-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : beta - null.beta = 0
H1 (Alternative) : beta - null.beta != 0
----------------------------------------------------
Results
----------------------------------------------------
Target Effect (Std. beta) = 0.175
Sample Size = 131 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.197
Statistical Power = 0.803
If the expected or minimum meaningful effect can be characterized as MEDIUM:
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Linear Regression Coefficient (T-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : beta - null.beta = 0
H1 (Alternative) : beta - null.beta != 0
----------------------------------------------------
Results
----------------------------------------------------
Target Effect (Std. beta) = 0.325
Sample Size = 40 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.192
Statistical Power = 0.808
2.2 ANCOVA Approach
Using the ANCOVA approach, at least 132 participants are required to detect a SMALL effect, and at least 40 participants are required to detect a MEDIUM effect.
Find out how:
If the expected or minimum meaningful effect can be characterized as SMALL:
[1] 0.05771496
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
One-Way Analysis of Covariance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.058
Total Sample Size = 132 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.194
Statistical Power = 0.806
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
One-Way Analysis of Covariance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.058
Total Sample Size = 132 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.194
Statistical Power = 0.806
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
One-Way Analysis of Covariance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.057
Total Sample Size = 132 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.197
Statistical Power = 0.803
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Single Contrast Analysis (T-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : psi = 0
H1 (Alternative) : psi != 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (d) = 0.495
Total Sample Size = 132 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.197
Statistical Power = 0.803
If the expected or minimum meaningful effect can be characterized as MEDIUM:
[1] 0.1744066
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
One-Way Analysis of Covariance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.174
Total Sample Size = 40 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.192
Statistical Power = 0.808
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
One-Way Analysis of Covariance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.174
Total Sample Size = 40 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.192
Statistical Power = 0.808
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
One-Way Analysis of Covariance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.171
Total Sample Size = 42 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.182
Statistical Power = 0.818
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Single Contrast Analysis (T-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : psi = 0
H1 (Alternative) : psi != 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (d) = 0.919
Total Sample Size = 42 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.182
Statistical Power = 0.818
2.3 Repeated-Measures ANOVA Approach
Using the repeated-measures ANOVA approach, at least 132 participants are required to detect a SMALL effect, and at least 40 participants are required to detect a MEDIUM effect.
Find out how:
If the expected or minimum meaningful effect can be characterized as SMALL:
[1] 0.05771496
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Mixed-Effects Analysis of Variance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.058
Total Sample Size = 132 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.194
Statistical Power = 0.806
If the expected or minimum meaningful effect can be characterized as MEDIUM:
[1] 0.1744066
+--------------------------------------------------+
| SAMPLE SIZE CALCULATION |
+--------------------------------------------------+
Mixed-Effects Analysis of Variance (F-Test)
----------------------------------------------------
Hypotheses
----------------------------------------------------
H0 (Null) : eta.squared = 0
H1 (Alternative) : eta.squared > 0
----------------------------------------------------
Results
----------------------------------------------------
Effect Size (eta-squared) = 0.174
Total Sample Size = 40 <<
Type 1 Error (alpha) = 0.050
Type 2 Error (beta) = 0.191
Statistical Power = 0.809
References
Bulus, M., & Jentschke, S. (2026). pwrss: Statistical Power, Sample Size, and Detectable Effect Calculations. R package version 1.2.0. https://doi.org/10.32614/CRAN.package.pwrss
Bulus, M., & Polat, C. (2023). pwrss R paketi ile istatistiksel guc analizi [Statistical power analysis with pwrss R package]. Ahi Evran Universitesi Kirsehir Egitim Fakultesi Dergisi, 24(3), 2207-2328. https://doi.org/10.29299/kefad.1209913
Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum Associates.
Keppel, G., & Wickens, T. D. (2004). Design and analysis: A researcher’s handbook (4th ed.). Pearson.
Shieh, G. (2020). Power analysis and sample size planning in ANCOVA designs. Psychometrika, 85(1), 101-120. https://doi.org/10.1007/s11336-019-09692-3
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License