Sample Size Calculation

On this page

Sample Size Calculation - Sizing Significance

Adequate sample size supports study precision, validity, ethical conduct, and efficient resource use.

Core concepts

  • Population: The entire group of interest.
  • Sample: A subset of the population studied to make inferences about that population.
  • Parameter: A true population value, such as the population mean $\mu$.
  • Statistic: A sample-derived estimate of a population parameter, such as the sample mean $\bar{x}$.
  • Sampling error: The difference between a sample estimate and the true population value that arises by chance. It generally decreases as sample size increases.

Key determinants of sample size

  • Significance level ($\alpha$): Probability of a Type I error. It is commonly set at $\mathbf{0.05}$. A lower $\alpha$ requires a larger sample, all else being equal.
  • Power ($1-\beta$): Probability of rejecting the null hypothesis when a specified true effect exists. Studies commonly target at least $\mathbf{80%}$ power. Here, $\beta$ is the probability of a Type II error.
  • Effect size: The smallest clinically or scientifically important difference to be detected. A smaller target effect requires a larger sample.
  • Variability: Greater outcome variability requires a larger sample. This is represented by the standard deviation or variance for continuous outcomes and by $p(1-p)$ for a proportion.
  • Desired precision: A narrower confidence interval or smaller margin of error requires a larger sample.
ErrorDescriptionSymbolProbabilityImplication for Sample Size
Type IRejecting a true null hypothesis (H₀) (False Positive)$\alpha$$\alpha$Lower $\alpha$ (e.g., $\mathbf{0.01}$ vs $\mathbf{0.05}$) → ↑ sample size
Type IIFailing to reject a false H₀ (False Negative)$\beta$$\beta$Lower $\beta$ (i.e., higher Power $1-\beta$, e.g., $\mathbf{90%}$ vs $\mathbf{80%}$) → ↑ sample size

⭐ Decreasing the significance level from 0.05 to 0.01 or increasing power from 80% to 90% increases the required sample size, all else being equal.

Sample Size Calculation - Formula Frenzy

Estimating a population proportion

For a simple random sample and a large-sample normal approximation:

$n = \dfrac{Z_{1-\alpha/2}^{2}p(1-p)}{d^{2}}$

  • $p$: Expected population proportion.
  • $d$: Desired absolute precision (margin of error).
  • $Z_{1-\alpha/2}$: Standard-normal critical value for a two-sided confidence level.

⭐ If $p$ is unknown, use $p = 0.50$; this maximizes $p(1-p)$ and therefore gives the largest, most conservative sample size for a fixed $d$ and confidence level.

Estimating a population mean

$n = \dfrac{Z_{1-\alpha/2}^{2}\sigma^{2}}{d^{2}}$

  • $\sigma$: Anticipated population standard deviation, usually estimated from prior data or a pilot study.
  • $d$: Desired absolute precision (margin of error).
  • $Z_{1-\alpha/2}$: Standard-normal critical value for a two-sided confidence level.

Comparing two groups

The appropriate formula depends on the outcome type, allocation ratio, and study design. The main inputs are:

  • Significance level $\alpha$ and whether the test is one-sided or two-sided.
  • Desired power $1-\beta$.
  • The smallest clinically important between-group difference.
  • Anticipated variance for means or expected event proportions for binary outcomes.
  • Allocation ratio and any pairing, clustering, or repeated-measures structure.

Direction of effects on sample size

  • Sample size increases as the confidence level, desired power, or outcome variability increases.
  • Sample size increases as the target effect size becomes smaller.
  • Sample size increases as the desired margin of error $d$ becomes smaller.

Common critical values for two-sided confidence intervals

  • 90% confidence interval: $Z = 1.645$
  • 95% confidence interval: $Z = 1.96$
  • 99% confidence interval: $Z = 2.576$ (often rounded to 2.58)
Loading diagram…

