Skip to content
All articles

Statistics

Choosing the Right Statistical Test: A Practical Guide to the Most Common Tests

confused what statistical tests to use in your paper, thesis, abstract, poster, dissertation, here is the complete guide to choose which one.

Resora Research Team · 14 Nov 2026 · 13 min read

Choosing the wrong statistical test is one of the most common reasons a thesis or paper is sent back by reviewers. The good news is that a handful of tests cover the vast majority of medical and public health research. Once you understand a few core ideas, picking the right one becomes a logical process rather than guesswork.

This article explains those core ideas, gives a simple way to choose a test, and walks through the most commonly used tests with examples from clinical and community medicine.

Core concepts you need first

Types of variables

The type of your outcome (dependent) variable decides most of the choice.

TypeWhat it isExamples
Continuous (quantitative)Measured on a numerical scaleHaemoglobin, BMI, blood pressure, age
Nominal (categorical)Categories with no orderSex, blood group, diabetic yes/no
OrdinalCategories with a natural orderPain score (mild/moderate/severe), SES class, Likert scale
Time-to-eventTime until something happens, with some people not yet having the eventTime to death, relapse, or recovery

Hypotheses and the p-value

  • The null hypothesis (H₀) says there is no difference or no association, for example "mean HbA1c is the same in both treatment groups".
  • The alternative hypothesis (H₁) says there is a difference or association.
  • The p-value is the probability of getting a result at least as extreme as yours if the null hypothesis were true. It is not the probability that H₀ is true, and it says nothing about how large or important the effect is.
  • By convention, p < 0.05 is called statistically significant, but this cut-off is arbitrary. Always report the exact p-value (p = 0.032, not "p < 0.05").

Confidence intervals

A 95% confidence interval (CI) gives a range of plausible values for the true effect. It tells you both the size of the effect and how precise your estimate is. A wide CI means an imprecise estimate, usually from a small sample. Most journals now prefer effect sizes with 95% CIs over p-values alone.

Errors, power and sample size

H₀ actually trueH₀ actually false
Reject H₀Type I error (α), false positiveCorrect (power = 1 − β)
Do not reject H₀CorrectType II error (β), false negative

α is usually set at 0.05 and power at 80% or 90%. A study that is too small may fail to detect a real difference — "not significant" does not mean "no difference".

Parametric and non-parametric tests

Parametric tests (t-test, ANOVA, Pearson correlation) assume the data come from a roughly normal distribution with similar variances across groups. They use the mean and standard deviation.

Non-parametric tests (Mann–Whitney, Wilcoxon, Kruskal–Wallis, Spearman) make fewer assumptions and work on ranks. Use them for skewed data, ordinal data, small samples, or obvious outliers. Report the median and interquartile range (IQR) instead of mean and SD.

To check normality, look at a histogram or Q–Q plot first, then use the Shapiro–Wilk test (preferred for n < 50) or Kolmogorov–Smirnov test. With large samples, these tests flag trivial departures, so the plot matters more.

How to choose the right test

Ask four questions, in this order:

  1. What is the type of my outcome variable? Continuous, categorical, ordinal or time-to-event.
  2. What am I trying to do? Compare groups, look for an association, or predict an outcome.
  3. How many groups am I comparing? Two, or three and more.
  4. Are the observations independent or paired? Paired data come from the same people measured twice (before and after), or from matched pairs (case–control matching).

Then check whether parametric assumptions are met.

[embed: node/01e53b25-8ae1]

The outcome type picks the family of tests; group count and pairing pick the test within it. The same choices in table form:

Research situationParametric testNon-parametric alternative
One group mean vs a known valueOne-sample t-testWilcoxon signed-rank (one-sample)
Two independent groups, continuousIndependent (unpaired) t-testMann–Whitney U test
Two paired measurements, continuousPaired t-testWilcoxon signed-rank test
Three or more independent groupsOne-way ANOVAKruskal–Wallis test
Three or more repeated measurementsRepeated-measures ANOVAFriedman test
Two categorical variables, independentChi-square testFisher's exact test (small samples)
Two categorical variables, paired—McNemar's test
Association between two continuous variablesPearson correlationSpearman rank correlation
Predict a continuous outcomeLinear regression—
Predict a binary outcomeLogistic regression—
Compare survival between groupsCox regression (adjusted)Log-rank test

