Numerical Variable
A numerical variable is a variable whose values are numbers on which arithmetic is meaningful — height, income, number of children, reaction time, temperature — so differences between values, and for many such variables their averages, describe something real about the world. It is the counterpart to a categorical variable, and the entry here concerns how a numeric column behaves as a modeling and analysis object rather than how the underlying data were collected.
A numerical variable is defined by the meaningfulness of its numeric structure, and that is tested by asking whether the gaps are interpretable: is the difference between 30 and 40 the same kind of thing as the difference between 70 and 80? Many columns that are stored as numbers fail the test and are really categorical, such as an identifier or a survey code. Some pass partially: a 1-to-5 satisfaction rating has an order but unequal gaps, and analysts regularly treat it as numeric by convention while knowing the assumption is a stretch. Numerical variables split into discrete ones (countable values) and continuous ones (any value in an interval), and both subtypes have their own entries; the distinction between them determines which probability models apply, while the quality of the numbers determines which summaries are honest.
Numerical variables are summarized by center, spread, and shape, and the right summary depends on the distribution rather than on the type alone. The mean and standard deviation suit roughly symmetric data; the median and interquartile range suit skewed data or data with outliers, such as incomes. Histograms, box plots, and density plots reveal shape, and Francis Anscombe's 1973 quartet showed that four datasets with nearly identical means, variances, and regression lines can look utterly different when plotted, which is the standing argument for plotting before summarizing. Transformations such as the logarithm, the square root, or the Box-Cox family (George Box and David Cox, 1964) are used to tame skew and to stabilize variance.
In practice, handling numerical variables is mostly about scale, missingness, and outliers. Algorithms based on distances or gradient descent (k-nearest neighbors, support vector machines, neural networks, ridge and lasso regression) are sensitive to feature scale, so a variable measured in millions can swamp one measured in fractions unless both are standardized; tree-based models are largely indifferent to monotone rescaling. Missing values are imputed with a center or by model, with an indicator added when the missingness itself carries signal. Outliers are inspected before being trimmed or winsorized, since sometimes they are errors (a recorded age of 999) and sometimes they are the most important rows in the data.
Common mistakes include assuming a numeric type means a numeric meaning, discretizing carelessly, and forgetting units. Dichotomizing a numerical variable at its median throws away information and can create spurious effects, a point made repeatedly in the methodological literature. Mixing units — pounds and kilograms, or currencies and years — in a single column silently corrupts every statistic computed from it. And correlating or averaging numbers that arise from different processes, such as a mean of percentages with different denominators, produces a figure that looks authoritative while answering no real question.
Read a numerical variable as a column of numbers that earns its numeric treatment only to the extent the spacing between values means something: the type decides which arithmetic is allowed, the distribution decides which summary is honest, and the scale decides whether the algorithm will notice the feature at all.