Epidemiological Calculators and Study Design

Comprehensive reference guide for epidemiological methods and study designs.

Quick answer

Epidemiological Calculators and Study Design in DataStatPro helps researchers understand the method, choose appropriate assumptions and outputs, and connect the analysis to publication-ready reporting. Comprehensive reference guide for epidemiological methods and study designs.

Epidemiological Calculators and Study Design: Zero to Hero Tutorial

This comprehensive tutorial takes you from the foundational ideas of epidemiology through study design, 2x2 tables, measures of association, diagnostic test performance, outbreak investigation, standardization, screening evaluation, sample size planning, interpretation, and practical use within DataStatPro. Whether you are encountering epidemiological calculations for the first time or need a rigorous workflow for public health, clinical, or field investigations, this guide builds the concepts step by step from the ground up.


Table of Contents

  1. Prerequisites and Background Concepts
  2. What Are Epidemiological Calculators?
  3. Study Design Foundations
  4. The Mathematics Behind Epidemiological Measures
  5. Assumptions, Bias, and Confounding
  6. Choosing the Right Epidemiological Calculator
  7. Using the Epidemiological Calculator Components
  8. Measures of Association
  9. Clinical Decision Measures
  10. Diagnostic Test Evaluation
  11. Outbreak Investigation
  12. Standardization of Rates
  13. Screening Program Evaluation
  14. Sample Size Calculations for Epidemiological Studies
  15. Advanced Topics
  16. Worked Examples
  17. Common Mistakes and How to Avoid Them
  18. Troubleshooting
  19. Quick Reference Cheat Sheet

1. Prerequisites and Background Concepts

Before using epidemiological calculators, it is helpful to understand the basic language of population health research. The goal is not just to compute a number, but to connect that number to the design, population, time frame, and decision it supports.

1.1 Populations, Samples, and Person-Time

A population is the group about which you want to make a public health or clinical statement. A sample is the observed subset. Epidemiology often adds a third idea: person-time, the accumulated time during which participants are at risk for an event.

Examples:

QuantityMeaningExample
PopulationFull target groupAdults in a city during 2026
SampleObserved subset1,500 surveyed adults
Person-timeTime under observation4,820 person-years
EventOutcome occurrenceNew diabetes diagnosis
ExposureRisk factor or interventionSmoking, vaccine, air pollution

The denominator matters. A rate per 100,000 person-years answers a different question from a risk over 12 months.

1.2 Incidence, Prevalence, Risk, Odds, and Rate

Incidence proportion, often called risk, is the proportion of initially at-risk people who develop the outcome during a defined period:

Risk=new cases during periodpeople at risk at startRisk = \frac{\text{new cases during period}}{\text{people at risk at start}}

Incidence rate uses person-time:

Rate=new cases during periodperson-time at riskRate = \frac{\text{new cases during period}}{\text{person-time at risk}}

Prevalence is the proportion of a population with the condition at a point or during a period:

Prevalence=existing casestotal populationPrevalence = \frac{\text{existing cases}}{\text{total population}}

Odds compare the probability that an event occurs with the probability that it does not occur:

Odds=p1pOdds = \frac{p}{1-p}

Risk and odds are close when the outcome is rare, but they diverge as outcomes become common. This distinction is central when interpreting odds ratios.

1.3 Exposure, Outcome, and Time Order

Most epidemiological questions have this structure:

Does exposure EE change the occurrence of outcome DD in population PP during time TT?

Time order is essential. If the exposure must precede the outcome to be causal, a study that measures both at the same moment may estimate association but cannot establish temporality.

1.4 The 2x2 Table

Many epidemiological calculators begin with a 2x2 table. The meaning of the cells depends on the design, but the structure is constant:

Outcome +Outcome -Total
Exposure +aba + b
Exposure -cdc + d
Totala + cb + dn

For diagnostic tests, the same layout is usually written as:

Disease +Disease -Total
Test +TPFPTP+FP
Test -FNTNFN+TN
TotalTP+FNFP+TNn

1.5 Confidence Intervals and Practical Meaning

Epidemiological estimates should almost always be reported with confidence intervals. A point estimate alone can be misleading because it hides precision.

Interpret confidence intervals in three layers:

  1. Direction: Is the estimate above, below, or equal to the null value?
  2. Precision: Is the interval narrow enough to support a useful conclusion?
  3. Public health meaning: Are the plausible values important in practice?

For ratios, the null value is 1. For differences, the null value is 0.


2. What Are Epidemiological Calculators?

2.1 The Core Idea

Epidemiological calculators translate counts, risks, rates, and diagnostic test results into interpretable population health measures. They help answer questions such as:

  • Is an exposure associated with disease?
  • How large is the excess risk?
  • How many cases could be attributed to a risk factor?
  • How accurate is a diagnostic or screening test?
  • How should rates be compared across populations with different age structures?
  • How large should a study be to detect a clinically meaningful effect?

The calculation is only useful when it matches the design. A case-control study usually supports an odds ratio, while a cohort study can directly estimate risk, risk difference, and risk ratio.

2.2 When to Use Epidemiological Calculators

Use these calculators when your data involve:

  • Binary exposure and binary outcome variables.
  • Counts of disease by exposure group.
  • Diagnostic test results against a reference standard.
  • Outbreak counts by subgroup, time, place, or exposure.
  • Population rates requiring age or risk adjustment.
  • Screening program performance and yield.
  • Study planning for proportions, risks, or case-control comparisons.

