Descriptive statistics

Types of quantitative data

When undertaking any statistical analysis, the type of statistics calculated or statistical test undertaken depends to a large extent on the type of variable being analysed. In this section you will learn about continuous, categorical and nominal variables.

 

A variable is by definition, something that you measure that is able to vary. For example, height, weight and gender are variables. In contrast, a constant is something that always keeps the same value. Examples include pi (approximately 3.142) and e (approximately 2.718).  Variables can broadly be divided into two types, categorical and numerical.

 

Categorical variables can be dichotomous (also called binary), nominal or ordinal.

Nominal variables (from Latin for name) are things like eye colour or hair colour. We might have: 1=blue eyes, 2=brown eyes, 3=green eyes. However, we might equally have: 1=brown eyes, 2=green eyes, 3=blue eyes. In other words, is the label that is important, not the number attached to it. When we describe nominal variables or dichotomous variables, we simply count the number and percentage in each category. It would make no sense to for example, ask what the average eye colour is!

Dichotomous variables are nominal variables that can only take on two values, for example males and females. They are often coded 0 or 1, for example 0=males, 1=females. Dichotomous variables can either be true dichotomous variables like dead or alive, or they can be continuous, nominal or ordinal variables divided into two categories.

Ordinal variables have categories in which only the ordering counts. For example, we might have 0=no disease, 1=mild disease, 2=severe disease. There is a clear order here. However the distance between no disease and mild disease, might not be the same as the distance between mild disease and severe disease – only the ordering is important.

 

Numerical data can be counts or continuous variables.

Counts are whole numbers starting from zero. Typical variables that are counts are cells on an agar plate, falls in a hospital, or the number of people with a particular disease.

Continuous variables are things like blood pressure, height and body temperature. They can take on any number between their minimum and maximum value. Continuous variables are sometimes divided into interval variables and ratio variables.

In an interval variable the distance between readings is interpreted the same no matter where you are on the continuum. For example, the distance between 3kg and 5kg, is the same as the distance between 7kg and 9kg.

Ratio variables are interval variables where zero means the absence of something. For example, height is a ratio variable. On the other hand, temperature in degrees centigrade is not a ratio variable, since zero degrees does not mean the absence of temperature. Since interval and ratio variables are in most cases described and analysed in the same way, from here on, we will simply call them continuous variables.