The first question you must answer before choosing any statistical test
Every statistical test has rules about what kind of data it can handle. Use the wrong test for your variable type and your results are meaningless.
This lesson teaches you to classify variables correctly. It's the foundation of every analysis.
Before you can choose between a t-test, chi-square, or Kaplan-Meier, you need to answer one question:
"What type of variable am I analyzing?"
Every variable in clinical research falls into one of these categories.
Measurable on a scale with infinite possible values between any two points.
Examples: Blood pressure, serum creatinine, operative time, BMI, age
Two mutually exclusive groups. You're either in one or the other.
Examples: Alive/dead, smoker/non-smoker, wound infection yes/no, male/female
Categories with a meaningful order, but the intervals between them aren't necessarily equal.
Examples: Rutherford classification (0-6), wound grade (I-IV), pain scale (1-10), ASA class
How long until something happens, often with censoring (patients lost to follow-up).
Examples: Survival time, time to graft failure, months to reintervention, disease-free survival
The key distinction: Can you do arithmetic with the values? If the "distance" between values matters and is consistent, it's continuous. If only the rank matters, it's ordinal.
Using the wrong test for your variable type doesn't just reduce power. It can make your results meaningless.
The variable type determines which tests are valid. Get this wrong and everything downstream is wrong: your p-values, your confidence intervals, your conclusions.
Some variables aren't as obvious as they seem. Here's how to think about them.
"Is age continuous or categorical?"
Continuous. Age is measured on a continuous scale. But researchers often categorize it into groups like "≥65 vs <65" for convenience. This loses information and statistical power. Keep it continuous unless you have a strong clinical reason to categorize.
"Is pain scale 1-10 continuous?"
No, it's ordinal. The difference between pain of 2 and 3 isn't the same as the difference between 7 and 8. These are subjective ratings on an ordered scale, not true measurements. Use non-parametric tests.
"What about counts (number of readmissions)?"
Technically discrete/count data. Often treated as continuous if the range is large (like number of clinic visits over a year). But if the range is small (0, 1, 2, 3 readmissions), consider it as a count variable needing special methods like Poisson regression.
"What about percentages?"
Continuous, but bounded. Ejection fraction (0-100%) is continuous, but can't go below 0 or above 100. May need special handling at the extremes.
Dichotomizing continuous variables (e.g., "high" vs "low" creatinine) is almost always wrong. You lose statistical power and create arbitrary cutoffs. Keep variables in their natural form unless there's a validated clinical threshold.
For each clinical variable, identify its type.
→ t-tests, ANOVA, linear regression, correlation
→ Chi-square, Fisher's exact, logistic regression
→ Mann-Whitney U, Kruskal-Wallis, ordinal regression
→ Kaplan-Meier, Cox regression, log-rank test
How to classify any clinical variable into one of four types. This is the first step in choosing the right statistical test, and you'll never pick the wrong one because you misidentified your variable type.
Next lesson: Outcome vs Predictor. Which variable are you trying to explain?