2.3 The Main Calculator Families in DataStatPro

Calculator familyPrimary questionTypical outputs
Association measuresIs exposure related to outcome?OR, RR, RD, attributable risk
Diagnostic Test PerformanceHow well does a test classify disease?Sensitivity, specificity, PPV, NPV, LR+, LR-
Outbreak InvestigationWhere is disease concentrated?Attack rates, risk ratios, source clues
StandardizationAre rates comparable after adjustment?Age-adjusted rates, SMR, expected cases
Screening ProgramIs screening useful and efficient?Yield, false positives, predictive values, cost metrics
Sample size planningHow many participants are needed?Required n, power-related inputs

2.4 Statistical Significance vs. Epidemiological Importance

A small relative risk may be important when the exposure is common or the disease is severe. A large relative risk may have limited public health impact if the exposure is rare. Always interpret both relative and absolute measures.

Report together whenever possible:

  1. A relative measure such as OR, RR, or HR.
  2. An absolute measure such as risk difference or excess rate.
  3. A confidence interval.
  4. The study design and denominator.
  5. A plain-language interpretation tied to the population.

3. Study Design Foundations

3.1 Case-Control Studies

A case-control study starts with disease status and looks backward to compare exposure history among cases and controls.

Design characteristics:

  • Retrospective in logic, even when data are collected prospectively.
  • Efficient for rare diseases and long latency periods.
  • Can evaluate multiple exposures for one outcome.
  • Usually cannot estimate incidence directly.
  • The primary measure is typically the odds ratio.

Case-control table:

CasesControlsTotal
Exposedaba + b
Unexposedcdc + d
Totala + cb + dn

Use a case-control design when the outcome is uncommon, follow-up would be slow or expensive, or historical exposure reconstruction is feasible.

3.2 Cohort Studies

A cohort study starts with exposure status and follows exposed and unexposed groups to observe outcomes.

Design characteristics:

  • Can be prospective, retrospective, or ambidirectional.
  • Establishes exposure before outcome.
  • Can estimate incidence, risk ratio, risk difference, and rates.
  • Good for rare exposures and multiple outcomes.
  • May be expensive or slow for rare diseases.

Cohort table:

Disease +Disease -Total
Exposedaba + b
Unexposedcdc + d

3.3 Cross-Sectional Studies

A cross-sectional study measures exposure and outcome at one point in time or over a short defined window.

Design characteristics:

  • Estimates prevalence.
  • Useful for burden assessment and hypothesis generation.
  • Usually cannot determine whether exposure preceded outcome.
  • Can be quick and relatively inexpensive.
  • Often reports prevalence ratio or prevalence odds ratio.

3.4 Randomized and Quasi-Experimental Designs

Randomized trials assign the intervention by design and are usually stronger for causal inference than observational studies. Quasi-experimental designs, such as before-after or difference-in-differences studies, estimate effects when randomization is not possible.

These designs may still use epidemiological measures such as absolute risk reduction, number needed to treat, or incidence rate ratios.

3.5 Study Design Selection Guide

Research situationPrefer this designMain measure
Rare diseaseCase-controlOdds ratio
Rare exposureCohortRisk ratio or rate ratio
Disease burden nowCross-sectionalPrevalence
Intervention benefitTrial or cohortRisk difference, RR, NNT
Diagnostic accuracyDiagnostic accuracy studySensitivity, specificity, LR
Suspected foodborne outbreakOutbreak cohort or case-controlAttack rate, RR, OR
Comparing regions with different agesStandardizationAdjusted rate, SMR

4. The Mathematics Behind Epidemiological Measures

4.1 Odds Ratio

The odds ratio (OR) compares the odds of disease among exposed people with the odds of disease among unexposed people, or the odds of exposure among cases with the odds of exposure among controls.

OR=a×db×cOR = \frac{a \times d}{b \times c}

For case-control studies, the OR is usually the natural measure because sampling is based on disease status.

Confidence interval:

CI=exp[ln(OR)±zα/21a+1b+1c+1d]CI = \exp\left[\ln(OR) \pm z_{\alpha/2}\sqrt{\frac{1}{a} + \frac{1}{b} + \frac{1}{c} + \frac{1}{d}}\right]

Interpretation:

  • OR = 1: no association.
  • OR > 1: exposure is associated with higher odds of disease.
  • OR < 1: exposure is associated with lower odds of disease.

4.2 Relative Risk

The relative risk (RR), also called the risk ratio, compares risk in the exposed group with risk in the unexposed group.

RR=a/(a+b)c/(c+d)RR = \frac{a/(a+b)}{c/(c+d)}

Confidence interval:

CI=exp[ln(RR)±zα/21a1a+b+1c1c+d]CI = \exp\left[\ln(RR) \pm z_{\alpha/2}\sqrt{\frac{1}{a} - \frac{1}{a+b} + \frac{1}{c} - \frac{1}{c+d}}\right]

Interpretation:

  • RR = 1: no risk difference between groups.
  • RR > 1: higher risk in the exposed group.
  • RR < 1: lower risk in the exposed group.

4.3 Risk Difference

