Most variables in a data set are either numerical or categorical.

Numerical variables

These have values that are numbers and can be further classified into:

Discrete numerical variable
A variable whose values are whole numbers (counts) is called discrete.
Continuous numerical variable
A variable that may contain any value within some range is called continuous.

Statistical methods that can be used for continuous variables are not always appropriate for discrete variables.

Categorical variables

The values of a categorical variable are selected from a small group of categories. A further classification is:

Ordinal categorical variable
This arises when the categories can be meaningfully ordered.
Nominal categorical variable
If it does not matter which way its categories are ordered, the variable is called nominal.

Most statistical methods for categorical data can be applied to both ordinal and nominal variables.

Labels

In some data sets, each individual has a unique 'name' that can be used to identify it. We call this a label variable.

Warning!

When you see a column of numbers in your data matrix, do not assume that it is a numerical variable.

Numbers are sometimes used as codes for categorical or label variables.