Comparing means: t-tests and ANOVA

Student's t-test

The t-test compares means. The test statistic is the difference between means divided by its standard error:

t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}}

Assumptions: continuous outcome, approximately normal distribution in each group (or n > 30 per group), independent observations, and similar variances for the classic version.

There are three versions:

VersionWhen to useExample
One-sample t-testCompare one group's mean with a known or standard valueIs mean haemoglobin of pregnant women in a block different from 11 g/dL?
Independent (unpaired) t-testCompare means of two separate groupsMean systolic BP in smokers vs non-smokers
Paired t-testCompare two measurements on the same peopleMean weight before and after a 12-week diet programme

Tip: check equal variances with Levene's test. If variances differ, use Welch's t-test, which does not assume equal variances. Many statisticians now recommend Welch's version by default, and most software reports both.

Report: means ± SD for each group, the mean difference with 95% CI, t value, degrees of freedom and p-value.

Analysis of variance (ANOVA)

When you compare three or more groups, running several t-tests inflates the chance of a false positive. With three groups and three pairwise t-tests at α = 0.05, the overall error rate rises to about 14%. ANOVA tests all groups at once.

ANOVA compares variation between groups with variation within groups using the F-ratio:

F = \frac{\text{Mean square between groups}}{\text{Mean square within groups}}
  • One-way ANOVA: one grouping factor. Example: mean BMI across four socio-economic classes.
  • Two-way ANOVA: two factors and their interaction. Example: effect of diet type and sex on cholesterol.
  • Repeated-measures ANOVA: the same subjects measured three or more times. Example: blood sugar at 0, 3 and 6 months. It assumes sphericity; if Mauchly's test fails, apply the Greenhouse–Geisser correction.
  • ANCOVA: ANOVA adjusted for a continuous covariate, such as comparing post-treatment scores while adjusting for baseline scores.

A significant ANOVA only tells you that at least one group differs. To find which ones, use a post-hoc test: Tukey's HSD (all pairs, equal variances), Bonferroni (few planned comparisons, conservative), or Games–Howell (unequal variances).

Non-parametric tests: when data are not normal

Much medical data are skewed: hospital stay, income, CRP, triglycerides, number of children. Ordinal scales such as pain scores and Likert items are not truly continuous either. Non-parametric tests rank the values and compare the ranks, so extreme values have less influence.

TestReplacesUse forExample
Mann–Whitney U (Wilcoxon rank-sum)Independent t-testTwo independent groupsLength of hospital stay: private vs government ward
Wilcoxon signed-rankPaired t-testTwo paired measurementsPain score before and after physiotherapy
Kruskal–Wallis HOne-way ANOVAThree or more independent groupsQuality-of-life scores across three treatment arms
Friedman testRepeated-measures ANOVAThree or more repeated measuresAnxiety score at baseline, 1 month and 3 months
Spearman's rhoPearson correlationAssociation between ranked or skewed variablesEducation level and health literacy score

If Kruskal–Wallis is significant, follow it with Dunn's test (with Bonferroni correction) to see which pairs differ.

Report: median (IQR) for each group, the test statistic, and the p-value.

Remember: non-parametric tests are slightly less powerful than parametric tests when data really are normal. Don't use them by default — use them when the data call for them.

Categorical data: chi-square and related tests

Chi-square (χ²) test of independence

The most widely used test in community medicine. It checks whether two categorical variables are associated by comparing observed counts in a contingency table with the counts expected if there were no association:

\chi^2 = \sum \frac{(O - E)^2}{E}, \qquad E = \frac{\text{row total} \times \text{column total}}{\text{grand total}}

Degrees of freedom = (rows − 1) × (columns − 1).

Example: Is anaemia (yes/no) associated with dietary pattern (vegetarian/non-vegetarian) among adolescent girls?

Assumptions: independent observations, each person counted once, and expected count ≥ 5 in at least 80% of cells (and none below 1).

Related tests:

  • Fisher's exact test — use for 2×2 tables when any expected count is below 5, which is common in small studies.
  • Yates' continuity correction — sometimes applied to 2×2 tables; it is conservative, and many now prefer Fisher's exact test instead.
  • Chi-square for trend (Cochran–Armitage) — when one variable is ordered, such as age groups or number of cigarettes per day, and you want to test for a dose–response pattern.
  • Chi-square goodness-of-fit — compares observed distribution with an expected one, such as whether births are evenly spread across seasons.