Sample Size Calculation - Smart Sizing

  • Finite population correction (FPC): Consider the correction when sampling without replacement from a finite population, especially when the sampling fraction is appreciable (commonly more than 5%). If $n_0$ is the initially calculated sample size and $N$ is the population size: $n_{FPC} = n_0 / (1 + (n_0 - 1)/N)$.

  • Design effect (DEFF): Account for the sampling design relative to simple random sampling: $n_{design} = n_{SRS} * DEFF$. For cluster designs with positive intracluster correlation, $DEFF$ is usually greater than 1, so a larger sample is required. For equal cluster size $m$ and intracluster correlation coefficient $\rho$, a common approximation is $DEFF = 1 + (m - 1)\rho$.

  • Nonresponse or attrition adjustment: Inflate the analyzable sample size using the anticipated loss proportion $L$: $n_{recruited} = n_{required} / (1-L)$. For an anticipated 20% loss, divide the required analyzable sample by 0.80. Round the final value up to the next whole participant.

  • Diagnostic-accuracy studies: Calculate sample size separately for the desired precision of sensitivity and specificity when appropriate. The required total sample also depends on disease prevalence because adequate numbers of participants with and without the target condition are needed. PPV and NPV are prevalence-dependent.

  • Pilot and feasibility studies: Determine sample size from the pilot study's objective, such as assessing recruitment, retention, procedure feasibility, or estimating a parameter with specified precision. A fixed rule such as 10-20% of the main-study sample or 30-50 participants is not universally valid. Pilot estimates of variance or effect size may be imprecise and should be interpreted cautiously when planning the definitive study.

High-Yield Points - ⚡ Biggest Takeaways

  • Required sample size increases with higher power, a higher confidence level, a smaller target effect, greater variability, or a narrower margin of error.
  • Power ($1-\beta$), commonly set at 80% or 90%, is the probability of detecting a specified true effect with the planned statistical test.
  • The significance level ($\alpha$), commonly 0.05, is the probability of a Type I error when the null hypothesis is true.
  • Estimation formulas differ for proportions, which use $p(1-p)$, and means, which use the variance $\sigma^2$.
  • If an expected proportion is unknown, $p = 0.50$ gives the maximum sample size for fixed precision and confidence.
  • Cluster sampling usually requires inflation by a design effect when observations within clusters are positively correlated.
  • Adjust the calculated sample for finite populations, nonresponse or attrition, and the intended sampling or analysis design when applicable.

Unlock the full lesson and continue reading

Signup to continue reading this lesson and unlimited access questions, flashcards, AI notes, and more

Scan to download app

Scan to download
UNLOCK FREE ACCESS

