Is this article for me?
I've aimed this article at people in the following roles:
- students studying data-related courses
- professional data scientists
- professional data engineers
- professional machine learning engineers
- and other data-adjacent roles, such as data architects
Introduction
As a person working in a data-related role, you're always working with databases, building machine learning models that employ mathematics and statistics or using computer programming languages like Python.
This means that the term variable will almost always slightly take on a new meaning in your head depending on the data-related task you're carrying out in the moment.
That's why it is in your best interest to understand the term variable as applied in:
- Mathematics and statistics
- Computer programming
- Machine learning
- Databases
In this article, you'll specifically learn:
- the alternative name(s) of the term variable
- definition of a variable
- the different types of variables
Alternative names
In mathematics and statistics, variables are often referred to as unknowns, parameters, or coefficients.
In computer programming, variables are also called identifiers, memory locations, or placeholders.
In machine learning, variables are also known as features, predictors, or inputs.
In databases, variables are also called columns, fields, or attributes.
Definition
In mathematics, a variable is a quantity or symbol that can take on different values in a given equation or formula.
In computer programming, a variable is a memory location that holds a value, which can be manipulated and changed throughout the program. A value is assigned to a variable by using the equal sign operator(=).
In statistics, a variable is a characteristic or attribute that can be measured or observed, and can take on different values in a given population or sample. For example; 'income' is a variable that can vary between data units in a population
In machine learning, a variable is a feature or attribute that is used to build models and make predictions.
Types of variables
Types of variables in statistics
Categorical variables. They are further classified into:
- Nominal variable: A categorical variable in which the categories have no intrinsic and inherent order. This means that changing their order does not change their value. for example, listing male followed by female is no different than listing female followed by male.
- Ordinal variable: A categorical variable in which the categories have a natural order.
Continuous variables. They are further classified into:
- Interval variable: A continuous variable with equal intervals between values, but no true zero point.
- Ratio variable: A continuous variable with equal intervals between values and a true zero point.
Types of variables in computer programming
Numeric variable: A variable that holds a numerical value, such as an integer or floating-point number.
String variable: A variable that holds a string of characters, such as a word or sentence.
Boolean variable: A variable that holds a true or false value.
Array variable: A variable that holds a collection of values of the same data type.
Types of variables in machine learning
Input variable: A variable that represents a feature or attribute of the data being analyzed and is used to predict the output variable
Output variable: A variable that represents the predicted outcome or label.
Target variable: The variable being predicted in a machine learning model.
Predictor variable: A variable used to predict the target variable.
Types of variables in databases
Column variable: A variable that represents a column in a table, which corresponds to a specific attribute or property of the data.
CONCLUSION
The term variable is also used in fields like electrical engineering, physics and chemistry among others. And in those respective fields, it also slightly takes on a new meaning, has different alternative names and the types of variables are also different.
Top comments (0)