McNemar's test

For paired categorical data. Example: proportion of women with correct knowledge about breastfeeding before and after a health education session in the same group. Only the discordant pairs (changed from correct to incorrect, or vice versa) contribute to the test.

For three or more related proportions, use Cochran's Q test.

Measures of association: don't stop at the p-value

A chi-square p-value tells you whether an association exists, not how strong it is. Always report a measure of effect with its 95% CI:

MeasureStudy designInterpretation
Relative risk (RR)Cohort studies, trialsRisk in exposed ÷ risk in unexposed
Odds ratio (OR)Case–control and cross-sectional studiesOdds of exposure in cases ÷ odds in controls
Risk difference / attributable riskCohort studies, trialsExcess risk due to exposure
Number needed to treat (NNT)Trials1 ÷ absolute risk reduction

An RR or OR of 1 means no association. If the 95% CI crosses 1, the result is not statistically significant.

Correlation and regression

Correlation

Correlation measures the strength and direction of a relationship between two variables. The coefficient (r) runs from −1 (perfect negative) through 0 (none) to +1 (perfect positive).

  • Pearson's r — both variables continuous, roughly normal, and related in a straight line. Example: BMI and waist circumference.
  • Spearman's rho (ρ) — ranked or skewed data, or a relationship that is consistently increasing but not linear.

A common rough guide: |r| below 0.3 weak, 0.3–0.7 moderate, above 0.7 strong. Always draw a scatter plot first — outliers and curved relationships can make r misleading.

Correlation is not causation. Ice-cream sales and drowning deaths are correlated because both rise in summer, not because one causes the other.

Simple and multiple linear regression

Regression goes a step further: it predicts the value of a continuous outcome from one or more predictors.

Y = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \dots + \beta_k X_k + \varepsilon
  • β₀ is the intercept; each β coefficient is the change in Y for a one-unit change in that predictor, holding the others constant.
  • R² is the proportion of variation in Y explained by the model.

Example: predicting systolic BP from age, BMI, salt intake and physical activity. Multiple regression lets you see the effect of salt intake after adjusting for the other factors — this is how confounding is controlled in analysis.

Assumptions (LINE): Linear relationship, Independent observations, Normally distributed residuals, Equal variance of residuals (homoscedasticity). Also check for multicollinearity (predictors highly correlated with each other) using the variance inflation factor (VIF).

Logistic regression

When the outcome is binary (yes/no: diabetic or not, died or survived), use binary logistic regression. It models the log-odds of the outcome, and the exponentiated coefficients give adjusted odds ratios (aOR).

Example: factors associated with low birth weight — maternal age, anaemia, antenatal visits and parity entered together, each reported as an aOR with 95% CI.

Practical points:

  • A common rule of thumb is about 10 outcome events per predictor to avoid an unstable model.
  • Many researchers first run bivariate tests and carry variables with p < 0.2 into the multivariable model, but choosing variables on prior knowledge (e.g., a causal diagram) is better practice.
  • Report model fit with the Hosmer–Lemeshow test and discrimination with the area under the ROC curve.
  • For outcomes with more than two unordered categories use multinomial logistic regression; for ordered categories, ordinal logistic regression.
  • For count outcomes (number of hospital visits), use Poisson or negative binomial regression.

Survival analysis

Used when the outcome is the time until an event and some participants have not had the event by the end of follow-up (they are censored). Ordinary means or proportions would discard this information.

  • Kaplan–Meier method — estimates and plots the probability of surviving (or remaining event-free) over time. Report median survival time.
  • Log-rank test — compares Kaplan–Meier curves between two or more groups. Example: time to relapse in TB patients with and without diabetes.
  • Cox proportional hazards regression — adjusts for several factors at once and gives hazard ratios (HR) with 95% CIs. It assumes the hazard ratio is constant over time; check this with Schoenfeld residuals or log-minus-log plots.

Agreement and reliability

