Page |1
1.3 Types of Variables
A variable is any characteristics, number, or quantity that can be measured or counted. A
variable may also be called a data item. Age, sex, business income and expenses, country
of birth, capital expenditure, class grades, eye colour and vehicle type are examples of
variables. It is called a variable because the value may vary between data units in a
population, and may change in value over time.
For example; 'income' is a variable that can vary between data units in a population (i.e.
the people or businesses being studied may not have the same incomes) and can also
vary over time for each data unit (i.e. income can go up or down).
Types of data: Quantitative vs categorical variables
Data is a specific measurement of a variable – it is the value you record in your data sheet. Data
is generally divided into two categories:
Quantitative data represents amounts.
Categorical data represents groupings.
A variable that contains quantitative data is a quantitative variable; a variable that contains
categorical data is a categorical variable. Each of these types of variable can be broken down
into further types.
Quantitative variables
When you collect quantitative data, the numbers you record represent real amounts that can be
added, subtracted, divided, etc. There are two types of quantitative variables: discrete and
continuous.
Discrete vs continuous variables
What does the data
Type of variable Examples
represent?
Number of students in a
class
Discrete variables (aka Counts of individual items or
integer variables) values.
Number of different tree
species in a forest
Distance
Continuous variables (aka Measurements of continuous Volume
ratio variables) or non-finite values.
Age
Categorical variables
Categorical variables represent groupings of some kind. They are sometimes recorded as
numbers, but the numbers represent categories rather than actual amounts of things.
There are three types of categorical variables: binary, nominal, and ordinal variables.
Page |2
Binary vs nominal vs ordinal variables
What does the data
Type of variable Examples
represent?
Heads/tails in a coin flip
Binary variables (aka
Yes/no outcomes.
dichotomous variables)
Win/lose in a football game
Species names
Groups with no rank or Colors
Nominal variables
order between them.
Brands
Finishing place in a race
Groups that are ranked in a
Ordinal variables
specific order. Rating scale responses in a
survey*
*Note that sometimes a variable can work as more than one type! An ordinal variable can also
be used as a quantitative variable if the scale is numeric and doesn’t need to be kept as discrete
integers. For example, star ratings on product reviews are ordinal (1 to 5 stars), but the average
star rating is quantitative.
Example data sheet
To keep track of your salt-tolerance experiment, you make a data sheet where you record
information about the variables in the experiment, like salt addition and plant health.
To gather information about plant responses over time, you can fill out the same data sheet every
few days until the end of the experiment. This example sheet is color-coded according to the
type of variable: nominal, continuous, ordinal, and binary.
Parts of the experiment: Independent vs dependent variables
Experiments are usually designed to find out what effect one variable has on another – in our
example, the effect of salt addition on plant growth.
You manipulate the independent variable (the one you think might be the cause) and then
measure the dependent variable (the one you think might be the effect) to find out what this
effect might be.
Page |3
You will probably also have variables that you hold constant (control variables) in order to
focus on your experimental treatment.
Independent vs dependent vs control variables
Example (salt tolerance
Type of variable Definition
experiment)
Variables you manipulate in
Independent variables (aka The amount of salt added to
order to affect the outcome of
treatment variables) each plant’s water.
an experiment.
Any measurement of plant
Dependent variables (aka Variables that represent the
health and growth: in this case,
response variables) outcome of the experiment.
plant height and wilting.
The temperature and light in the
Variables that are held constant room the plants are kept in, and
Control variables
throughout the experiment. the volume of water given to
each plant.
Example data sheet
In this experiment, we have one independent and three dependent variables.
The other variables in the sheet can’t be classified as independent or dependent, but they do
contain data that you will need in order to interpret your dependent and independent variables.
What about correlational research?
When you do correlational research, the terms “dependent” and “independent” don’t apply,
because you are not trying to establish a cause and effect relationship.
However, there might be cases where one variable clearly precedes the other (for example,
rainfall leads to mud, rather than the other way around). In these cases you may call the
preceding variable (i.e. the rainfall) the predictor variable and the following variable (i.e. the
mud) the outcome variable.
Page |4
Other common types of variables
Once you have defined your independent and dependent variables and determined whether they
are categorical or quantitative, you will be able to choose the correct statistical test.
But there are many other ways of describing variables that help with interpreting your results.
Some useful types of variable are listed below.
Example (salt tolerance
Type of variable Definition
experiment)
A variable that hides the true effect of Pot size and soil type might affect
another variable in your experiment. plant survival as much or more than
Confounding This can happen when another variable salt additions. In an experiment you
variables is closely related to a variable you are would control these potential
interested in, but you haven’t controlled confounders by holding them
it in your experiment. constant.
Salt tolerance in plants cannot be
A variable that can’t be directly measured directly, but can be
Latent variables measured, but that you represent via a inferred from measurements of plant
proxy. health in our salt-addition
experiment.
A variable that is made by combining The three plant health variables
Composite multiple variables in an experiment. could be combined into a single
variables These variables are created when you plant-health score to make it easier
analyze data, not when you measure it. to present your findings.
What are the types of variables?
There are different ways variables can be described according to the ways they can be
studied, measured, and presented.
Numeric variables have values that describe a measurable quantity as a number, like
'how many' or 'how much'. Therefore numeric variables are quantitative variables.
Numeric variables may be further described as either continuous or discrete:
A continuous variable is a numeric variable. Observations can take any value between
a certain set of real numbers. The value given to an observation for a continuous variable
can include values as small as the instrument of measurement allows. Examples of
continuous variables include height, time, age, and temperature.
A discrete variable is a numeric variable. Observations can take a value based on a
count from a set of distinct whole values. A discrete variable cannot take the value of a
fraction between one value and the next closest value. Examples of discrete variables
include the number of registered cars, number of business locations, and number of
children in a family, all of of which measured as whole units (i.e. 1, 2, 3 cars).
The data collected for a numeric variable are quantitative data.
Page |5
Categorical variables have values that describe a 'quality' or 'characteristic' of a data unit,
like 'what type' or 'which category'. Categorical variables fall into mutually exclusive (in
one category or in another) and exhaustive (include all possible options) categories.
Therefore, categorical variables are qualitative variables and tend to be represented by a
non-numeric value.
Categorical variables may be further described as ordinal or nominal:
An ordinal variable is a categorical variable. Observations can take a value that can be
logically ordered or ranked. The categories associated with ordinal variables can be
ranked higher or lower than another, but do not necessarily establish a numeric
difference between each category. Examples of ordinal categorical variables include
academic grades (i.e. A, B, C), clothing size (i.e. small, medium, large, extra large) and
attitudes (i.e. strongly agree, agree, disagree, strongly disagree).
A nominal variable is a categorical variable. Observations can take a value that is not
able to be organised in a logical sequence. Examples of nominal categorical variables
include sex, business type, eye colour, religion and brand.
We can distinguish between two types of variables according to the level of
measurement:
Continuous or Quantitative Variables.
Discrete or Qualitative Variables.
A quantitative variable is one in which the variates differ in magnitude, e.g. income, age,
GNP, etc. A qualitative variable is one in which the variates differ in kind rather than in
magnitude, e.g. marital status, gender, nationality, etc.
Continuous or Quantitative Variables
Continuous variables can be classified into three categories:
Interval - scale Variables:
Interval scale data has order and equal intervals. Interval scale variables are measured on
a linear scale, and can take on positive or negative values. It is assumed that the intervals
keep the same importance throughout the scale. They allow us not only to rank order the
items that are measured but also to quantify and compare the magnitudes of differences
between them. We can say that the temperature of 40°C is higher than 30°C, and an
increase from 20°C to 40°C is twice as much as the increase from 30°C to 40°C. Counts
are interval scale measurements, such as counts of publications or citations, years of
education, etc.
Continuous Ordinal Variables
Page |6
They occur when the measurements are continuous, but one is not certain whether they
are on a linear scale, the only trustworthy information being the rank order of the
observations. For example, if a scale is transformed by an exponential, logarithmic or
any other nonlinear monotonic transformation, it loses its interval - scale property. Here,
it would be expedient to replace the observations by their ranks.
Ratio - scale Variables
These are continuous positive measurements on a nonlinear scale. A typical example is
the growth of bacterial population (say, with a growth function AeBt.). In this model,
equal time intervals multiply the population by the same ratio. (Hence, the name ratio -
scale).
Ratio data are also interval data, but they are not measured on a linear scale. . With
interval data, one can perform logical operations, add, and subtract, but one cannot
multiply or divide. For instance, if a liquid is at 40 degrees and we add 10 degrees, it will
be 50 degrees. However, a liquid at 40 degrees does not have twice the temperature of a
liquid at 20 degrees because 0 degrees does not represent "no temperature" -- to multiply
or divide in this way we would have to use the Kelvin temperature scale, with a true zero
point (0 degrees Kelvin = -273.15 degrees Celsius). In social sciences, the issue of "true
zero" rarely arises, but one should be aware of the statistical issues involved.
There are three different ways to handle the ratio-scaled variables.
Simply as interval scale variables. However this procedure should be avoided as it can
distort the results.
As continuous ordinal scale.
By transforming the data (for example, logarithmic transformation) and then treating the
results as interval scale variables.
Qualitative or Discrete Variables
Discrete variables are also called categorical variables. A discrete variable, X, can take
on a finite number of numerical values, categories or codes. Discrete variables can be
classified into the following categories:
Nominal variables
Ordinal variables
Dummy variables from quantitative variables
Preference variables
Multiple response variables
Nominal Variables
Nominal variables allow for only qualitative classification. That is, they can be
measured only in terms of whether the individual items belong to certain distinct
categories, but we cannot quantify or even rank order the categories: Nominal
Page |7
data has no order, and the assignment of numbers to categories is purely
arbitrary. Because of lack of order or equal intervals, one cannot perform
arithmetic (+, -, /, *) or logical operations (>, <, =) on the nominal data. Typical
examples of such variables are:
Gender: 1. Male
2. Female
Marital Status: 1. Unmarried
2. Married
3. Divorcee
4. Widower
Ordinal Variables
A discrete ordinal variable is a nominal variable, but its different states are ordered in a
meaningful sequence. Ordinal data has order, but the intervals between scale points may
be uneven. Because of lack of equal distances, arithmetic operations are impossible, but
logical operations can be performed on the ordinal data. A typical example of an ordinal
variable is the socio-economic status of families. We know 'upper middle' is higher than
'middle' but we cannot say 'how much higher'. Ordinal variables are quite useful for
subjective assessment of 'quality; importance or relevance'. Ordinal scale data are very
frequently used in social and behavioral research. Almost all opinion surveys today
request answers on three-, five-, or seven- point scales. Such data are not appropriate for
analysis by classical techniques, because the numbers are comparable only in terms of
relative magnitude, not actual magnitude.
Consider for example a questionnaire item on the time involvement of scientists in the
'perception and identification of research problems'. The respondents were asked to
indicate their involvement by selecting one of the following codes:
1 = Very low or nil
2 = Low
3 = Medium
4 = Great
5 = Very great
Here, the variable 'Time Involvement' is an ordinal variable with 5 states.
Ordinal variables often cause confusion in data analysis. Some statisticians treat them as
nominal variables. Other statisticians treat them as interval scale variables, assuming that
the underlying scale is continuous, but because of the lack of a sophisticated instrument,
they could not be measured on an interval scale.
3. Dummy Variables from Quantitative Variables
Page |8
A quantitative variable can be transformed into a categorical variable, called a dummy
variable by recoding the values. Consider the following example: the quantitative
variable Age can be classified into five intervals. The values of the associated categorical
variable, called dummy variables, are 1, 2,3,4,5:
[Up to 25] 1
[25, 40 ] 2
[40, 50] 3
[50, 60] 4
[Above 60] 5
Preference Variables
Preference variables are specific discrete variables, whose values are either in a
decreasing or increasing order. For example, in a survey, a respondent may be asked to
indicate the importance of the following nine sources of information in his research and
development work, by using the code [1] for the most important source and [9] for the
least important source:
Literature published in the country
Literature published abroad
Scientific abstracts
Unpublished reports, material, etc.
Discussions with colleagues within the research unit
Discussions with colleagues outside the research unit but within institution
Discussions with colleagues outside the institution
Scientific meetings in the country
Scientific meetings abroad
Note that preference data are also ordinal. The interval distance from the first preference
to the second preference is not the same as, for example, from the sixth to the seventh
preference.
Multiple Response Variables
Page |9
Multiple response variables are those, which can assume more than one value. A typical
example is a survey questionnaire about the use of computers in research. The
respondents were asked to indicate the purpose(s) for which they use computers in their
research work. The respondents could score more than one category.
Statistical analysis
Lab automation/ process control
Data base management, storage and retrieval
Modeling and simulation
Scientific and engineering calculations
Computer aided design (CAD)
Communication and networking
Graphics
Since IDAMS does not handle multiple response variables, dummy variables have to be
created for each category prior to analysis.