The correlation is a statistical measure, which indicates the extent to which two or more variables are fluctuating together. If one variable goes up, does the other variable also goes up or down with that?

Let’s start with a simple case where we have one dependent and one independent variable, and that is represented by Y = f (X).

- Y is dependent on X and
- X is the independent variable

The independent variable is also known as input or controllable variable. This is something which you can control, and you want to see the effect of that variable on the dependent variable.

To understand this let’s take a simple example of an exam. To score good marks in an exam you to spend more time. We want to test whether that is the reality or not by collecting some data. For that, you talk to a number of students and ask, how many of hours they studied for an exam and what is the percentage they achieved in that specific exam. With this data, you try to find out whether there is any relationship between these two variables are not.

Here in this example marks obtained is Y (dependent variable), as marks depend on hours of study. Hours of study is X (independent variable). You want to see the effect of numbers of hours studied on the marks obtained.