Tutorial 3: Variables

Tutorial Overview:

Now that you have a basic overview of the different types of variables, let's delve into their application. In this tutorial, you will learn about the different types of variables and how to use them. 

Grasping these concepts is crucial, as errors made at this stage can lead to meaningless analyses later. This page provides an in-depth look at these fundamental concepts.

In the subsequent sections of this tutorial, you will learn how to apply these concepts effectively in your analysis.

3. 1 Variables: What are they?

A variable is a record of any number, quantity, or characteristic that can be measured. Examples include Age, Gender, or Attitudes, to mention just a few. Thus, the variable of age, for instance, would be a record of the ages of all the individuals you interacted with as part of your research. The volume of data a variable can contain is limitless.

Variables can be manipulated, controlled, or measured in your research. Research experiments will consist of a sequence of different variables. The following are the most commonly encountered types of variables: independent, dependent, control, latent, and composite variables.

3.1.1 Independent & Dependent Variables

Think of independent and dependent variables in terms of cause and effect. Your independent variable(s) is the variable that you believe is causing the change in the dependent variable—the effect.

In the image below, the amount of water/amount of fertiliser represents your independent variables, while the height of the plant is your dependent variable.

Your implicit assumption is that a greater amount of water/fertilizer increases the height of the plant.

In short, the independent variable (A) affects the dependent variable (B).

Sometimes independent variables are also known as:

Dependent variables are also sometimes referred to as:

For a more detailed discussion, you can read further here

3.1.2 Control Variables

When analysing your data, you may want to control for or keep a specific set of variables constant. Your independent and dependent variables may change, but your control variables are held constant (e.g. water levels stay the same despite changes to the independent and dependent variables).

Control variables are not of primary interest to the research question but are controlled because they could affect the dependent variable, thus confounding the results. By controlling these variables, researchers aim to isolate the relationship between the independent variable (the cause) and the dependent variable (the effect), ensuring that the observed effects are due to the manipulation of the independent variable alone.

For example, if a researcher is studying the effect of a new teaching method on student performance (the dependent variable), they might control for variables like age, prior knowledge, and study time, because these could also affect performance. By doing so, they can be more confident that changes in student performance are indeed due to the teaching method rather than other factors.

3.1.3 Grouping Variables

These variables are those that are divided into one unique group for each unique value of the grouping variable. In the example below, Gender is the grouping variable, which separates your data into two groups, one for Males and one for Females. Each group will have their own mean, median, standard deviation, etc.   

Grouping variables can be employed to gauge the differences between these groups. For example, what is the difference between 'Males' and 'Females'?

3.1.4 Composite & Latent Variables

These are variables that are made by combining multiple variables into one. You do this at the analysis stage. How to do this will be covered later.  In the example below, a series of questions about attitudes are combined into a new variable that measures Extremism. 

Composite Variables:

Composite variables, also known as composite scores, are derived by combining two or more individual variables into a single variable. This is typically done to represent a multidimensional concept that cannot be captured by a single variable alone, often to simplify analysis or enhance the reliability and validity of measurements of complex traits or concepts.

Latent Variables:

These are variables that serve as a proxy for something that you cannot directly measure. In the example above, not only is this a composite variable,  but it is also a latent variable as you cannot measure extremism directly.

What is the difference between the two?

Latent variables give rise to measurable manifestations of an unobservable concept, while composite variables arise from the total combined influence of measured variables.

3.1.5 Confounding, Covariate & Control variables

Confounding Variables

This type of variable, known as a confounding variable, is associated with both the independent and dependent variables, yet it is not the primary focus of the study. Such variables can distort or conceal the actual effects of other variables on the outcome. 

Essentially, confounding variables influence the variables under examination, potentially leading to results that do not accurately represent the true relationship between the independent and dependent variables. Controlling for confounding variables effectively requires a robust research design, coupled with a thorough knowledge and understanding of the research area.


A Covariate can be an independent variable, which may be of direct interest to your study or is an unwanted confounding variable. Adding covariates can increase the accuracy of your models.  In studies on extremism, for example, Household income can be an additional covariate to Age. Household income could also be considered a confounding variable. 

For a more in-depth discussion read this article.

3.2 Suggested Reading: 

3.2.1 Further Reading: Quantitative Research Design

In this tutorial, you will learn about understanding the data that has already been collected. If you conduct your own research, it is really important to understand these concepts and think about them in your research design phase. The readings below provide you with a good overview of Quantitative Research Design.

While research design is extremely important, it is not covered here, as the focus is on learning basic data analysis skills.