# Correlation between one variable and few others

It's clear for me to count correlation and regression between two variables, e.g. X and Y. Assume, that X is a fuel consumption and Y is engine displacement. I've got a data set with 100 pairs X Y, and based on those I can calculate a correlation rate between X and Y which in this case is obvious. So I'm trying to find some dependency between X and Y and check how Y affects X.

But how about the situation when there are three variables (X, Y, Z) and I want to calculate correlation between X and (Y Z) as a group. Assume once again, that Z is a mass of vehicle and I want to check if mass of vehicle and engine displacement (Z and Y) influence on the fuel consumption X.

It's easy to everyone to notice a dependency in my ordinary example:

X may be called normal (is inside some range, expressed as number) when Y is normal and Z is normal, X is high when Y is normal and Z is high, X is very high when Y is low and Z is high, X is low when Y is low and Z is normal

and so on...

So, I've got a data set again, this time with 3 columns: X, Y and Z and I want to find (or not) the relationship between X and YZ.

I know that I can express Y and Z as a one number - some average, but then it makes no sense because of the fact that the extreme values will give the same average.

Look that there are only 3 variables here and the dependency is noticeable for everyone, but what about when there are more variables with some relationship between them which is hard to notice without computing?

• I think looking into Linear Regression and Interaction terms might be of use for what you are trying to accomplish. Dec 6 '12 at 20:58

There is an extension of the concept of correlation to groups of variables called canonical correlation. In the case where one group is a single variable (X) and the other group has multiple variables (Y and Z), the canonical correlation is the same as the multiple correlation ($R^2$) that you get from a multiple regression.
So the easiest way to do this is to fit a multiple regression with X as response and Y and Z as predictors, and look at the $R^2$. This measures the strength of the linear relationship between X and the best possible linear function of Y and Z.