The risk difference (RD), also called the absolute risk difference, subtracts risk in the unexposed group from risk in the exposed group.

RD=aa+bcc+d=IeIuRD = \frac{a}{a+b} - \frac{c}{c+d} = I_e - I_u

Confidence interval:

CI=RD±zα/2a×b(a+b)3+c×d(c+d)3CI = RD \pm z_{\alpha/2}\sqrt{\frac{a \times b}{(a+b)^3} + \frac{c \times d}{(c+d)^3}}

Interpretation:

  • RD = 0: no absolute risk difference.
  • RD > 0: excess risk among exposed people.
  • RD < 0: reduced risk among exposed people.

4.4 Attributable Risk and Attributable Fraction

Attributable risk (AR) is the excess risk among exposed people:

AR=IeIu=RDAR = I_e - I_u = RD

Attributable risk percent (AR%) estimates the proportion of cases among exposed people attributable to the exposure, assuming the association is causal:

AR%=IeIuIe×100%=RR1RR×100%AR\% = \frac{I_e - I_u}{I_e} \times 100\% = \frac{RR - 1}{RR} \times 100\%

4.5 Population Attributable Risk

Population attributable risk (PAR) estimates the excess incidence in the total population attributable to the exposure:

PAR=ItIuPAR = I_t - I_u

Where ItI_t is incidence in the total population.

Population attributable risk percent (PAR%):

PAR%=ItIuIt×100%PAR\% = \frac{I_t - I_u}{I_t} \times 100\%

When the exposure prevalence PeP_e and risk ratio are known:

PAR%=Pe(RR1)1+Pe(RR1)×100%PAR\% = \frac{P_e(RR - 1)}{1 + P_e(RR - 1)} \times 100\%

4.6 Prevented Fraction

For protective exposures where RR<1RR < 1, the prevented fraction estimates the proportion of expected cases prevented among exposed people:

PF=IuIeIu=1RRPF = \frac{I_u - I_e}{I_u} = 1 - RR

4.7 Rates and Rate Ratios

When follow-up time differs, use rates:

Incidence Rate=new eventsperson-timeIncidence\ Rate = \frac{\text{new events}}{\text{person-time}}

The rate ratio compares rates:

Rate Ratio=RateeRateuRate\ Ratio = \frac{Rate_e}{Rate_u}

Use rates when participants enter and leave follow-up at different times, follow-up is censored, or disease recurrence can occur.


5. Assumptions, Bias, and Confounding

5.1 Assumptions Behind 2x2 Measures

Most simple epidemiological measures assume:

  • Clear exposure and outcome definitions.
  • Comparable groups except for exposure, or adjustment for key differences.
  • Independent observations.
  • Correct classification of exposure and outcome.
  • A meaningful time window for risk or rate estimation.
  • Sufficient cell counts for large-sample confidence intervals.

5.2 Selection Bias

Selection bias occurs when inclusion in the study is related to both exposure and outcome. Examples include:

  • Hospital-based controls that do not represent the exposure distribution.
  • Loss to follow-up that differs by exposure and risk.
  • Healthy worker effects when employed populations are compared with the general population.

5.3 Information Bias

Information bias occurs when exposure or outcome information is measured incorrectly.

Common forms:

  • Recall bias in retrospective exposure assessment.
  • Interviewer bias during data collection.
  • Non-differential misclassification that often biases estimates toward the null.
  • Differential misclassification that can bias in either direction.

5.4 Confounding

A confounder is associated with both exposure and outcome and is not on the causal pathway between them. For example, age may confound the association between physical activity and cardiovascular disease.

Confounding can be handled by:

  • Restriction.
  • Matching.
  • Randomization.
  • Stratified analysis.
  • Multivariable regression.
  • Standardization.

5.5 Mantel-Haenszel Stratified Analysis

When a confounder is categorical, stratified analysis can combine stratum-specific estimates.

Mantel-Haenszel odds ratio:

ORMH=iaidiniibiciniOR_{MH} = \frac{\sum_i \frac{a_i d_i}{n_i}}{\sum_i \frac{b_i c_i}{n_i}}

Mantel-Haenszel test statistic:

χMH2=(iaiiE(ai))2iVar(ai)\chi^2_{MH} = \frac{(\sum_i a_i - \sum_i E(a_i))^2}{\sum_i Var(a_i)}

5.6 Assumption Summary Table

IssueWhy it mattersWhat to check
TemporalityCausal exposure must occur before outcomeStudy design and dates
Cell countsSparse cells destabilize ratiosAny cell equal to 0 or very small
IndependenceDuplicated or clustered records distort SEsRepeated records, households, clinics
ConfoundingCrude association may be misleadingKnown risk factors
MisclassificationWrong exposure/outcome labels bias estimatesCase definitions, test validity
DenominatorRisk, rate, and prevalence use different basesPopulation at risk and time frame

6. Choosing the Right Epidemiological Calculator

6.1 Decision Flowchart

