# How do I compare correlation coefficients of the same variables across different groups?

I am testing the correlation between Variable A and Variable B by gender and marital status.

So I have the coefficients for males and females and single, married and other.

I want to compare the correlation coefficient of male with female.

Similarly, I want to compare the correlation coefficient of single with marrried and with other.

Finally, I want to compare the correlation coefficient of single male with single female, married male with married female and other male and other female. I have these coefficients too.

What is the easiest way of making this comparison?

Do you want to show that the (linear) relationship between a variable A and a variable B is stronger for one group than for another? If the answer is yes, then I would go for a regression analysis.

Suppose that there are two continuous variables $$X$$ and $$Y$$, and a group variable called $$\rm GENDER$$ that is equal to 1 for men and equal to 0 for women. I would like to know if the relation between $$X$$ and $$Y$$ is different for men than for women. I would then run the following linear regression model:

$$Y = a + b\times X + c\times \text{GENDER}+ d\times\text{GENDER}*X$$

I would then test the joint hypothesis if the coefficients $$c$$ and $$d$$ are equal to zero. If this hypothesis is rejected, then I would conclude that there are differences between men and women.

What do you think?

EDIT: I will add some more explanation, as requested, but I am afraid that this will take us too far away rom the original question ...

I have taken the original problem, and I have tried to give it some structure. More precisely, I have modeled the continuous variable Y as a function of another continuous variable X and a discrete variable called GENDER. The functional form chose here is a linear one. The lower case letters represent the parameters of the line.

In fact, the above equation looks like one line, but it contains two: one for men and one for women. The parameter a is the intercept for women, (a+c) is the intercept for men, b is the slope for women, and (b+d) is he slope for men.

The parameters c and d mirror the gender differences, or more generally speaking the differences between the two groups. I have used gender for illustrative purposes, but you can replace it by what you want: color, species, marital status, ... Thus, if these two parameters (c and d) are simultaneously equal to zero, there is no (apparent) difference between the two groups, and thus the relation between X and Y is the same for the two groups.

• (+1) It's always a pleasure to read your answers.
– whuber
Commented Aug 5, 2011 at 16:31
• This makes a lot of sense but can you please further explain (with an example, if possible) how I need to interpret the different parts in the formula (e.g. what is "a" etc.). Commented Aug 5, 2011 at 19:50
• @Jasty Looks like some independent reading would help you. You might start online with Wikipedia and then move to an intro text on regression.
– whuber
Commented Aug 5, 2011 at 21:10
• Would the Fisher's z transformation be an option here for comparing the coefficients? Commented Aug 5, 2011 at 21:20
• While @lejohn's regression approach is probably more elegant, the Fisher's Z comparisons should work just fine and that's probably an easier way. Commented Aug 6, 2011 at 1:20