All right.
Excellent!
Now that we know it is reasonable to expect
there will be a relationship between the returns
of stocks, we have to learn how to quantify
this relationship.
Let’s zoom out and think of an example that
is easy to understand and will help us grasp
the nature of the relationship between two
variables a little better.
Which is one of the main factors that determine
house prices?
Their size, right?
Typically, larger houses are more expensive,
as people like having extra space.
The table you see here shows us data about
several houses.
On the left side, we can see the size of each
house, and on the right, we have the price
at which it’s been listed in a local newspaper.
We can order these data points in an X-Y plot.
The X-axis will show a house’s size, and
the Y-axis will provide information about
its price.
I am sure you notice a pattern.
There is a clear relationship between these
variables.
Statisticians use the term correlation to
measure such relationship.
The final output of the calculation lies in
the interval from -1 to 1.
To understand the concept better, I would
like to show you the formula that allows us
to calculate the correlation between two variables.
Here it is.
Don’t be scared, please
Let’s apply it in practice for the example
we saw earlier.
X will be house size, and Y stands for house
prices.
So, we need to calculate the average house
size and the average house price.
That’s straightforward, isn’t it?
I only have to sum the sizes of all houses
and then divide by the number of houses we
have.
I’ll do the same for house prices.
Ok.
Excellent.
This is the average house size and the average
house price in our example.
Now, let’s calculate the nominator of the
correlation function.
Starting with the first house, I’ll multiply
the difference between its size and the average
house size by the difference between the price
of the same house and the average house price.
Once we’re ready, we have to perform this
calculation for all houses we have in the
table and then sum the numbers we’ve obtained.
So, I will put the classical summation symbol
in front of this expression.
Great!
This gives us the nominator.
Mathematically, the nominator is precisely
the covariance between the two variables,
X and Y.
It gives us a sense of the direction in which
the two variables are moving.
If they move in the same direction, the covariance
will have a positive sign; if they move in
opposite directions, the covariance will have
a negative sign, and if their movements are
independent, the covariance between the house
size and its price will be equal to zero.
There is one problem with covariance, though.
It could be a number like 5 or 50, but it
can be something like 0.0023456…
Totally different values!
How could one interpret such numbers?
Proceed to the next lecture to find out why
correlation helps us solve this issue and
understand the two concepts a little better.
Thanks for watching!
