Variables are concepts that can be observed to vary.
There are four levels of measurement of variables.
1. Nominal
2. Ordinal
3. Interval
4. Ratio
Nominal variables are categorical. When numbers are used to represent the categories, no number is greater than or less that any other number.
For example, for the variable Sex, 1 = Men and 2 = Women.
Ordinal variables are categorical but the categories are numerically ranked from lowest to highest. For example, for the variable Happiness, as in the response to the question "How happy are you?", the answers are
1 = Very unhappy, 2 = Unhappy, 3 = Neutral, 4 = Happy, 5 = Very Happy
You can specify that ordinal variables are either categorical or continuous.
Interval variables are continuous and can be represented by numbers. For example, the variable Age can be 18, 19, 20, 21, 22 etc. The distance between any two numbers (e.g. 18 and 19) is the same as the distance between any other two numbers (e.g. 19 and 20).
Ratio variables are continuous and are similar to interval variables. The difference is that Ratio variables have a "true" zero point, whereas the value of zero for an interval variable may or may not have a "true" meaning.