In statistics, a variable is a characteristic of interest that can be measured or counted. Variables can be classified into two main categories: categorical and numeric. Categorical variables refer to characteristics that cannot be quantified, and they can be either nominal or ordinal. Nominal variables describe a name, label, or category without natural order, while ordinal variables have a natural order. Examples of categorical variables include sex, type of dwelling, and mode of transportation for travel to work. Numeric variables, on the other hand, are quantifiable characteristics whose values are numbers, and they can be either continuous or discrete. Continuous variables can take on any value within a range, while discrete variables can only take on specific values. Examples of numeric variables include height, weight, and age.
Variables are important in statistical research because they are attributes of an object of study, and choosing which variables to measure is central to good research. Statisticians measure, record, and analyze variables to understand the type of information they record and their role in an experiment or study. By understanding the different types of variables, statisticians can analyze and interpret data more effectively.