Start
 |
 |-- Do you have test results against disease status?
 |      |-- Yes --> Diagnostic Test Performance
 |
 |-- Are you evaluating a screening workflow or program yield?
 |      |-- Yes --> Screening Program
 |
 |-- Are you investigating cases clustered by time, place, or exposure?
 |      |-- Yes --> Outbreak Investigation
 |
 |-- Are you comparing rates across populations with different age structures?
 |      |-- Yes --> Standardization
 |
 |-- Do you have exposure and outcome counts in a 2x2 table?
 |      |-- Case-control --> Odds Ratio
 |      |-- Cohort/trial --> RR, RD, ARR, NNT/NNH
 |      |-- Cross-sectional --> prevalence ratio or prevalence odds ratio
 |
 |-- Are you planning a study?
        |-- Yes --> Sample Size Calculations

6.2 Measure Selection by Study Design

Study designRecommended primary measureAvoid relying only on
Case-controlOdds ratioRisk ratio
CohortRisk ratio and risk differenceOdds ratio when risk is common
Randomized trialRisk difference, RR, NNTp-value alone
Cross-sectionalPrevalence and prevalence ratioCausal language
Diagnostic accuracySensitivity, specificity, LRPPV without prevalence
Outbreak cohortAttack rate and RROverall attack rate only
StandardizationAdjusted rate or SMRCrude rates alone

7. Using the Epidemiological Calculator Components

DataStatPro includes dedicated epidemiology tools for diagnostic testing, outbreak investigation, standardization, screening programs, and related 2x2 risk metrics. The exact interface may differ by calculator, but the workflow is consistent.

Step-by-Step Guide

Step 1: Define the epidemiological question.

Write the question before entering numbers. For example:

  • "Is exposure to food item A associated with illness?"
  • "How accurate is the rapid test compared with PCR?"
  • "Is Region A's mortality rate higher after age adjustment?"

Step 2: Identify the design.

Choose whether your data come from a case-control, cohort, cross-sectional, diagnostic, outbreak, screening, or rate-comparison design.

Step 3: Prepare the input table.

Confirm what each cell means. A common source of error is switching rows or columns. For exposure-outcome tables, use:

Outcome +Outcome -
Exposure +ab
Exposure -cd

For diagnostic tests, use:

Disease +Disease -
Test +TPFP
Test -FNTN

Step 4: Enter counts or rates.

Use raw counts when the calculator asks for counts. Use proportions only when the field explicitly requests risks, prevalence, or rates.

Step 5: Review all outputs.

Do not stop at the first estimate. Read the confidence interval, absolute measure, and any warnings about sparse cells or interpretation.

Step 6: Translate into a report sentence.

A good report sentence includes design, population, estimate, confidence interval, and plain meaning.

Example:

In this outbreak cohort analysis, illness was more common among people who ate the egg salad than among those who did not (RR = 4.20, 95% CI [2.10, 8.40]).

7.1 Input Quality Checklist

Before calculating, check:

  • Are the numerator and denominator from the same population?
  • Are cases incident or prevalent?
  • Is exposure measured before the outcome when making causal claims?
  • Are missing records excluded consistently?
  • Are zero cells handled deliberately?
  • Does the study design support the measure being reported?

8. Measures of Association

8.1 Odds Ratio in Practice

Use the odds ratio when:

  • The study is case-control.
  • Logistic regression output is being interpreted.
  • The disease is rare and OR approximates RR.

Avoid saying "times the risk" for an odds ratio unless the rare disease assumption is reasonable. Say "times the odds" instead.

8.2 Relative Risk in Practice

Use the relative risk when:

  • You have a cohort, trial, or outbreak cohort.
  • The denominator of people at risk is known.
  • You can estimate incidence in each group.

Example:

If 40 of 100 exposed people and 10 of 100 unexposed people become ill:

RR=40/10010/100=4.0RR = \frac{40/100}{10/100} = 4.0

The exposed group had four times the risk of illness.

8.3 Risk Difference in Practice

The risk difference tells you how many additional cases occur per person or per standard population size.

Using the same example:

RD=40/10010/100=0.30RD = 40/100 - 10/100 = 0.30

There were 30 additional cases per 100 exposed people.

8.4 Relative and Absolute Measures Together

ScenarioRRRDInterpretation
Risk changes from 1% to 2%2.01 percentage pointRelative increase is large, absolute increase is small
Risk changes from 30% to 60%2.030 percentage pointsSame RR, much larger absolute impact
Risk changes from 20% to 10%0.5-10 percentage pointsProtective exposure or intervention

9. Clinical Decision Measures

9.1 Absolute Risk Reduction

For beneficial interventions:

ARR=CEREERARR = CER - EER

Where:

  • CERCER = control event rate.
  • EEREER = experimental event rate.

9.2 Number Needed to Treat

The number needed to treat (NNT) estimates how many patients must receive the intervention to prevent one additional adverse outcome.

NNT=1ARR=1CEREERNNT = \frac{1}{|ARR|} = \frac{1}{|CER - EER|}

If an intervention reduces risk from 20% to 12%:

ARR=0.200.12=0.08ARR = 0.20 - 0.12 = 0.08

NNT=1/0.08=12.5NNT = 1/0.08 = 12.5

Round up: 13 patients need treatment to prevent one additional event.

9.3 Number Needed to Harm

The number needed to harm (NNH) estimates how many patients must receive the exposure or treatment to cause one additional adverse outcome.

NNH=1ARI=1EERCERNNH = \frac{1}{ARI} = \frac{1}{EER - CER}

Where ARIARI is the absolute risk increase.

9.4 Reporting NNT and NNH

Always report the time horizon:

The NNT was 13 over 12 months.