Practice Questions: Sample Size Calculation

  1. 1. Which statement about the box-and-whisker plot is NOT correct?

    • A. Median is approximately 23 mg
    • B. Third quartile is about 36 mg
    • C. 75 % values are above 25 mg
    • D. Distribution is positively skewed
    Show answer

    Answer: C. 75 % values are above 25 mg

    75 % values are above 25 mg is incorrect because the median is approximately 23 mg, so no more than half the observations can exceed 25 mg. Median is approximately 23 mg matches the line inside the box. Third quartile is about 36 mg matches the upper box edge. Distribution is positively skewed is supported by the greater spread above the median, although a boxplot alone does not establish the complete distribution shape.

  2. 2. A random sample of 400 people has a mean intraocular pressure of 25 mm Hg and a standard deviation of 10 mm Hg. What is the approximate 95% confidence interval for the population mean IOP, in mm Hg?

    • A. 22-28
    • B. 23-27
    • C. 21-29
    • D. 24-26
    Show answer

    Answer: D. 24-26

    24-26 - For a 95% confidence interval, use mean ± 1.96 × SEM. The SEM is 10/√400 = 0.5 mm Hg, giving 25 ± 0.98 = 24.02–25.98 mm Hg. - Rounding the calculated limits gives 24–26 mm Hg, so this option correctly represents the confidence interval for the population mean IOP. 22-28 - The standard error is 10/√400 = 0.5 mm Hg, so the 95% margin of error is 1.96 × 0.5 = 0.98 mm Hg, not 3 mm Hg. - A range of 22–28 implies a margin of error of 3 mm Hg, or approximately 6 standard errors, making it far wider than the required 95% confidence interval. 23-27 - Using the 95% confidence coefficient of 1.96 and SEM of 0.5 mm Hg gives 25 ± 0.98, approximately 24–26 mm Hg. - The interval 23–27 has a margin of error of 2 mm Hg, corresponding to four standard errors, so it overestimates the 95% confidence interval. 21-29 - The calculated margin of error is 1.96 × (10/√400) = 0.98 mm Hg, producing an interval approximately from 24.02 to 25.98 mm Hg. - The range 21–29 has a margin of error of 4 mm Hg, or eight standard errors, and is therefore substantially wider than required for 95% confidence.

  3. 3. Based on the provided graph, in which the error bars represent margins of error, what is the order from greatest to least margin of error?

    • A. 3>1>2
    • B. 1=2=3
    • C. 3>2>1
    • D. 1>3>2
    Show answer

    Answer: A. 3>1>2

    3>1>2 is correct because Model 3 has the longest error bar, Model 1 has an intermediate-length error bar, and Model 2 has the shortest. Since the bars represent margins of error, their lengths determine the ranking. 1=2=3 confuses similar point estimates with equal margins of error. 3>2>1 incorrectly places Model 2 ahead of Model 1. 1>3>2 incorrectly places Model 1 ahead of Model 3.

  4. 4. Mean heights are compared among three independent groups of school children. Height is normally distributed within each group, and population variances are equal. Which statistical test is most appropriate?

    • A. Student's t test
    • B. Paired 't' test
    • C. One-way ANOVA
    • D. chi-square test
    Show answer

    Answer: C. One-way ANOVA

    One-way ANOVA is appropriate for comparing mean heights across the three independent groups with normally distributed measurements and equal population variances. Student's t test compares two independent group means rather than all three simultaneously. Paired 't' test compares two related sets of measurements rather than three independent groups. chi-square test compares categorical frequencies rather than mean height.

  5. 5. All of the following are characteristics of a case-control study EXCEPT:

    • A. Provides quick results
    • B. Proceeds from effect to cause
    • C. Requires relatively low expenditure
    • D. Measures incidence rate
    Show answer

    Answer: D. Measures incidence rate

    Measures incidence rate - Because participants are selected according to disease status, case-control studies cannot directly calculate disease incidence rates. - They typically estimate an odds ratio by comparing exposure odds in cases and controls; incidence is measured more directly in cohort studies. Provides quick results - Retrospective design allows investigators to examine previous exposures after identifying disease status, enabling relatively rapid data collection and analysis. - Unlike prospective cohort studies, case-control studies do not require prolonged follow-up to observe outcomes, so results are generally obtained quickly. Proceeds from effect to cause - Case-control studies begin with individuals who have the disease (cases) and comparable individuals without it (controls). - Investigators then assess prior exposures to identify possible causes or risk factors, so the design proceeds from effect to cause. Requires relatively low expenditure - Case-control studies are generally inexpensive because they do not require following a large disease-free population over time. - Avoiding prolonged follow-up, repeated measurements, and extensive participant retention reduces costs compared with cohort studies.

  6. 6. Which of the following statements is true for a left-skewed distribution?

    • A. Median > Mean
    • B. Mean > Mode
    • C. Mean = Median
    • D. Mean > Median
    Show answer

    Answer: A. Median > Mean

    Median > Mean is the expected relationship in the conventional negatively skewed pattern mean Median reverses the expected ordering. Mean > Mode also contradicts the expected ordering and is associated with the conventional positively skewed pattern.

  7. 7. At a prespecified significance level of 0.05, a study reports P = 0.023. Which conclusion about the observed difference is justified?

    • A. Statistically nonsignificant difference
    • B. Clinically important difference
    • C. Proven causal difference
    • D. Statistically significant difference
    Show answer

    Answer: D. Statistically significant difference

    Statistically significant difference is correct because P = 0.023 is below the prespecified α = 0.05, so the null hypothesis is rejected. Statistically nonsignificant difference is incorrect because the P value is below that threshold. Clinically important difference is not established because a P value does not measure clinical importance. Proven causal difference is not established because statistical significance alone does not demonstrate causality.

  8. 8. Which assessment forms Step 2 of the WHO STEPwise approach to surveillance of noncommunicable diseases?

    • A. Biochemical Measurement
    • B. Behavioral measurement
    • C. Physical measurement
    • D. Cardiovascular risk estimation
    Show answer

    Answer: C. Physical measurement

    Physical measurement - Physical measurement is Step 2 of the WHO STEPwise approach, following the collection of behavioral information in Step 1. - It includes blood pressure, height, weight, BMI, and waist circumference to assess physical NCD risk factors. Biochemical Measurement - Biochemical measurement is not Step 2 in the WHO STEPwise approach; it is generally performed in Step 3 using blood or urine samples. - Examples include blood glucose and cholesterol levels, which are biological measurements rather than the physical assessments conducted in Step 2. Behavioral measurement - Behavioral measurement corresponds to Step 1, which gathers self-reported information about lifestyle-related NCD risk factors. - It assesses diet, physical activity, tobacco use, and alcohol consumption rather than the objective physical measurements obtained in Step 2. Cardiovascular risk estimation - Cardiovascular risk estimation combines risk-factor information to estimate future cardiovascular risk; it is not the physical-measurement stage designated Step 2 in WHO STEPS.

  9. 9. Which graphical representation is best suited for depicting continuous quantitative data?

    • A. Bar diagram
    • B. Histogram
    • C. Pie chart
    • D. Pictogram
    Show answer

    Answer: B. Histogram

    Histogram - A histogram is designed to depict the distribution of continuous quantitative data by grouping observations into ranges, or bins, and displaying their frequencies. - Its adjacent bars indicate continuity between successive value intervals, allowing the distribution and frequency across a range to be visualized. Bar diagram - A bar diagram is primarily used to compare discrete categories, rather than display the frequency distribution of continuous measurements across value intervals. - Its separated bars emphasize distinct categories, whereas continuous data are better represented by adjacent intervals showing a continuous range. Pie chart - A pie chart displays the proportions of a whole, making it suitable for showing categorical composition rather than the distribution of continuous measurements. - It does not show frequency across value ranges, so it cannot adequately represent how continuous data are distributed. Pictogram - A pictogram uses images or icons to make simple comparisons between discrete or categorical groups, rather than to display a detailed quantitative distribution. - Its limited precision and detail make it unsuitable for showing frequencies across the continuous intervals of measured data.

  10. 10. In a village, every fifth house was selected for a study. This is an example of

    • A. Simple random sampling
    • B. Convenience sampling
    • C. Systematic random sampling
    • D. Stratified random sampling
    Show answer

    Answer: C. Systematic random sampling

    Systematic random sampling - Systematic random sampling selects units from an ordered sampling frame at a fixed interval, such as every k-th household. - Selecting every fifth house uses a fixed sampling interval of k = 5, which directly identifies this method. Stratified random sampling - Stratified random sampling first divides the population into homogeneous subgroups, or strata, before sampling within each group. - The scenario mentions no subgroup division of village households; it only describes selection at a regular interval. Convenience sampling - Convenience sampling selects participants because they are easily accessible or readily available, without a defined random procedure. - Choosing every fifth house follows a planned sampling interval, rather than relying on accessibility and risking convenience-related bias. Simple random sampling - Simple random sampling gives each population member an equal chance of selection, commonly through random numbers or a lottery. - Selecting households at a predetermined fixed interval is systematic, not simple random sampling from the entire list.

