### What is a variable?

The measurement, control and manipulation of specific items (i.e. weight, temperature, wavelength, concentration) is called variable. Variables can be dependent or independent.

Independent – can be manipulated or controlled by the researcher, and affects the dependent variable

Dependent – response to the change made to the independent variable

### Types of variables

Nominal variable – Qualitative equivalence is recorded on a nominal scale. The variable (i.e. what you observe or measure) is counted in at least two discrete categories (classes). We count its presence in each category. The categories are discrete, that means an observation falls in one or another category but not between two categories. For example the variable eye color can be categorized in „red“, „green“, „blue“ and „brown“ and counted among a group of people.

Ordinal variable – The variable is ranked and recorded on a ordinal scale. The variable appears in different size, strength or intensity. In addition to counting the variable, a ranking is applied. For example in the Olympic games we know that a gold medal is better than silver, and silver is better than bronze. In a 100 m running event, the difference between the gold and silver medal can be small (i.e. 0.05 sec) but higher between the silver and bronze medal (0.3 sec). The information of time difference get lost, we just get a ranking.

Interval variable – The difference in the measurement of a variable is recorded on a interval scale. Equivalent differences on the scale means the same difference in the measured variable. In comparison to the ordinal variable, the interval variable allows to compare the distance between measurements or observations. For example, the variable temperature is a interval variable. An increase of the temperature from -10 to -2°C in January is equivalent to an increase from 20 to 28°C in July. The variations in January and July have the same distance (8°C) on the scale.

Ratio variable – Not only the difference but also the ratio of two measured values can be recorded on a ratio scale. A ratio scale has a scientifically meaningful zero point, which is not set arbitrarily. For example, the variable length is a ratio variable as the zero point is not set arbitrarily. That is the reason why the quotient of two length measurements tells us something about the ratio of the two measurements: 50 cm is double in length than 25 cm, and the quotient (ratio) is 2. A temperature of 32°C is not double as warm as 16°C (in a physical context) as temperature has an arbitrarily defined zero point. For Celsius scale, the freezing point of water was set as zero, whereas on the Kelvin scale zero is a the lowest theoretical possible temperature (0K = – 273 °C). Temperature is not a ratio variable.

### Things to consider working with variables

We can use a ratio variable (e.g. length) as nominal scale. For example, to calculate the postage of a letter it is just sufficient to decide if the height of the letter is above 0.5 cm (extra postage) or not (normal postage). So the height in centimeter is categorized in above or below the threshold of 0.5 cm, that means it is used as a nominal scale. On the other hand, a nominal scale (e.g. eye color) can not be used on a higher scale levels. A variable can be used on a lower level, but not on a higher level of scale.

Many statistical procedures are only meaningful at a certain level of scale variable. For example, nominal scaled data can not be averaged. What should the average between four dogs and three cats be? Some variables can be scaled differently, for example color. In the context of eye color, it is nominal variable, but quantified as wavelength color is ratio variable. So the classification of variable can be tricky and requires some consideration.