Variable

A variable, in data and statistics, is any characteristic or quantity that can take different values across the units being measured — age, revenue, country, pass/fail — and it is the basic unit that every table, dataset, and statistical model is built from. The term carries a different meaning in programming, where a variable is a named storage location holding a value that can change during execution, but the two senses converge in practice: a dataset's columns are variables in the statistical sense, and when that dataset is loaded into Python or R, each column typically becomes a variable in the programming sense too, which is part of why the vocabulary transferred cleanly between the two fields.

The first and most consequential classification a variable gets is quantitative versus categorical, because that single distinction determines which statistical operations and visualizations are even valid. A quantitative (numerical) variable measures an amount — height, temperature, order count — and supports arithmetic: averaging, summing, computing a standard deviation. A categorical variable assigns units to one of a fixed set of groups — color, country, customer segment — and arithmetic on it is meaningless even when the categories are stored as numbers (a product ID of 4 is not twice a product ID of 2). Running a quantitative operation like "average" on a categorical variable stored numerically is a common, silent analysis error, because nothing in the software stops the calculation from completing — it just produces a number with no valid interpretation.

Variable
a measured characteristic that differs across units
First split: can you do arithmetic on it?
Quantitative
amount — supports averaging, summing
Categorical
group label — arithmetic is meaningless
Second split within each
Discrete vs continuous
countable vs measured on a continuum
Ordinal vs nominal
ordered categories vs unordered categories
Correct choice of statistic, chart, and test
depends entirely on which cell this variable falls into

Within experimental and causal analysis, variables carry a second, functional classification: independent, dependent, and confounding. The independent variable is the one a researcher manipulates or treats as the input — a drug dosage, a price point, an ad creative. The dependent variable is the outcome being measured — recovery rate, purchase rate, click-through rate — named "dependent" because its value is hypothesized to depend on the independent variable. A confounding variable is a third factor, not deliberately controlled, that influences both the independent and dependent variables and can make an association between them look causal when it isn't — ice cream sales and drowning deaths both rise with warm weather, the confounder, with no causal link between the two.

A dependent variable's relationship to its inputs is what a statistical model formally describes, and "feature" is the term the same concept carries in a machine learning context specifically. Where "independent variable" comes from the statistics and experimental-design tradition, "feature" is the applied-machine-learning term for the same role — an input variable used to predict an outcome — and "feature engineering," the practice of constructing new input variables from raw data to improve a model's predictive power, is one of the most consequential and labor-intensive parts of building a working model, often mattering more to final model quality than the choice of algorithm itself.

A latent variable is a characteristic that can't be observed or measured directly but is inferred from variables that can be — intelligence, customer satisfaction, brand trust are all latent variables, estimated through survey responses, test scores, or behavioral proxies that are believed to correlate with the underlying thing of actual interest. This distinction matters in analysis because a latent variable's proxy is never a perfect stand-in: a satisfaction survey score measures the survey response, not satisfaction itself, and every model built on a latent variable inherits the gap between the two.

Read "variable" as the atomic unit every downstream statistical and analytical choice hinges on: whether it is quantitative or categorical decides what arithmetic is valid, whether it functions as independent, dependent, or confounding decides what causal story is being told, and whether it is directly observed or only inferred through a proxy decides how much trust any conclusion built on it actually deserves.

Take variable further

Ask the copilot about this term, or have our engineers assess it against your process.