"> What Is a Variable in Statistics? Types & Levels
Home > Library > Statistics > What Is a Variable in Statistics? Types and Measurement Levels

Published by at September 22nd, 2021 , Revised On June 16, 2026

A variable in statistics is any characteristic, number or quantity that can take more than one value across the people or things you measure. In statistical analysis, the type of a variable — and, more precisely, its level of measurement — decides how you can summarise it and, crucially, which statistical test you are allowed to run on it. Get the variable type right and the rest of the analysis falls into place; get it wrong and even a powerful technique will produce a meaningless answer.

That is the angle this guide takes. If you only want a plain catalogue of variable types (independent, dependent, control and so on), our general guide to types of variables covers that in full. Here we focus on variables as they actually appear in statistical tests: how they are classified by data family and measurement level, the roles they play in a study, and how those two classifications together point you to the right analysis.

“A variable is any characteristic, number, or quantity that can be measured or counted. A variable may also be called a data item.” — Australian Bureau of Statistics, Statistical Language glossary

What Is a Variable?

A variable is an attribute to which different values can be assigned. The value can be a category, a count or a measured quantity. It is sometimes called a data item — in short, it is anything that can vary from one observation to the next. The opposite of a variable is a constant, a quantity that never changes (the speed of light, or the number of days in a non-leap year). Examples of variables include gender, monthly expenses, hair colour, the number of schools in a city, blood pressure and reaction time.

For statistical purposes, variables are described in two complementary ways, and you need both to plan an analysis:

  • By role in the study — chiefly independent (the presumed cause you manipulate or compare) and dependent (the outcome you measure), with supporting roles such as control, confounding and moderator variables.
  • By level of measurementnominal, ordinal, interval or ratio. This is the classification that determines which descriptive statistics and which test are valid.

Most variables also fall into one of two broad data families: categorical (qualitative) or quantitative (numeric). The two systems overlap — categorical variables are usually nominal or ordinal, while quantitative variables are usually interval or ratio — but it is worth keeping them apart in your mind, because role and level answer different questions. We will look at each family first, then map them onto the four measurement levels, and finally show how the pairing of variables drives test choice.

Types of variables in statistical analysis

Frequently Asked Questions

What is a variable in statistics?

A variable in statistics is any attribute, characteristic or quantity that can take different values across the units you observe — for example age, gender or income. Its type and level of measurement determine how it can be summarised and which statistical test applies.

The two main types are categorical (qualitative) variables, which sort observations into groups such as colour or blood type, and quantitative (numeric) variables, which record amounts such as height or count. Quantitative variables divide further into discrete and continuous.

The four levels are nominal (labels, no order), ordinal (ranked, unequal gaps), interval (equal gaps, no true zero) and ratio (equal gaps with a true zero). The level determines which averages, measures of spread and tests are valid. See our levels of measurement guide.

The measurement levels of your independent and dependent variables narrow the choice of test. A continuous outcome with a two-group categorical predictor suggests a t-test; three or more groups suggest ANOVA; two categorical variables suggest a chi-square test; two continuous variables suggest correlation or regression; a binary outcome suggests logistic regression. Our guide on which statistical test to use walks through this.

A discrete variable takes separate, countable values with gaps between them, such as the number of children. A continuous variable can take any value within a range, including fractions, such as height or time — between any two values there is always another.

The independent variable is the presumed cause you manipulate or compare; the dependent variable is the outcome you measure and expect to change in response. In a study of training on test scores, training is the independent variable and the score is the dependent variable.

A single Likert item (for example “strongly disagree” to “strongly agree”) is ordinal, because the categories are ranked but the gaps between them are not guaranteed to be equal. Researchers sometimes treat the sum of many Likert items as approximately interval, but this is an assumption that should be stated and justified. See our guide to ordinal data.

About Aadam Mae

Avatar for Aadam MaeAadam Mae, an academic researcher and author with a PhD in NLP (Natural Language Processing) at ResearchProspect. Mae's work delves into the intricacies of language and technology, delivering profound insights in concise prose. Pioneering the future of communication through scholarship.

WhatsApp Live Chat