Which Statistical Test Should I Use?

An interactive decision tool that picks the right statistical test for your data — comparing groups, testing associations or building a model — and gives you the exact R function to run it.

Answer a few questions about your data and this tool recommends an appropriate statistical test, with the R function to run it. It covers the tests behind the vast majority of applied analyses — a starting point, not a substitute for judgement about your specific design and assumptions.

How it works

The logic behind the recommendation

Choosing a test comes down to a handful of questions:

  1. What’s your goal — comparing groups, measuring an association, or building a predictive model?
  2. What type is your outcome — continuous, ordinal, categorical, or time-to-event?
  3. How many groups, and are they independent or paired?
  4. Do the assumptions hold — chiefly, is a continuous outcome roughly normal? If not, a nonparametric (rank-based) test is safer.

This tool encodes the standard version of that decision tree. Real analyses can need more — checking assumptions properly, adjusting for confounders, handling missing data — but this gets you to the right family of test and the R function to run it.