Flashcards: Sample Size Calculation

  1. 1. Statistical power of a test is calculated as

    Show answer

    1-(Type II error)

  2. 2. In a moderately skewed distribution, Mean = (expressed using Median and Mode)

    Show answer

    (3 Median - Mode) / 2

  3. 3. In order to determine a confidence interval of a _____ at a given alpha value, the _____, and _____ are also necessary

    Show answer

    sample mean · standard deviation · sample size

  4. 4. t-test is used to compare two groups of patients for a quantitative variable

    Show answer

    Unpaired/student

  5. 5. The confidence interval is smaller with a sample size.

    Show answer

    larger (larger/smaller)

  6. 6. The is a measure of variability, based on dividing a data set into quartiles

    Show answer

    interquartile range (IQR)

  7. 7. Which indicator is most useful for evaluating the effectiveness of a health program?

    Show answer

    Incidence

  8. 8. What type of distribution is this? _____

    Show answer

    Normal

  9. 9. What type of distribution is this? _____

    Show answer

    Negative/Left

  10. 10. What type of distribution is this? _____

    Show answer

    Positive/Right

Everything you need for Indian Medical PG prep

Get full Oncourse access with lessons, practice questions, flashcards and AI study tools.

GET STARTED FOR FREE
75% OFFLimited time offer
GET 75% OFF