We now extend the approach for one sample hypothesis testing of the correlation coefficient to two samples.
Theorem 1: Suppose r1 and r2 are as in the Theorem 1 of Correlation Testing via Fisher Transformation where r1 and r2 are based on independent samples and further suppose that ρ1 = ρ2. If z is defined as follows, then z ∼ N(0,1).
Proof: By Theorem 1 of Correlation Testing via Fisher Transformation for i = 1, 2
By Property 1 and 2 of Basic Characteristics of the Normal Distribution it follows that
where s is as defined above. Since ρ1 = ρ2 it follows that ρ´1 = ρ´2, and so
from which the result follows.
We can use Theorem 1 to test whether the correlation coefficients of two populations are equal based on taking a sample from each population and comparing the correlation coefficients of the samples.
Example 1: A sample of 40 couples from London is taken comparing the husband’s IQ with his wife’s. The correlation coefficient for the sample is .77. Is this significantly different from the correlation coefficient of .68 for a sample of 30 couples from Paris?
H0: ρ1 = ρ2
= FISHER(r1) = FISHER(.77) = 1.020
= FISHER(r2) = FISHER(.68) = 0.829
s = SQRT(1/(n1 – 3) + 1/(n2 – 3)) = SQRT(1/37 + 1/27) = 0.253
z = ( – )/s = (1.020 – .829) / .253 = 0.755
p-value = 2(1 – NORMSDIST(z) = 1 – NORMSDIST(.522)) = 0.45
We next perform either one of the following tests:
p-value = .45 > .05 = α
zcrit = NORMSINV(1 – α/2) = NORMSINV(.975) = 1.96 > .755 = z
In either case the null hypothesis is not rejected.
Note that in Example 1 the couples from Paris are selected independently from the couples from London. A different test is required if the samples are dependent.
Click here for an example on how to perform Two Sample Hypothesis Testing for Correlation with Dependent Samples.
Real Statistics Functions: The following supplemental functions are provided in the Real Statistics Resource Pack.
Correl2Test(r1, n1, r2, n2, alpha, lab): array function which outputs z, p-value (two-tailed), lower and upper (i.e. lower and upper bound of the 1 – alpha confidence interval), where r1 and n1 are the correlation coefficient and sample size for the first sample and r2 and n2 are similar values for the second sample. If lab = TRUE then the output takes the form of a 4 × 2 range with the first column consisting of labels, while if lab = False (default) then output takes the form of a 4 × 1 range without labels.
Correl2Test(R1, R2, R3, R4, alpha, lab) = CorrelTest(r1, n1, r2, n2, alpha, lab) where r1 = CORREL(R1, R2), n1 = the common sample size between R1 and R2 (i.e. the number of pairs from R1 and R2 which both contain numeric data), r2 = CORREL(R3, R4) and n2 = the common sample size between R3 and R4.
If alpha is omitted it defaults to .05.
Observation: Correl2Test(.77,40,.68,30,.05) generated the values z = .755, p-value = .45, consistent with what we observed above, plus lower = -.296 and upper = .596. Since 0 is in the confidence interval (-.296, .596) the test is not significant and we cannot reject the null hypothesis that the two correlation coefficients are equal.