Without the time frame, NNT is incomplete.


10. Diagnostic Test Evaluation

10.1 Purpose and Design

Diagnostic test evaluation compares an index test with a reference standard. The question is not whether disease is common, but whether the test correctly classifies disease status.

10.2 Core Measures

Disease +Disease -
Test +TPFP
Test -FNTN

Sensitivity:

Sensitivity=TPTP+FNSensitivity = \frac{TP}{TP + FN}

Specificity:

Specificity=TNTN+FPSpecificity = \frac{TN}{TN + FP}

Positive predictive value:

PPV=TPTP+FPPPV = \frac{TP}{TP + FP}

Negative predictive value:

NPV=TNTN+FNNPV = \frac{TN}{TN + FN}

10.3 Likelihood Ratios

Likelihood ratios summarize how much a test result shifts disease probability.

Positive likelihood ratio:

LR+=Sensitivity1SpecificityLR+ = \frac{Sensitivity}{1 - Specificity}

Negative likelihood ratio:

LR=1SensitivitySpecificityLR- = \frac{1 - Sensitivity}{Specificity}

General interpretation:

MeasureRule of thumb
LR+ > 10Strong evidence for disease
LR+ 5 to 10Moderate evidence for disease
LR+ 2 to 5Weak evidence for disease
LR+ = 1No diagnostic value
LR- < 0.1Strong evidence against disease
LR- 0.1 to 0.2Moderate evidence against disease

10.4 Predictive Values and Prevalence

PPV and NPV depend strongly on prevalence:

PPV=Sensitivity×PrevalenceSensitivity×Prevalence+(1Specificity)×(1Prevalence)PPV = \frac{Sensitivity \times Prevalence}{Sensitivity \times Prevalence + (1-Specificity) \times (1-Prevalence)}

NPV=Specificity×(1Prevalence)(1Sensitivity)×Prevalence+Specificity×(1Prevalence)NPV = \frac{Specificity \times (1-Prevalence)}{(1-Sensitivity) \times Prevalence + Specificity \times (1-Prevalence)}

A test can have excellent sensitivity and specificity but low PPV in a low-prevalence population.

10.5 ROC Curves and Youden's Index

For continuous or ordinal test scores, diagnostic performance depends on the threshold.

Youden's Index:

J=Sensitivity+Specificity1J = Sensitivity + Specificity - 1

The threshold that maximizes JJ often balances sensitivity and specificity, but the best threshold may differ when false negatives and false positives have unequal costs.

Area under the curve (AUC):

AUCInterpretation
0.5No discrimination
0.7 to 0.8Acceptable discrimination
0.8 to 0.9Excellent discrimination
> 0.9Outstanding discrimination

11. Outbreak Investigation

11.1 Purpose and Design

Outbreak calculators help identify likely sources, compare attack rates, and summarize illness patterns by exposure, place, and time.

The basic outbreak question is:

Among people at risk, who became ill, when did illness occur, and what exposure best explains the pattern?

11.2 Attack Rate

In outbreak settings, an attack rate is usually an incidence proportion:

Attack Rate=number who became illnumber at riskAttack\ Rate = \frac{\text{number who became ill}}{\text{number at risk}}

11.3 Food-Specific or Exposure-Specific Attack Rates

For each exposure:

IllNot illTotal
Ate food itemaba + b
Did not eat itemcdc + d

Calculate:

ARexposed=aa+bAR_{exposed} = \frac{a}{a+b}

ARunexposed=cc+dAR_{unexposed} = \frac{c}{c+d}

RR=ARexposedARunexposedRR = \frac{AR_{exposed}}{AR_{unexposed}}

The likely source often has a high attack rate among exposed people, low attack rate among unexposed people, and a large risk ratio.

11.4 Epidemic Curves

An epidemic curve plots cases by onset time. It helps infer:

  • Point-source exposure.
  • Continuous common-source exposure.
  • Propagated person-to-person spread.
  • Possible incubation period.

Do not use the epidemic curve alone to identify the source. Combine time, place, person, exposure histories, and laboratory evidence.


12. Standardization of Rates

12.1 Why Standardization Is Needed

Crude rates can be misleading when populations differ in age or another major risk factor. Standardization creates a fairer comparison by adjusting for the distribution of that factor.

Example: A region with more older residents may have a higher crude mortality rate even if age-specific mortality is not higher.

12.2 Direct Standardization

Direct standardization applies study population stratum-specific rates to a standard population distribution.

For each stratum ii:

Expectedi=Ratei×Standard PopulationiExpected_i = Rate_i \times Standard\ Population_i

The directly standardized rate is:

Adjusted Rate=iExpectediiStandard PopulationiAdjusted\ Rate = \frac{\sum_i Expected_i}{\sum_i Standard\ Population_i}

Use direct standardization when stratum-specific rates are stable.

12.3 Indirect Standardization

Indirect standardization applies standard rates to the study population distribution. It is useful when local stratum-specific rates are unstable.

Expectedi=Standard Ratei×Study PopulationiExpected_i = Standard\ Rate_i \times Study\ Population_i

The standardized mortality ratio or standardized incidence ratio is:

SMR=ObservedExpectedSMR = \frac{Observed}{Expected}

Interpretation:

  • SMR = 1: observed cases equal expected cases.
  • SMR > 1: more cases than expected.
  • SMR < 1: fewer cases than expected.