Correlation does not measure agreement — two observers can be perfectly correlated yet consistently differ by 10 mmHg.

  • Cohen's kappa (κ) — agreement between two raters on a categorical rating, corrected for chance. Example: two doctors classifying chest X-rays as normal or abnormal. Roughly: below 0.4 poor-to-fair, 0.4–0.6 moderate, 0.6–0.8 substantial, above 0.8 almost perfect. Use Fleiss' kappa for more than two raters and weighted kappa for ordinal scales.
  • Intraclass correlation coefficient (ICC) — reliability of continuous measurements, such as repeated BP readings.
  • Bland–Altman plot — compares two methods of measuring the same thing (a new glucometer vs lab glucose) by plotting the differences against the means, with 95% limits of agreement.
  • Cronbach's alpha — internal consistency of a questionnaire scale; 0.7 or above is usually acceptable.

Evaluating diagnostic and screening tests

Central to PSM and epidemiology. From a 2×2 table of test result against a gold standard:

Disease presentDisease absent
Test positivea (true positive)b (false positive)
Test negativec (false negative)d (true negative)
MeasureFormulaMeaning
Sensitivitya ÷ (a + c)Ability to detect those with the disease
Specificityd ÷ (b + d)Ability to correctly rule out those without the disease
Positive predictive valuea ÷ (a + b)Chance a positive result is truly diseased
Negative predictive valued ÷ (c + d)Chance a negative result is truly disease-free
Likelihood ratio (+)Sensitivity ÷ (1 − specificity)How much a positive result raises the odds of disease

Predictive values depend on disease prevalence: the same test has a lower PPV in a low-prevalence community screening programme than in a hospital. The ROC curve plots sensitivity against 1 − specificity across cut-offs; the area under it (AUC) summarises overall accuracy, and Youden's index helps pick the best cut-off.

Common mistakes to avoid

  1. Multiple t-tests instead of ANOVA for three or more groups, which inflates the false-positive rate.
  2. Unpaired tests on paired data. Before–after data on the same people need a paired t-test, Wilcoxon or McNemar.
  3. Mean ± SD for skewed data. Use median (IQR), and a non-parametric test.
  4. Chi-square with tiny expected counts. Switch to Fisher's exact test.
  5. Treating "not significant" as "no effect". It may simply mean the study was underpowered. Look at the confidence interval.
  6. Confusing statistical and clinical significance. A 1 mmHg fall in BP can be "significant" in a sample of 10,000 and still be clinically meaningless.
  7. Using correlation to show agreement between two methods. Use Bland–Altman or ICC.
  8. Fishing for significance (p-hacking) — running many tests and reporting only the significant ones. Decide your primary analysis before collecting data, and adjust for multiple comparisons when needed.
  9. Ignoring confounders. A crude association may disappear or reverse after adjustment in multivariable regression.

Tips for reporting results

  • State in your methods which test was used for which comparison, the significance level, and the software and version.
  • Report descriptive statistics appropriate to the data: mean (SD) for normal data, median (IQR) for skewed data, n (%) for categorical data.
  • Give effect sizes with 95% CIs, and exact p-values to two or three decimal places (p < 0.001 for very small values).
  • Follow the relevant reporting guideline: CONSORT for trials, STROBE for observational studies, STARD for diagnostic accuracy studies.

Software options

SoftwareCostBest for
SPSSPaid (often institutional licence)Point-and-click analysis; widely used in Indian medical colleges
Epi InfoFree (CDC)Questionnaires, outbreak data and basic epidemiological analysis
Jamovi / JASPFreeSPSS-like menus, built on R
R / RStudioFreeFull flexibility, reproducible analysis and publication-quality graphs
StataPaidEpidemiology, survey data and regression modelling
OpenEpiFree, web-basedQuick sample size, 2×2 tables and confidence intervals

Conclusion

You don't need to memorise dozens of tests. Start with the type of outcome, decide what you are trying to show, count the groups, and check whether the data are paired and normally distributed. Most questions in clinical and community research then lead to one of about a dozen tests. Pair every p-value with an effect size and a confidence interval, and your analysis will be both correct and meaningful.

Further reading

  • Altman DG. Practical Statistics for Medical Research. Chapman & Hall/CRC.
  • Kirkwood BR, Sterne JAC. Essential Medical Statistics. Blackwell Science.
  • Mahajan BK. Methods in Biostatistics for Medical Students and Research Workers. Jaypee Brothers.
  • Park K. Park's Textbook of Preventive and Social Medicine — chapters on biostatistics and screening.
  • Bland JM, Altman DG. Statistical methods for assessing agreement between two methods of clinical measurement. The Lancet, 1986.

Related services