In statistics, a variable refers to a source (of data) that is measurable or observable. A variable could be something like temperature, mass, height, make of car, type of animal or goals scored. In most cases, we would expect a variable to change between each observation.
Data variables can be defined as either numerical or categorical.
Discrete numerical data involve data points that are distinct and separate from each other. There is a definite gap separating one data point from the next. Discrete data usually, but not always, consists of whole numbers, and is often collected by some form of counting.
Examples of discrete data:
Number of goals scored per match | $1$1, $3$3, $0$0, $1$1, $2$2, $0$0, $2$2, $4$4, $2$2, $0$0, $1$1, $1$1, $2$2, $\ldots$… |
Number of children per family | $2$2, $3$3, $1$1, $0$0, $1$1, $4$4, $2$2, $2$2, $0$0, $1$1, $1$1, $5$5, $3$3, $\ldots$… |
Number of products sold each day | $437$437, $410$410, $386$386, $411$411, $401$401, $397$397, $422$422, $\ldots$… |
In each of these cases, there are no in-between values. We cannot have $2.5$2.5 goals or $1.2$1.2 people, for example.
This doesn't mean that discrete data always consists of whole numbers. Shoe sizes, an example of discrete data, are often separated by half-sizes. For example, $8$8, $8.5$8.5, $9$9, $9.5$9.5. Even still, there is a definite gap between the sizes. A shoe won't ever come in size $8.145$8.145.
Continuous numerical data involves data points that can occur anywhere along a continuum. Any value is possible within a range of values. Continuous data usually consists of decimal numbers, and is often collected using some form of measurement.
Examples of continuous data:
Height of trees in a forest (in metres) | $12.359$12.359, $14.022$14.022, $14.951$14.951, $18.276$18.276, $11.032$11.032, $\ldots$… |
Times taken to run a $10$10 km race (minutes) | $55.34$55.34, $58.03$58.03, $57.25$57.25, $61.49$61.49, $66.11$66.11, $59.87$59.87, $\ldots$… |
Daily temperature (degrees C) | $24.4$24.4, $23.0$23.0, $22.5$22.5, $21.6$21.6, $20.7$20.7, $20.2$20.2, $19.7$19.7, $\ldots$… |
In practice, continuous data will always be subject to the accuracy of the measuring device being used. So in some sense, continuous data will always appear discrete to some degree. This can make the distinction between continuous and discrete data often unclear. However, think about the type of data being measured to determine whether it's continuous.
For instance, it makes sense that time is continuous, even though we can only measure it to the nearest second (or millisecond, and so on).
The word ordinal basically means ordered. Ordinal categorical data involves data points, consisting of words or labels, that can be ordered or ranked in some way.
Examples of ordinal data:
Product rating on a survey | good, satisfactory, good, excellent, excellent, good, good, $\ldots$… |
Exam grades | $A,C,A,B,B,C,A,B,A,A,C,B,A,B,B,B,C,A,C,\ldots$A,C,A,B,B,C,A,B,A,A,C,B,A,B,B,B,C,A,C,… |
Size of fish in a lake | medium, small, small, medium, small, large, medium, large, $\ldots$… |
The word nominal basically means name. Nominal categorical data consists of words or labels, that name individual data points.
Examples of nominal data:
Nationalities in a sporting team | German, Austrian, Italian, Spanish, Dutch, Italian, $\ldots$… |
Make of car driving through an intersection | Toyota, Holden, Mazda, Toyota, Ford, Toyota, Mazda, $\ldots$… |
Hair colour of students in a class | blonde, red, brown, blonde, black, brown, black, red, $\ldots$… |
Nominal data is often described as unordered because it can't be ordered in a way that is obviously meaningful.
Which one of the following data types is discrete?
The number of classrooms in your school
Daily humidity
The ages of a group of people
The time taken to run $200$200 metres
Classify this data into its correct category:
Weights of dogs
Categorical Nominal
Categorical Ordinal
Numerical Discrete
Numerical Continuous
To perform statistical analysis of data, it is important to understand what statistics can be meaningfully calculated, interpreted, and compared from a given set of data. We can apply different levels of measurement depending on the properties of data we have.
The four widely applied levels of measurement are:
The significant difference between an interval scale and a ratio scale is the inclusion of a 'true zero' or 'absolute zero'. A true zero means the absence of the quantity being measured.
Interval scales such as temperature in degrees Celsius do not have a true zero. $0^\circ\text{ C}$0° C does not mean the absence of heat, the zero of this scale is arbitrary. This means while we can compare the difference between two values, we cannot meaningfully compare the ratio of two values. For example, we could say $30^\circ\text{ C}$30° C is $20^\circ\text{ C}$20° C more than $10^\circ\text{ C}$10° C but we cannot say that $30^\circ\text{ C}$30° C is three times as hot as $10^\circ\text{ C}$10° C.
Ratio scales such as temperature in kelvin, weight, or speed, all contain a zero point that is absolute. For example, $0\text{ K}$0 K does indeed mean the absence of heat and $0\text{ kg}$0 kg means weightless. The zero of the scale is not an arbitrary number. With ratio data, not only can you meaningfully measure distances between data points (i.e. add and subtract), you can also meaningfully multiply and divide. For example, $40\text{ km/h}$40 km/h is indeed twice as fast as $20\text{ km/hr}$20 km/hr.
We can compare how the properties of each scale lend themselves to be used to calculate and compare statistics:
Nominal | Ordinal | Interval | Ratio | |
---|---|---|---|---|
Categorises the values | Y | Y | Y | Y |
Ranks values in order | Y | Y | Y | |
Frequency distribution | Y | Y | Y | Y |
Mode | Y | Y | Y | Y |
Median | Y | Y | Y | |
Mean | Y | Y | ||
Can say one value is _ units greater or smaller than the other | Y | Y | ||
Can say one value is _ times greater or smaller than the other | Y |
Note: we can calculate the mean of ordinal data by assigning numbers to the outcomes. For example, for a survey asking for a customer satisfaction rating of very low, low, average, high, very high, we could assign the numbers $1$1 to $5$5 to the outcomes and calculate the mean level of satisfaction reported. However, it is debateable whether this can be meaningfully interpreted, as the original categories are not separated into equal intervals.
Identify the level of measurement that can be applied to the following data:
Population of your town
Nominal
Ordinal
Interval
Ratio