12.4 Direct vs. Indirect Standardization

SituationUse
Stable age-specific rates in each groupDirect standardization
Small local populations or sparse eventsIndirect standardization
Comparing several populations to one standardDirect standardization
Estimating observed vs expected in one populationIndirect standardization

13. Screening Program Evaluation

13.1 Screening vs. Diagnosis

Screening tests are applied to people without known disease to identify those who need further evaluation. Diagnostic tests are used to classify disease in a clinical context.

Screening programs should be judged by more than test accuracy:

  • Disease prevalence.
  • Follow-up capacity.
  • False positive burden.
  • False negative consequences.
  • Cost per detected case.
  • Treatment availability.

13.2 Screening Yield

Screening yield is the proportion of screened people who are confirmed to have the target disease:

Yield=confirmed cases detectedpeople screenedYield = \frac{\text{confirmed cases detected}}{\text{people screened}}

13.3 False Positive Burden

The number of false positives can be large when prevalence is low, even with high specificity.

False Positive Rate=1SpecificityFalse\ Positive\ Rate = 1 - Specificity

Expected False Positives=(1Specificity)×(1Prevalence)×NExpected\ False\ Positives = (1 - Specificity) \times (1 - Prevalence) \times N

13.4 Cost per Case Detected

If screening cost per person is known:

Cost per Case=N×Cost per Screenconfirmed cases detectedCost\ per\ Case = \frac{N \times Cost\ per\ Screen}{\text{confirmed cases detected}}

This measure is not a full cost-effectiveness analysis, but it is useful for comparing program scenarios.


14. Sample Size Calculations for Epidemiological Studies

14.1 Planning Principles

Sample size depends on:

  • The target effect size.
  • Baseline risk or exposure prevalence.
  • Significance level α\alpha.
  • Desired power 1β1-\beta.
  • Allocation ratio.
  • Anticipated missingness or loss to follow-up.
  • Design effects from clustering.

14.2 Case-Control Studies

For an unmatched case-control design:

n=(zα/22pˉ(1pˉ)+zβp1(1p1)+p0(1p0))2(p1p0)2n = \frac{(z_{\alpha/2}\sqrt{2\bar{p}(1-\bar{p})} + z_\beta\sqrt{p_1(1-p_1) + p_0(1-p_0)})^2}{(p_1 - p_0)^2}

Where:

  • p1p_1 = proportion exposed among cases.
  • p0p_0 = proportion exposed among controls.
  • pˉ=(p1+p0)/2\bar{p} = (p_1 + p_0)/2.

For matched case-control studies using McNemar's framework:

n=(zα/2+zβ)2(ψ+1)2(ψ1)2×p10n = \frac{(z_{\alpha/2} + z_\beta)^2(\psi + 1)^2}{(\psi - 1)^2 \times p_{10}}

Where:

  • ψ\psi = odds ratio.
  • p10p_{10} = probability of a discordant pair where the case is exposed and the control is unexposed.

14.3 Cohort Studies

For comparing two risks:

n=(zα/22pˉ(1pˉ)+zβp1(1p1)+p0(1p0))2(p1p0)2n = \frac{(z_{\alpha/2}\sqrt{2\bar{p}(1-\bar{p})} + z_\beta\sqrt{p_1(1-p_1) + p_0(1-p_0)})^2}{(p_1 - p_0)^2}

With unequal group sizes:

n1=(zα/2(1+1/k)pˉ(1pˉ)+zβp1(1p1)+p0(1p0)/k)2(p1p0)2n_1 = \frac{(z_{\alpha/2}\sqrt{(1+1/k)\bar{p}(1-\bar{p})} + z_\beta\sqrt{p_1(1-p_1) + p_0(1-p_0)/k})^2}{(p_1 - p_0)^2}

Where k=n0/n1k = n_0/n_1, the ratio of unexposed to exposed participants.

14.4 Cross-Sectional Studies

For estimating one proportion:

n=zα/22×p(1p)d2n = \frac{z_{\alpha/2}^2 \times p(1-p)}{d^2}

Where:

  • pp = expected proportion.
  • dd = desired precision or margin of error.

For comparing two proportions:

n=2(zα/2+zβ)2×pˉ(1pˉ)(p1p2)2n = \frac{2(z_{\alpha/2} + z_\beta)^2 \times \bar{p}(1-\bar{p})}{(p_1 - p_2)^2}

14.5 Adjusting for Missingness and Design Effects

If 15% loss to follow-up is expected:

nadjusted=n10.15n_{adjusted} = \frac{n}{1 - 0.15}

If clustered sampling has a design effect DEFFDEFF:

nclustered=n×DEFFn_{clustered} = n \times DEFF


15. Advanced Topics

15.1 Sparse Cells and Continuity Corrections

When any 2x2 cell is zero, OR and RR confidence intervals may be undefined. A common continuity correction adds 0.5 to each cell, but this can be biased when counts are very small.

For sparse tables, consider:

  • Exact confidence intervals.
  • Fisher's exact test.
  • Penalized logistic regression for modeled odds ratios.
  • Reporting the instability clearly.

15.2 Matched Case-Control Studies

Matched case-control studies require analysis of discordant pairs, not a simple unmatched 2x2 table. McNemar's test and conditional logistic regression are common tools.

