# Variables

## Archived Content

Information identified as archived is provided for reference, research or recordkeeping purposes. It is not subject to the Government of Canada Web Standards and has not been altered or updated since it was archived. Please contact us to request a format other than those available.

The word variable is often used in the study of statistics, so it is important to understand its meaning. A variable is a characteristic that may assume more than one set of values to which a numerical measure can be assigned.

Height, age, amount of income, province or country of birth, grades obtained at school and type of housing are all examples of variables. Variables may be classified into various categories, some of which are outlined in this section.

## Categorical variables

A categorical variable (also called qualitative variable) is one for which each response can be put into a specific category. These categories must be mutually exclusive and exhaustive. Mutually exclusive means that each possible survey response should belong to only one category, whereas, exhaustive requires that the categories should cover the entire set of possibilities. Categorical variables can be either nominal or ordinal.

## Nominal variables

A nominal variable is one that describes a name or category. Contrary to ordinal variables, there is no 'natural ordering' of the set of possible names or categories. Sex and type of dwelling are examples of nominal variables. In Table 1, the variable "mode of transportation for travel to work" is nominal because it describes the category of transportation.

Table 1. Method of travel to work for Canadians
Mode of transportation for travel to work Number of people
Car, truck, van as driver 9,929,470
Car, truck, van as passenger 923,975
Public transit 1,406,585
Walked 881,085
Bicycle 162,910
Other methods 146,835

## Ordinal variables

An ordinal variable is a categorical variable for which the possible categories can be placed in a specific order or in some 'natural' way. In Table 2, the variable 'behaviour' is ordinal because the category 'Excellent' is better than the category 'Very good', etc. There is some natural ordering, but it is limited since we do not know by how much 'Excellent' behaviour is better than 'Very good' behaviour.

Table 2. Student behaviour ranking
Behaviour Number of students
Excellent 5
Very good 12
Good 10

## Numeric variables

A numeric variable, also known as a quantitative variable, is one that can assume a number of real values—such as age or number of people in a household. However, not all variables described by numbers are considered numeric. For example, when you are asked to assign a value from 1 to 5 to express your level of satisfaction, you use numbers, but the variable (satisfaction) is really an ordinal variable.

Numeric variables may be either continuous or discrete.

## Continuous variables

A variable is said to be continuous if it can assume an infinite number of real values. Examples of a continuous variable are distance, age and temperature.

The measurement of a continuous variable is restricted by the methods used, or by the accuracy of the measuring instruments. For example, the height of a student is a continuous variable because a student may be 1.6321748755... metres tall.

However, when the height of a person is measured, it is usually measured to the nearest centimetre. Thus, this student's height would be recorded as 1.63 m.

Note: To make them easier to handle, continuous variables are usually grouped into "class intervals", which will be discussed later in this chapter. Grouping variables is part of the process of organizing data so that they become useful information.

## Discrete variables

As opposed to a continuous variable, a discrete variable can only take a finite number of real values. An example of a discrete variable would be the score given by a judge to a gymnast in competition: the range is 0 to 10 and the score is always given to one decimal (e.g., a score of 8.5).

Discrete variables may also be grouped. Again, grouping variables makes them easier to handle.

Note: Measurement of a continuous variable is always a discrete approximation.