A. General advice
Why carry out a sample size calculation? Well, typically, researchers will wish to know in advance the minimum sample size that is required for their hypothesis test to show that the main effect they wish to examine (e.g. an association or difference between two variables) is statistically significant. Provided they can estimate in advance the size of the effect they are anticipating, such a calculation will therefore help in optimizing study design. Relatedly, they may wish to estimate a population statistic with a prescribed degree of accuracy and wish to know how large a sample is required to make this possible.
Within the context of hypothesis testing, sample size calculations are based on the notion of statistical power. For a table outlining what this notion means, see Key Learning Tutorial 4. Fundamentals of hypothesis testing.
Before considering performing a Sample Size Calculation, please very carefully read all of the information provided within the Key Learning Tutorial 5. Note on sample size calculations to ensure that you are fully aware of the conditions under which such a calculation makes sense and what estimates you need to be able to provide in order for this calculation to be possible. These resources also provide the answer to some fundamental questions about sample size calculations, including the rationale behind them.
B. Specific sample size calculations
1. Formulae recommended within StatsforMedics via solutions to FAQs
There are a number of formulae which can be used depending on the hypothesis tests assumed and some of these are provided with the solutions to the questions provided within StatsforMedics pages falling under the menu FREQUENTLY ASKED QUESTIONS ON STATISTICAL METHODS FOR PRESENTATION AND ANALYSIS OF DATA (see top menu bar). A quick way of checking whether a formula is available for your particular type of hypothesis test is to simply type a keyword for the name of your test in the StatsforMedics search box and review the content of the pages provided in the list of search returns. Please note also that several of the FAQ solutions are also highlighted in the cases below.
2. Using online calculators
Sometimes it is convenient to do a quick estimate of the required sample size using a web-based calculator. A variety of links for such calculators can be found by scrolling down to ‘Power, Sample Size and Experimental Design Calculations’ at the site Web Pages that Perform Statistical Calculations! Some of the specific cases listed below also rely on online calculators.
3. Preparing for a survey
In qualitative research, if you would like to estimate in advance the required number of interviewees or questionnaire recipients in a survey for your results to reflect those of the target population to a specified level of accuracy, you should find the friendly guide Calculating the Number of Respondents You Need (surveymonkey.com) of great help. To make best use of this resource and for details of a further link to support your needs, please refer to Key Learning Tutorial 5. Note on sample size calculations.
4. Estimating a population proportion
If you are interested in estimating a single population percentage (e.g. percentage who die) using a sample percentage, it is important to understand the concept of margin of error (or, desired precision) and how this, together with your knowledge of the true (or, population) percentage, are relevant to the calculation of minimum required sample size. While the article Sample Size for a Single Proportion provides you with the theory behind a suitable formula for the above calculation, the EpiTools online calculator Sample size to estimate a proportion with specified precision will use this formula to perform the calculation for you .
5. Pearson (linear) correlation coefficient
If you are particularly interested in Pearson Correlation Coefficients, please note that there is a table of approximate minimum sample sizes required for a given level of correlation. This table assumes that you are using a significance level of 0.05 and requires you to identify the level of statistical power you require from inside the table together with the value (r) of the correlation coefficient that you expect to obtain. For example, if you hope to obtain a Pearson Correlation Coefficient of 0.6, assuming a statistical power of 0.80, work your way down the column header ‘0.6’ until you come to 0.82 (which certainly assumes a power of 0.80) and observe that according to the table you will require a minimum sample size, n, of 20.
6. Independent samples t-test
Details of the sample size calculation for comparison of two independent groups using the independent samples t-test can be found in the solution to Q. 8 in the the FAQ section Hypothesis Tests for Comparing Two Groups of Measurement or Ordinal Data
7. Paired samples t-test
The statistical package Minitab is also useful for estimating the required sample sizes in connection with a number of simple statistical tests. For example, if you wish to estimate the required sample size in each group for a paired sample t-test, enter the term Power and sample size commands under the Minitab menu help and then choose the option 1-Sample t (Stat menu). The corresponding resource provides a tab example which guides you through a worked example and another tab how to which guides you through the relevant Minitab commands. Have a look for yourself. In order to estimate the minimum sample size you require, you will require to provide one or more estimates of each of the following items in the first instance:
- the mininum effect size which you hope to detect (in this case, the minimum acceptable difference between the mean of the two groups that you wish to compare)
- the level of required statistical power
- the standard deviation of the differences between the two groups you wish to compare (use the same units of measurement (cm’s, say) as you did for the minimum effect size
- the statistical signficance level (usually 0.01 or 0.05)
If you would like to see a fairly simple mathematical formula for the above sample size calculation together with a related worked example, turn to p. 2 of the Statprimer chapter Sample Size, Precision, and Power and consider the notes to equations (19.1) and (19.2).
8. ANalysis Of VAriance (ANOVA)
If you are performing an ANOVA, you may find the following site of use:
Power Analysis for ANOVA Designs
9. Difference between two proportions
Details of the sample size calculation for a simple difference in proportions may be obtained by referring to the solution to Q. 6 under the FAQ section Hypothesis Tests for Categorical Data.
10. Sensitivity and specificity
Details of sample size calculations for estimating sensitivity and specificity may be obtained by referring to the solution to Q. 6 under the FAQ section Sensitivity, Specificity, Positive and Negative Predictive Values and Receiver Operating Characteristic (ROC) Curves.
11. More general advice on sample size calculations for paired data, including paired binary data*
The abstract for a useful paper on this topic can be found under
The full text of this paper can be accessed at:
Sample Size Calculations by Margaret MacDougall is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.