15.3 Survival Analysis in Epidemiology

When the timing of events matters, survival methods are more appropriate than simple risk measures.

Kaplan-Meier estimator:

S^(t)=tit(1dini)\hat{S}(t) = \prod_{t_i \leq t}\left(1 - \frac{d_i}{n_i}\right)

Where:

  • did_i = number of events at time tit_i.
  • nin_i = number at risk just before time tit_i.

Hazard ratio from a Cox proportional hazards model:

HR=h1(t)h0(t)=eβHR = \frac{h_1(t)}{h_0(t)} = e^{\beta}

Interpretation:

  • HR = 1: no difference in hazard.
  • HR > 1: higher hazard in the exposed group.
  • HR < 1: lower hazard in the exposed group.

15.4 Effect Modification

Effect modification occurs when an association differs across levels of a third variable. Unlike confounding, effect modification is often a finding to report rather than a nuisance to remove.

Example: A vaccine may have different effectiveness in younger and older age groups.

15.5 Causal Language

Use causal wording only when the design and analysis support it. Observational studies usually require careful language:

  • Prefer "was associated with" for ordinary observational estimates.
  • Use "increased risk" cautiously when temporality is clear.
  • Reserve "caused" or "prevented" for strong causal evidence.

16. Worked Examples

Example 1: Case-Control Study - Smoking and Lung Cancer

Question: Is smoking associated with lung cancer?

Data:

CasesControls
Smoker360180
Non-smoker140320

Step 1: Choose the measure.

The design is case-control, so the odds ratio is primary.

Step 2: Calculate OR.

OR=360×320180×140=4.57OR = \frac{360 \times 320}{180 \times 140} = 4.57

Step 3: Interpret.

Smokers had about 4.6 times the odds of lung cancer compared with non-smokers in this case-control study.

Report sentence:

In this case-control study, smoking was associated with higher odds of lung cancer (OR = 4.57). Because this is a case-control design, the result should be interpreted as an odds ratio rather than a directly estimated risk ratio.

Example 2: Cohort Study - Food Exposure During an Outbreak

Question: Was egg salad associated with illness after a catered event?

Data:

IllNot ill
Ate egg salad4832
Did not eat it12108

Step 1: Calculate attack rates.

ARexposed=48/(48+32)=0.60AR_{exposed} = 48/(48+32) = 0.60

ARunexposed=12/(12+108)=0.10AR_{unexposed} = 12/(12+108) = 0.10

Step 2: Calculate risk ratio.

RR=0.60/0.10=6.0RR = 0.60/0.10 = 6.0

Step 3: Calculate risk difference.

RD=0.600.10=0.50RD = 0.60 - 0.10 = 0.50

Interpretation:

The exposed group had six times the risk of illness, with 50 excess cases per 100 people exposed.

Example 3: Diagnostic Test Performance

Question: How well does a rapid test detect disease compared with PCR?

Data:

Disease +Disease -
Test +9030
Test -10870

Calculations:

Sensitivity=90/(90+10)=0.90Sensitivity = 90/(90+10) = 0.90

Specificity=870/(870+30)=0.967Specificity = 870/(870+30) = 0.967

PPV=90/(90+30)=0.75PPV = 90/(90+30) = 0.75

NPV=870/(870+10)=0.989NPV = 870/(870+10) = 0.989

LR+=0.90/(10.967)=27.3LR+ = 0.90/(1-0.967) = 27.3

LR=(10.90)/0.967=0.10LR- = (1-0.90)/0.967 = 0.10

Interpretation:

The test has high sensitivity and specificity. A positive result gives strong evidence for disease, and a negative result gives strong evidence against disease in this population.

Example 4: Standardized Mortality Ratio

Question: Does a factory workforce have higher mortality than expected?

Data:

  • Observed deaths: 42
  • Expected deaths from age-specific standard rates: 30

Calculation:

SMR=42/30=1.40SMR = 42/30 = 1.40

Interpretation:

The workforce experienced 40% more deaths than expected based on the standard rates. This does not by itself prove occupational causation; exposure history, confounding, and healthy worker selection should be investigated.

Example 5: Screening Program Yield

Question: What is the yield and false positive burden of screening 10,000 people?

Inputs:

  • Prevalence = 1%
  • Sensitivity = 90%
  • Specificity = 95%
  • N = 10,000

Expected true positives:

10,000×0.01×0.90=9010{,}000 \times 0.01 \times 0.90 = 90

Expected false positives:

10,000×0.99×0.05=49510{,}000 \times 0.99 \times 0.05 = 495

Interpretation:

The program detects about 90 true cases but generates about 495 false positives. The program may still be worthwhile, but follow-up capacity and harms of false positives must be considered.


17. Common Mistakes and How to Avoid Them

Mistake 1: Interpreting an Odds Ratio as a Risk Ratio

An odds ratio can substantially overstate the risk ratio when the outcome is common. Use risk language only for RR, RD, or rates.

Mistake 2: Using Relative Measures Without Absolute Measures

An RR of 2.0 can mean an increase from 1% to 2% or from 30% to 60%. Report absolute risk difference whenever possible.

Mistake 3: Using a Case-Control Study to Estimate Incidence

Case-control sampling fixes the number of cases and controls by design. It usually does not estimate disease incidence directly.

