Total Points: 0
Back to Lessons Variable Types 0 pts Module 2 · Lesson 2
Introduction

Variable Types

The first question you must answer before choosing any statistical test

Why This Matters

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?"

The Four Variable Types

Every variable in clinical research falls into one of these categories.

Continuous

Measurable on a scale with infinite possible values between any two points.

Examples: Blood pressure, serum creatinine, operative time, BMI, age

Categorical (Binary)

Two mutually exclusive groups. You're either in one or the other.

Examples: Alive/dead, smoker/non-smoker, wound infection yes/no, male/female

Ordinal

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

Time-to-Event

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.

Why Getting This Wrong Breaks Everything

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.

The Tricky Cases

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.

The Common Mistake

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.

Exercise: Classify the Variable

For each clinical variable, identify its type.

Continuous
Categorical (Binary)
Ordinal
Time-to-Event
Question 1 of 8

The Bottom Line

0
Total Points Earned
Exercise (0/8 correct) +0 pts
Lesson Completed +100 pts

Continuous

→ t-tests, ANOVA, linear regression, correlation

Categorical

→ Chi-square, Fisher's exact, logistic regression

Ordinal

→ Mann-Whitney U, Kruskal-Wallis, ordinal regression

Time-to-Event

→ Kaplan-Meier, Cox regression, log-rank test

You Now Know

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?