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
- Prerequisites and Background Concepts
- What Are Epidemiological Calculators?
- Study Design Foundations
- The Mathematics Behind Epidemiological Measures
- Assumptions, Bias, and Confounding
- Choosing the Right Epidemiological Calculator
- Using the Epidemiological Calculator Components
- Measures of Association
- Clinical Decision Measures
- Diagnostic Test Evaluation
- Outbreak Investigation
- Standardization of Rates
- Screening Program Evaluation
- Sample Size Calculations for Epidemiological Studies
- Advanced Topics
- Worked Examples
- Common Mistakes and How to Avoid Them
- Troubleshooting
- 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:
| Quantity | Meaning | Example |
|---|---|---|
| Population | Full target group | Adults in a city during 2026 |
| Sample | Observed subset | 1,500 surveyed adults |
| Person-time | Time under observation | 4,820 person-years |
| Event | Outcome occurrence | New diabetes diagnosis |
| Exposure | Risk factor or intervention | Smoking, 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:
Incidence rate uses person-time:
Prevalence is the proportion of a population with the condition at a point or during a period:
Odds compare the probability that an event occurs with the probability that it does not occur:
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 change the occurrence of outcome in population during time ?
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 + | a | b | a + b |
| Exposure - | c | d | c + d |
| Total | a + c | b + d | n |
For diagnostic tests, the same layout is usually written as:
| Disease + | Disease - | Total | |
|---|---|---|---|
| Test + | TP | FP | TP+FP |
| Test - | FN | TN | FN+TN |
| Total | TP+FN | FP+TN | n |
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:
- Direction: Is the estimate above, below, or equal to the null value?
- Precision: Is the interval narrow enough to support a useful conclusion?
- 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 family | Primary question | Typical outputs |
|---|---|---|
| Association measures | Is exposure related to outcome? | OR, RR, RD, attributable risk |
| Diagnostic Test Performance | How well does a test classify disease? | Sensitivity, specificity, PPV, NPV, LR+, LR- |
| Outbreak Investigation | Where is disease concentrated? | Attack rates, risk ratios, source clues |
| Standardization | Are rates comparable after adjustment? | Age-adjusted rates, SMR, expected cases |
| Screening Program | Is screening useful and efficient? | Yield, false positives, predictive values, cost metrics |
| Sample size planning | How 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:
- A relative measure such as OR, RR, or HR.
- An absolute measure such as risk difference or excess rate.
- A confidence interval.
- The study design and denominator.
- 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:
| Cases | Controls | Total | |
|---|---|---|---|
| Exposed | a | b | a + b |
| Unexposed | c | d | c + d |
| Total | a + c | b + d | n |
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 | |
|---|---|---|---|
| Exposed | a | b | a + b |
| Unexposed | c | d | c + 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 situation | Prefer this design | Main measure |
|---|---|---|
| Rare disease | Case-control | Odds ratio |
| Rare exposure | Cohort | Risk ratio or rate ratio |
| Disease burden now | Cross-sectional | Prevalence |
| Intervention benefit | Trial or cohort | Risk difference, RR, NNT |
| Diagnostic accuracy | Diagnostic accuracy study | Sensitivity, specificity, LR |
| Suspected foodborne outbreak | Outbreak cohort or case-control | Attack rate, RR, OR |
| Comparing regions with different ages | Standardization | Adjusted 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.
For case-control studies, the OR is usually the natural measure because sampling is based on disease status.
Confidence interval:
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.
Confidence interval:
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.
Confidence interval:
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:
Attributable risk percent (AR%) estimates the proportion of cases among exposed people attributable to the exposure, assuming the association is causal:
4.5 Population Attributable Risk
Population attributable risk (PAR) estimates the excess incidence in the total population attributable to the exposure:
Where is incidence in the total population.
Population attributable risk percent (PAR%):
When the exposure prevalence and risk ratio are known:
4.6 Prevented Fraction
For protective exposures where , the prevented fraction estimates the proportion of expected cases prevented among exposed people:
4.7 Rates and Rate Ratios
When follow-up time differs, use rates:
The rate ratio compares rates:
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:
Mantel-Haenszel test statistic:
5.6 Assumption Summary Table
| Issue | Why it matters | What to check |
|---|---|---|
| Temporality | Causal exposure must occur before outcome | Study design and dates |
| Cell counts | Sparse cells destabilize ratios | Any cell equal to 0 or very small |
| Independence | Duplicated or clustered records distort SEs | Repeated records, households, clinics |
| Confounding | Crude association may be misleading | Known risk factors |
| Misclassification | Wrong exposure/outcome labels bias estimates | Case definitions, test validity |
| Denominator | Risk, rate, and prevalence use different bases | Population 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 design | Recommended primary measure | Avoid relying only on |
|---|---|---|
| Case-control | Odds ratio | Risk ratio |
| Cohort | Risk ratio and risk difference | Odds ratio when risk is common |
| Randomized trial | Risk difference, RR, NNT | p-value alone |
| Cross-sectional | Prevalence and prevalence ratio | Causal language |
| Diagnostic accuracy | Sensitivity, specificity, LR | PPV without prevalence |
| Outbreak cohort | Attack rate and RR | Overall attack rate only |
| Standardization | Adjusted rate or SMR | Crude 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 + | a | b |
| Exposure - | c | d |
For diagnostic tests, use:
| Disease + | Disease - | |
|---|---|---|
| Test + | TP | FP |
| Test - | FN | TN |
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:
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:
There were 30 additional cases per 100 exposed people.
8.4 Relative and Absolute Measures Together
| Scenario | RR | RD | Interpretation |
|---|---|---|---|
| Risk changes from 1% to 2% | 2.0 | 1 percentage point | Relative increase is large, absolute increase is small |
| Risk changes from 30% to 60% | 2.0 | 30 percentage points | Same RR, much larger absolute impact |
| Risk changes from 20% to 10% | 0.5 | -10 percentage points | Protective exposure or intervention |
9. Clinical Decision Measures
9.1 Absolute Risk Reduction
For beneficial interventions:
Where:
- = control event rate.
- = 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.
If an intervention reduces risk from 20% to 12%:
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.
Where 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 + | TP | FP |
| Test - | FN | TN |
Sensitivity:
Specificity:
Positive predictive value:
Negative predictive value:
10.3 Likelihood Ratios
Likelihood ratios summarize how much a test result shifts disease probability.
Positive likelihood ratio:
Negative likelihood ratio:
General interpretation:
| Measure | Rule of thumb |
|---|---|
| LR+ > 10 | Strong evidence for disease |
| LR+ 5 to 10 | Moderate evidence for disease |
| LR+ 2 to 5 | Weak evidence for disease |
| LR+ = 1 | No diagnostic value |
| LR- < 0.1 | Strong evidence against disease |
| LR- 0.1 to 0.2 | Moderate evidence against disease |
10.4 Predictive Values and Prevalence
PPV and NPV depend strongly on 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:
The threshold that maximizes 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):
| AUC | Interpretation |
|---|---|
| 0.5 | No discrimination |
| 0.7 to 0.8 | Acceptable discrimination |
| 0.8 to 0.9 | Excellent discrimination |
| > 0.9 | Outstanding 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:
11.3 Food-Specific or Exposure-Specific Attack Rates
For each exposure:
| Ill | Not ill | Total | |
|---|---|---|---|
| Ate food item | a | b | a + b |
| Did not eat item | c | d | c + d |
Calculate:
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 :
The directly standardized rate is:
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.
The standardized mortality ratio or standardized incidence ratio is:
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
| Situation | Use |
|---|---|
| Stable age-specific rates in each group | Direct standardization |
| Small local populations or sparse events | Indirect standardization |
| Comparing several populations to one standard | Direct standardization |
| Estimating observed vs expected in one population | Indirect 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:
13.3 False Positive Burden
The number of false positives can be large when prevalence is low, even with high specificity.
13.4 Cost per Case Detected
If screening cost per person is known:
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 .
- Desired power .
- Allocation ratio.
- Anticipated missingness or loss to follow-up.
- Design effects from clustering.
14.2 Case-Control Studies
For an unmatched case-control design:
Where:
- = proportion exposed among cases.
- = proportion exposed among controls.
- .
For matched case-control studies using McNemar's framework:
Where:
- = odds ratio.
- = probability of a discordant pair where the case is exposed and the control is unexposed.
14.3 Cohort Studies
For comparing two risks:
With unequal group sizes:
Where , the ratio of unexposed to exposed participants.
14.4 Cross-Sectional Studies
For estimating one proportion:
Where:
- = expected proportion.
- = desired precision or margin of error.
For comparing two proportions:
14.5 Adjusting for Missingness and Design Effects
If 15% loss to follow-up is expected:
If clustered sampling has a design effect :
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:
Where:
- = number of events at time .
- = number at risk just before time .
Hazard ratio from a Cox proportional hazards model:
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:
| Cases | Controls | |
|---|---|---|
| Smoker | 360 | 180 |
| Non-smoker | 140 | 320 |
Step 1: Choose the measure.
The design is case-control, so the odds ratio is primary.
Step 2: Calculate OR.
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:
| Ill | Not ill | |
|---|---|---|
| Ate egg salad | 48 | 32 |
| Did not eat it | 12 | 108 |
Step 1: Calculate attack rates.
Step 2: Calculate risk ratio.
Step 3: Calculate risk difference.
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 + | 90 | 30 |
| Test - | 10 | 870 |
Calculations:
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:
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:
Expected false positives:
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
| Problem | Likely cause | What to do |
|---|---|---|
| OR or CI is undefined | One or more cells are zero | Use exact methods or continuity correction; report sparse data |
| RR does not make sense | Design is case-control or denominator is unavailable | Report OR instead |
| PPV seems low despite good test performance | Disease prevalence is low | Review prevalence and expected false positives |
| Crude rates contradict adjusted rates | Confounding by age or another structure | Use standardization and inspect stratum-specific rates |
| NNT is negative | The treatment increased risk rather than reduced it | Report NNH or clarify outcome direction |
| Very wide confidence interval | Small sample or rare outcome | Increase sample size or state imprecision |
| Outbreak source is unclear | Multiple exposures are correlated | Stratify exposures and review timing/lab evidence |
| Standardized rate seems wrong | Standard population weights were mis-entered | Check each stratum's rate, population, and units |
19. Quick Reference Cheat Sheet
Core 2x2 Formulas
| Measure | Formula | Null value |
|---|---|---|
| Odds ratio | 1 | |
| Relative risk | 1 | |
| Risk difference | 0 | |
| Attributable risk percent | 0 | |
| Prevented fraction | when | 0 |
Diagnostic Test Formulas
| Measure | Formula |
|---|---|
| Sensitivity | |
| Specificity | |
| PPV | |
| NPV | |
| LR+ | |
| LR- | |
| Youden's Index |
Clinical Decision Formulas
| Measure | Formula |
|---|---|
| Absolute risk reduction | |
| Absolute risk increase | |
| Number needed to treat | |
| Number needed to harm |
Standardization Formulas
| Method | Formula |
|---|---|
| Direct adjusted rate | |
| Indirect expected cases | |
| SMR or SIR |
Study Design Quick Selection
| If your data are... | Use... |
|---|---|
| Cases and controls sampled by disease | Odds ratio |
| Exposed and unexposed followed for disease | RR, RD, rates |
| Disease status measured at one time | Prevalence, prevalence ratio |
| Test result compared with disease status | Diagnostic Test Performance |
| Illness clustered after an event | Outbreak Investigation |
| Rates differ by age structure | Standardization |
| Screening a population | Screening 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.