Mistake 4: Ignoring Temporality

Cross-sectional associations do not prove the exposure came before the outcome. Avoid causal wording unless time order is clear.

Mistake 5: Forgetting That PPV and NPV Depend on Prevalence

Sensitivity and specificity are properties of the test in a given setting. PPV and NPV change when disease prevalence changes.

Mistake 6: Comparing Crude Rates Across Different Age Structures

Crude rates can be misleading when populations differ by age. Use direct or indirect standardization.

Mistake 7: Ignoring Sparse Cells

Zero or tiny cells can make OR, RR, and confidence intervals unstable. Use exact or sparse-data methods and report limitations.

Mistake 8: Treating Confounding as a Calculator Output Problem

Simple calculators do not automatically remove confounding. Use design strategies, stratification, standardization, or regression.

Mistake 9: Reporting NNT Without a Time Horizon

NNT must be tied to a follow-up period. "NNT = 20 over 5 years" is meaningful; "NNT = 20" is incomplete.

Mistake 10: Choosing the Source in an Outbreak from RR Alone

High RR helps identify a source, but outbreak conclusions should combine epidemiology, timing, food histories, environmental evidence, and laboratory data.


18. Troubleshooting

ProblemLikely causeWhat to do
OR or CI is undefinedOne or more cells are zeroUse exact methods or continuity correction; report sparse data
RR does not make senseDesign is case-control or denominator is unavailableReport OR instead
PPV seems low despite good test performanceDisease prevalence is lowReview prevalence and expected false positives
Crude rates contradict adjusted ratesConfounding by age or another structureUse standardization and inspect stratum-specific rates
NNT is negativeThe treatment increased risk rather than reduced itReport NNH or clarify outcome direction
Very wide confidence intervalSmall sample or rare outcomeIncrease sample size or state imprecision
Outbreak source is unclearMultiple exposures are correlatedStratify exposures and review timing/lab evidence
Standardized rate seems wrongStandard population weights were mis-enteredCheck each stratum's rate, population, and units

19. Quick Reference Cheat Sheet

Core 2x2 Formulas

MeasureFormulaNull value
Odds ratioOR=ad/bcOR = ad/bc1
Relative riskRR=[a/(a+b)]/[c/(c+d)]RR = [a/(a+b)]/[c/(c+d)]1
Risk differenceRD=a/(a+b)c/(c+d)RD = a/(a+b) - c/(c+d)0
Attributable risk percentAR%=[(RR1)/RR]×100%AR\% = [(RR-1)/RR] \times 100\%0
Prevented fractionPF=1RRPF = 1 - RR when RR<1RR < 10

Diagnostic Test Formulas

MeasureFormula
SensitivityTP/(TP+FN)TP/(TP+FN)
SpecificityTN/(TN+FP)TN/(TN+FP)
PPVTP/(TP+FP)TP/(TP+FP)
NPVTN/(TN+FN)TN/(TN+FN)
LR+Sensitivity/(1Specificity)Sensitivity/(1-Specificity)
LR-(1Sensitivity)/Specificity(1-Sensitivity)/Specificity
Youden's IndexSensitivity+Specificity1Sensitivity + Specificity - 1

Clinical Decision Formulas

MeasureFormula
Absolute risk reductionARR=CEREERARR = CER - EER
Absolute risk increaseARI=EERCERARI = EER - CER
Number needed to treatNNT=1/ARRNNT = 1/\lvert ARR \rvert
Number needed to harmNNH=1/ARINNH = 1/ARI

Standardization Formulas

MethodFormula
Direct adjusted rateExpectedi/Standard Populationi\sum Expected_i / \sum Standard\ Population_i
Indirect expected casesExpectedi=Standard Ratei×Study PopulationiExpected_i = Standard\ Rate_i \times Study\ Population_i
SMR or SIRObserved/ExpectedObserved / Expected

Study Design Quick Selection

If your data are...Use...
Cases and controls sampled by diseaseOdds ratio
Exposed and unexposed followed for diseaseRR, RD, rates
Disease status measured at one timePrevalence, prevalence ratio
Test result compared with disease statusDiagnostic Test Performance
Illness clustered after an eventOutbreak Investigation
Rates differ by age structureStandardization
Screening a populationScreening Program

Reporting Templates

Case-control:

In this case-control study, exposure was associated with [higher/lower] odds of outcome (OR = [value], 95% CI [lower, upper]).

Cohort or outbreak:

The risk of outcome was [value] times higher in the exposed group than in the unexposed group (RR = [value], 95% CI [lower, upper]); the absolute risk difference was [value].

Diagnostic test:

The test had sensitivity [value], specificity [value], PPV [value], and NPV [value] in a population with [prevalence] disease prevalence.

Standardization:

After standardization to [standard population], the adjusted rate was [value] per [population unit]. The SMR was [value], indicating [higher/lower/similar] observed events than expected.

Final Reporting Checklist

  • State the study design.
  • Define exposure, outcome, population, and time frame.
  • Use a measure appropriate for the design.
  • Report confidence intervals.
  • Include absolute measures when available.
  • Check for sparse cells and zero counts.
  • Discuss bias, confounding, and missing data.
  • Avoid causal wording unless justified.
  • Use standardized rates when comparing structurally different populations.
  • Translate the result into plain language for the target audience.