| Height (cm) Panicle wt (g) | 2.5 | 3.5 | 4.5 | 5.5 |
|---|---|---|---|---|
| 70 | 3 | 2 | 0 | 0 |
| 80 | 4 | 9 | 5 | 1 |
| 90 | 1 | 8 | 16 | 7 |
| 100 | 0 | 3 | 11 | 12 |
| 110 | 0 | 0 | 4 | 14 |
2 Correlation Analysis
Before modelling how one variable depends on another, it is useful to measure how closely two variables move together. Correlation analysis measures the strength and direction of the linear association between variables, treating them symmetrically: neither is designated as the response (Ezekiel and Fox 1959; Kleinbaum et al. 1998). This chapter covers the measures of correlation listed in Unit I of STAT 521: the product moment correlation for ungrouped and grouped data, biserial correlation, rank correlation, partial and multiple correlation, and the tests associated with each.
2.1 Pearson’s product moment correlation coefficient
For \(n\) pairs \((x_i,y_i)\) the sample correlation coefficient is
\[r=\frac{\operatorname{cov}(x,y)}{s_xs_y}=\frac{\sum_{i=1}^n(x_i-\bar x)(y_i-\bar y)}{\sqrt{\sum_{i=1}^n(x_i-\bar x)^2\sum_{i=1}^n(y_i-\bar y)^2}}=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}} \tag{2.1}\]
A convenient computing form is
\[r=\frac{n\sum x_iy_i-\sum x_i\sum y_i}{\sqrt{\left[n\sum x_i^2-(\sum x_i)^2\right]\left[n\sum y_i^2-(\sum y_i)^2\right]}} \tag{2.2}\]
Properties
- \(-1\le r\le 1\). The value \(r=\pm1\) occurs only when all points lie on a straight line.
- \(r\) is unaffected by change of origin and scale: if \(u=(x-a)/h\) and \(v=(y-b)/k\) with \(h,k>0\), then \(r_{uv}=r_{xy}\).
- \(r\) is symmetric: \(r_{xy}=r_{yx}\).
- \(r\) is the geometric mean of the two regression coefficients: \(r^2=b_{yx}b_{xy}\), with the common sign of \(b_{yx}\) and \(b_{xy}\).
- \(r=0\) means no linear association; a strong curved relation (for example \(y=x^2\) on a symmetric range of \(x\)) can give \(r=0\).
- If \(x\) and \(y\) are independent, the population correlation \(\rho=0\); the converse holds only when \((x,y)\) is bivariate normal.
2.2 Correlation from grouped data
When a large number of pairs is summarized in a bivariate (correlation) frequency table, with \(f_{ij}\) observations in the cell with class mid-points \(x_i\) and \(y_j\), the sums in Equation 2.2 are replaced by frequency-weighted sums. Coding \(u_i=(x_i-a)/h\) and \(v_j=(y_j-b)/k\) simplifies the arithmetic and, by property 2, does not change \(r\):
\[r=\frac{N\sum_i\sum_jf_{ij}u_iv_j-\left(\sum_if_{i\cdot}u_i\right)\left(\sum_jf_{\cdot j}v_j\right)}{\sqrt{\left[N\sum_if_{i\cdot}u_i^2-\left(\sum_if_{i\cdot}u_i\right)^2\right]\left[N\sum_jf_{\cdot j}v_j^2-\left(\sum_jf_{\cdot j}v_j\right)^2\right]}} \tag{2.3}\]
where \(f_{i\cdot}\) and \(f_{\cdot j}\) are the marginal frequencies and \(N=\sum\sum f_{ij}\).
Example 2.1 The plant height (cm) and panicle weight (g) of 100 rice hills were classified as follows. Compute the correlation coefficient.
Solution
Take \(u=(x-90)/10\) and \(v=(y-4.5)/1\), so \(u\in\{-2,-1,0,1,2\}\) and \(v\in\{-2,-1,0,1\}\).
From the table: \(N=100\), \(\sum f_{i\cdot}u_i=33\), \(\sum f_{i\cdot}u_i^2=137\), \(\sum f_{\cdot j}v_j=-4\), \(\sum f_{\cdot j}v_j^2=88\) and \(\sum\sum f_{ij}u_iv_j=69\). Using Equation 2.3,
\[r=\frac{100(69)-(33)(-4)}{\sqrt{[100(137)-(33)^2][100(88)-(-4)^2]}}=0.668\]
There is a strong positive correlation between plant height and panicle weight.
2.3 Biserial and point biserial correlation
Sometimes one variable is measured on a continuous scale while the other is dichotomous, for example yield (continuous) and disease incidence (infected or healthy).
- If the dichotomy is genuine (sex of an animal, presence of a gene), the point biserial correlation is used. It is simply Pearson’s \(r\) with the dichotomous variable coded 0 and 1:
\[r_{pb}=\frac{\bar y_1-\bar y_0}{s_y}\sqrt{pq} \tag{2.4}\]
- If the dichotomy is an artificial cut of an underlying normally distributed variable (for example “tall” and “short” plants, or “resistant” and “susceptible” when resistance is really continuous), the biserial correlation estimates the correlation with that underlying variable:
\[r_b=\frac{\bar y_1-\bar y_0}{s_y}\cdot\frac{pq}{z} \tag{2.5}\]
Here \(\bar y_1\) and \(\bar y_0\) are the means of \(y\) in the two groups, \(p\) and \(q=1-p\) the proportions in the groups, \(s_y\) the standard deviation of all \(y\) values (divisor \(n\)), and \(z\) the ordinate of the standard normal density at the point that cuts off an upper area \(p\). Since \(pq/z\ge\sqrt{pq}\) always, \(r_b\ge r_{pb}\) in absolute value, and \(r_b\) can exceed 1 in small samples.
Example 2.2 Grain yield (g/hill) of 12 hills, of which 5 showed blast symptoms (coded 1), is given below. Compute the point biserial and biserial correlations.
| Hill | Yield | Blast |
|---|---|---|
| 1 | 18.2 | 1 |
| 2 | 21.5 | 0 |
| 3 | 16.8 | 1 |
| 4 | 24.0 | 0 |
| 5 | 22.7 | 0 |
| 6 | 15.1 | 1 |
| 7 | 23.4 | 0 |
| 8 | 25.2 | 0 |
| 9 | 17.5 | 1 |
| 10 | 20.9 | 0 |
| 11 | 26.1 | 0 |
| 12 | 14.3 | 1 |
Solution
\(\bar y_1=16.380\) (infected), \(\bar y_0=23.400\) (healthy), \(p=5/12=0.417\), \(q=0.583\), \(s_y=3.826\). The normal ordinate at the point cutting off an upper area of 0.417 is \(z=0.3902\). Hence
\[r_{pb}=\frac{16.380-23.400}{3.826}\sqrt{0.417\times0.583}=-0.905,\]
\[r_b=\frac{16.380-23.400}{3.826}\cdot\frac{0.417\times0.583}{0.3902}=-1.143.\]
The point biserial value equals cor(yield, blast) in R, which is -0.905. Blast incidence is strongly associated with lower yield.
2.4 Rank correlation
When the data are ranks (for example scores given by judges to varieties for taste), or when the relation is monotonic but not linear, or when outliers are present, Spearman’s rank correlation is used (Spearman 1904). Rank the \(x\) values and the \(y\) values separately, and let \(d_i\) be the difference between the ranks of the \(i\)th pair:
\[r_s=1-\frac{6\sum d_i^2}{n(n^2-1)} \tag{2.6}\]
This is Pearson’s \(r\) computed on the ranks. When there are ties, each tied value receives the average of the ranks it would occupy, and for every group of \(m\) tied values the correction \(m(m^2-1)/12\) is added to \(\sum d_i^2\):
\[r_s=1-\frac{6\left[\sum d_i^2+\sum\frac{m(m^2-1)}{12}\right]}{n(n^2-1)} \tag{2.7}\]
Example 2.3 Two judges ranked eight mango varieties for taste. Find the rank correlation.
| Variety | A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|---|
| Judge 1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| Judge 2 | 2 | 1 | 4 | 3 | 6 | 5 | 8 | 7 |
| \(d\) | -1 | 1 | -1 | 1 | -1 | 1 | -1 | 1 |
Solution
\(\sum d_i^2=8\), \(n=8\). By Equation 2.6, \(r_s=1-\dfrac{6\times8}{8\times63}=1-0.095=0.905\). The judges agree closely.
2.5 Tests of significance for correlation
2.5.1 Testing \(H_0:\rho=0\)
For a sample of \(n\) pairs from a bivariate normal population,
\[t=\frac{r\sqrt{n-2}}{\sqrt{1-r^2}}\sim t_{n-2}\quad\text{under }H_0:\rho=0. \tag{2.8}\]
This test is identical to the \(t\) test of the slope in simple linear regression (Chapter 3). The same statistic is used, approximately, for Spearman’s \(r_s\) when \(n\ge10\).
2.5.2 Testing \(H_0:\rho=\rho_0\) (\(\rho_0\ne0\)) and confidence intervals
When \(\rho\neq0\) the distribution of \(r\) is skewed. Fisher’s \(z\) transformation (Fisher 1915)
\[z=\tfrac12\ln\frac{1+r}{1-r}=\tanh^{-1}r \tag{2.9}\]
is approximately normal with mean \(\tfrac12\ln\frac{1+\rho}{1-\rho}\) and variance \(1/(n-3)\). Hence
\[Z=(z-z_{\rho_0})\sqrt{n-3}\sim N(0,1)\quad\text{under }H_0:\rho=\rho_0. \tag{2.10}\]
A \(100(1-\alpha)\%\) confidence interval for \(\rho\) is obtained by computing \(z\pm z_{\alpha/2}/\sqrt{n-3}\) and transforming both limits back with \(r=\tanh z\).
2.5.3 Testing equality of two correlations
For independent samples of sizes \(n_1\) and \(n_2\),
\[Z=\frac{z_1-z_2}{\sqrt{\frac1{n_1-3}+\frac1{n_2-3}}}\sim N(0,1)\quad\text{under }H_0:\rho_1=\rho_2. \tag{2.11}\]
Example 2.4 In 28 farms the correlation between rainfall and yield was \(r=0.62\). (a) Test \(H_0:\rho=0\). (b) Test \(H_0:\rho=0.4\). (c) Find a 95% confidence interval for \(\rho\).
Solution
\(t=\dfrac{0.62\sqrt{26}}{\sqrt{1-0.3844}}=4.029\), which exceeds \(t_{0.025,26}=2.056\); reject \(H_0\).
\(z=\tanh^{-1}(0.62)=0.7250\), \(z_{\rho_0}=\tanh^{-1}(0.4)=0.4236\), \(Z=(0.7250-0.4236)\sqrt{25}=1.507<1.96\); \(H_0:\rho=0.4\) is not rejected.
\(0.7250\pm1.96/5\) gives \((0.3330,\ 1.1170)\) on the \(z\) scale, and \((0.321,\ 0.807)\) for \(\rho\).
2.6 Partial correlation
The correlation between yield and tiller number may arise partly because both depend on plant height. The partial correlation measures the association between two variables after removing the linear effect of one or more other variables. For three variables,
\[r_{12\cdot3}=\frac{r_{12}-r_{13}r_{23}}{\sqrt{(1-r_{13}^2)(1-r_{23}^2)}} \tag{2.12}\]
\(r_{12\cdot3}\) is the correlation between the residuals of \(x_1\) regressed on \(x_3\) and of \(x_2\) regressed on \(x_3\). It is called a first order partial correlation (one variable eliminated). Higher order partial correlations follow recursively, for example
\[r_{12\cdot34}=\frac{r_{12\cdot4}-r_{13\cdot4}r_{23\cdot4}}{\sqrt{(1-r_{13\cdot4}^2)(1-r_{23\cdot4}^2)}},\]
or in general from the inverse of the correlation matrix \(\mathbf R^{-1}=(r^{ij})\): \(r_{ij\cdot\text{rest}}=-r^{ij}/\sqrt{r^{ii}r^{jj}}\).
Test: for a partial correlation of order \(q\) (number of variables eliminated),
\[t=\frac{r_{12\cdot\ldots}\sqrt{n-2-q}}{\sqrt{1-r_{12\cdot\ldots}^2}}\sim t_{n-2-q}. \tag{2.13}\]
2.7 Multiple correlation
The multiple correlation coefficient \(R_{1\cdot23}\) is the correlation between \(x_1\) and its best linear prediction from \(x_2\) and \(x_3\); it measures the joint association of \(x_1\) with \(x_2\) and \(x_3\):
\[R_{1\cdot23}^2=\frac{r_{12}^2+r_{13}^2-2r_{12}r_{13}r_{23}}{1-r_{23}^2} \tag{2.14}\]
Equivalently \(1-R^2_{1\cdot23}=(1-r_{12}^2)(1-r_{13\cdot2}^2)\), and in general \(1-R^2_{1\cdot23\ldots k}=1/r^{11}\) where \(r^{11}\) is the first diagonal element of \(\mathbf R^{-1}\). \(0\le R\le1\), and \(R\) is never smaller than any simple correlation of \(x_1\) with the other variables. \(R^2\) is the coefficient of determination of the multiple regression of \(x_1\) on the others (Chapter 7).
Test: with \(k\) predicting variables,
\[F=\frac{R^2/k}{(1-R^2)/(n-k-1)}\sim F_{k,\,n-k-1}\quad\text{under }H_0:\rho_{1\cdot23\ldots}=0. \tag{2.15}\]
Example 2.5 For 25 rice hills (data csv/ricecomp.csv) take \(x_1\) = grain yield, \(x_2\) = productive tillers per hill and \(x_3\) = grains per panicle. Compute \(r_{12\cdot3}\), \(R_{1\cdot23}\) and test them.
Solution
The simple correlations are \(r_{12}=0.922\), \(r_{13}=0.071\) and \(r_{23}=0.002\). By Equation 2.12,
\[r_{12\cdot3}=\frac{0.922-(0.071)(0.002)}{\sqrt{(1-0.071^2)(1-0.002^2)}}=0.925,\]
and \(t=0.925\sqrt{22}/\sqrt{1-0.925^2}=11.389\) with 22 df, highly significant. By Equation 2.14, \(R^2_{1\cdot23}=0.856\), \(R_{1\cdot23}=0.925\), and \(F=\dfrac{0.856/2}{(1-0.856)/22}=65.23\) with (2, 22) df, also highly significant.
2.8 R practical
rc <- read.csv("csv/ricecomp.csv")
# Pearson correlation and its test
cor.test(rc$yield, rc$prodtill)#>
#> Pearson's product-moment correlation
#>
#> data: rc$yield and rc$prodtill
#> t = 11.457, df = 23, p-value = 5.533e-11
#> alternative hypothesis: true correlation is not equal to 0
#> 95 percent confidence interval:
#> 0.8297555 0.9656226
#> sample estimates:
#> cor
#> 0.92245
# Spearman rank correlation (exact = FALSE allows ties)
cor.test(rc$yield, rc$prodtill, method = "spearman", exact = FALSE)#>
#> Spearman's rank correlation rho
#>
#> data: rc$yield and rc$prodtill
#> S = 285.22, p-value = 2.54e-09
#> alternative hypothesis: true rho is not equal to 0
#> sample estimates:
#> rho
#> 0.8903005
# Correlation matrix
round(cor(rc), 3)#> yield height tillers prodtill panicle grains
#> yield 1.000 0.118 0.914 0.922 -0.214 0.071
#> height 0.118 1.000 0.030 0.032 0.243 0.087
#> tillers 0.914 0.030 1.000 0.991 -0.182 0.027
#> prodtill 0.922 0.032 0.991 1.000 -0.203 0.002
#> panicle -0.214 0.243 -0.182 -0.203 1.000 -0.009
#> grains 0.071 0.087 0.027 0.002 -0.009 1.000
# Partial correlations of all pairs from the inverse correlation matrix
Ri <- solve(cor(rc))
pc <- -Ri / sqrt(diag(Ri) %o% diag(Ri)); diag(pc) <- 1
round(pc, 3)#> yield height tillers prodtill panicle grains
#> yield 1.000 0.242 -0.028 0.321 -0.129 0.164
#> height 0.242 1.000 -0.071 0.006 0.287 0.062
#> tillers -0.028 -0.071 1.000 0.948 0.161 0.208
#> prodtill 0.321 0.006 0.948 1.000 -0.139 -0.244
#> panicle -0.129 0.287 0.161 -0.139 1.000 -0.043
#> grains 0.164 0.062 0.208 -0.244 -0.043 1.000
# Multiple correlation of yield with all other variables
1 - 1 / Ri[1, 1] # R^2#> [1] 0.8651565
summary(lm(yield ~ ., data = rc))$r.squared # same value#> [1] 0.8651565
Galton’s correlation and Fisher’s z
Galton introduced the idea of “co-relation” in 1888 while comparing the lengths of forearms and heights of men. Karl Pearson gave the product moment formula in 1896 (Pearson 1896). The exact sampling distribution of \(r\) eluded statisticians until 1915, when the young R. A. Fisher derived it geometrically by representing the sample as a point in \(n\)-dimensional space (Fisher 1915). His \(z\) transformation, which makes the distribution of \(r\) nearly normal with a variance that does not depend on \(\rho\), is still the standard way to test and compare correlations.
“Correlation is not causation, but it sure is a hint.”
- Edward Tufte
2.9 Practical exercises
2.9.1 Practical 2.1: Correlation between plant height and pods per plant
The plant height (cm) and number of pods per plant of eight cowpea plants are given below. Compute the correlation coefficient and test \(H_0:\rho=0\) at the 5% level.
| Plant | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| Height (\(x\)) | 45 | 52 | 48 | 60 | 55 | 63 | 58 | 50 |
| Pods (\(y\)) | 18 | 22 | 20 | 27 | 24 | 30 | 26 | 21 |
Solution
\(\bar x=53.875\), \(\bar y=23.500\), \(S_{xx}=270.875\), \(S_{yy}=112.000\), \(S_{xy}=173.500\). By Equation 2.1,
\[r=\frac{173.500}{\sqrt{270.875\times112.000}}=0.9961.\]
By Equation 2.8, \(t=\dfrac{0.9961\sqrt{6}}{\sqrt{1-0.9961^2}}=27.68\), which exceeds \(t_{0.025,6}=2.447\). \(H_0\) is rejected: taller plants carry significantly more pods.
Doing it in R
height <- c(45, 52, 48, 60, 55, 63, 58, 50)
pods <- c(18, 22, 20, 27, 24, 30, 26, 21)
cor(height, pods)#> [1] 0.996107
cor.test(height, pods) # t test of rho = 0#>
#> Pearson's product-moment correlation
#>
#> data: height and pods
#> t = 27.679, df = 6, p-value = 1.471e-07
#> alternative hypothesis: true correlation is not equal to 0
#> 95 percent confidence interval:
#> 0.9777360 0.9993245
#> sample estimates:
#> cor
#> 0.996107
cor.test(height, pods, method = "spearman") # rank correlation for comparison#>
#> Spearman's rank correlation rho
#>
#> data: height and pods
#> S = 0, p-value = 4.96e-05
#> alternative hypothesis: true rho is not equal to 0
#> sample estimates:
#> rho
#> 1
2.9.2 Practical 2.2: Partial and multiple correlation
In a study of 25 paddy fields, the correlations among grain yield (\(x_1\)), nitrogen uptake (\(x_2\)) and seasonal rainfall (\(x_3\)) were \(r_{12}=0.80\), \(r_{13}=0.60\) and \(r_{23}=0.50\). Compute \(r_{12\cdot3}\), \(r_{13\cdot2}\) and \(R_{1\cdot23}\), and test their significance.
Solution
By Equation 2.12,
\[r_{12\cdot3}=\frac{0.80-0.60\times0.50}{\sqrt{(1-0.36)(1-0.25)}}=0.7217,\qquad r_{13\cdot2}=\frac{0.60-0.80\times0.50}{\sqrt{(1-0.64)(1-0.25)}}=0.3849.\]
With 22 df, \(t=4.89\) for \(r_{12\cdot3}\) and \(t=1.96\) for \(r_{13\cdot2}\); \(t_{0.025,22}=2.074\), so N uptake remains strongly associated with yield after removing rainfall, and rainfall no longer remains significantly associated with yield after removing N uptake.
By Equation 2.14, \(R^2_{1\cdot23}=\dfrac{0.64+0.36-2(0.80)(0.60)(0.50)}{1-0.25}=0.6933\), \(R_{1\cdot23}=0.8327\), and by Equation 2.15 \(F=24.87\) on (2, 22) df, highly significant.
Doing it in R
R <- matrix(c(1.00, 0.80, 0.60,
0.80, 1.00, 0.50,
0.60, 0.50, 1.00), 3, dimnames = list(c("yield", "Nupt", "rain"), c("yield", "Nupt", "rain")))
Ri <- solve(R)
partial <- -Ri / sqrt(diag(Ri) %o% diag(Ri)); diag(partial) <- 1
round(partial, 4) # r12.3 and r13.2 off the diagonal#> yield Nupt rain
#> yield 1.0000 0.7217 0.3849
#> Nupt 0.7217 1.0000 0.0417
#> rain 0.3849 0.0417 1.0000
R2 <- 1 - 1 / Ri[1, 1]; c(R2 = R2, R = sqrt(R2))#> R2 R
#> 0.6933333 0.8326664
n <- 25
t12 <- partial[1, 2] * sqrt(n - 3) / sqrt(1 - partial[1, 2]^2); 2 * pt(-abs(t12), n - 3)#> [1] 6.877138e-05
F <- (R2 / 2) / ((1 - R2) / (n - 3)); pf(F, 2, n - 3, lower.tail = FALSE)#> [1] 2.255965e-06
2.10 Chapter Summary
Fill in the blanks
Answers are given at the end of the chapter.
Pearson’s correlation coefficient always lies between __________ and __________.
The correlation coefficient is independent of change of __________ and __________.
The square of \(r\) equals the product of the two __________ coefficients.
Correlation between a continuous variable and a genuine dichotomy is measured by the __________ correlation.
Spearman’s rank correlation is Pearson’s \(r\) computed on the __________.
Under \(H_0:\rho=0\), \(r\sqrt{n-2}/\sqrt{1-r^2}\) follows a \(t\) distribution with __________ degrees of freedom.
Fisher’s \(z\) transformation of \(r\) has approximate variance __________.
The correlation between two variables after eliminating the linear effect of a third is the __________ correlation.
A partial correlation of order 2 is tested with \(t\) on __________ degrees of freedom.
The square of the multiple correlation coefficient equals the __________ of the corresponding multiple regression.
Short-answer questions
State the properties of Pearson’s correlation coefficient.
Why can \(r=0\) even when two variables are strongly related?
How is correlation computed from a bivariate frequency table?
Distinguish between biserial and point biserial correlation.
When would you prefer rank correlation to Pearson’s correlation?
How are tied ranks handled in Spearman’s formula?
Why is Fisher’s \(z\) transformation needed to test \(H_0:\rho=\rho_0\) with \(\rho_0\neq0\)?
Explain the meaning of a partial correlation with an agricultural example.
Define the multiple correlation coefficient and state its properties.
How are partial correlations obtained from the inverse of the correlation matrix?
Numerical and conceptual questions
Answers are given at the end of the chapter.
Given \(n=10\), \(\sum x=50\), \(\sum y=80\), \(\sum x^2=290\), \(\sum y^2=700\), \(\sum xy=430\), find \(r\).
If \(b_{yx}=0.9\) and \(b_{xy}=0.4\), find \(r\).
Ten varieties were ranked by two judges and \(\sum d^2=30\). Find \(r_s\).
For \(n=18\) and \(r=0.5\), test \(H_0:\rho=0\) at 5% level.
Given \(r_{12}=0.7\), \(r_{13}=0.5\), \(r_{23}=0.4\), find \(r_{12\cdot3}\).
Using the data of Question 5, find \(R_{1\cdot23}\).
In Question 6 with \(n=30\), test the significance of \(R_{1\cdot23}\).
Two samples of sizes 28 and 39 gave \(r_1=0.6\) and \(r_2=0.4\). Test \(H_0:\rho_1=\rho_2\).
Can \(R_{1\cdot23}\) be smaller than \(|r_{12}|\)? Explain.
In a sample with 4 tied values sharing one rank, what correction is added to \(\sum d^2\)?
Important formulae
Pearson’s correlation:
\[ r=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}} \]
Spearman’s rank correlation:
\[ r_s=1-\frac{6\sum d_i^2}{n(n^2-1)} \]
Point biserial and biserial correlation:
\[ r_{pb}=\frac{\bar y_1-\bar y_0}{s_y}\sqrt{pq},\qquad r_b=\frac{\bar y_1-\bar y_0}{s_y}\cdot\frac{pq}{z} \]
Test of \(\rho=0\):
\[ t=\frac{r\sqrt{n-2}}{\sqrt{1-r^2}}\sim t_{n-2} \]
Fisher’s \(z\):
\[ z=\tfrac12\ln\frac{1+r}{1-r},\qquad V(z)\approx\frac1{n-3} \]
Partial and multiple correlation:
\[ r_{12\cdot3}=\frac{r_{12}-r_{13}r_{23}}{\sqrt{(1-r_{13}^2)(1-r_{23}^2)}},\qquad R^2_{1\cdot23}=\frac{r_{12}^2+r_{13}^2-2r_{12}r_{13}r_{23}}{1-r_{23}^2} \]
Test of multiple correlation:
\[ F=\frac{R^2/k}{(1-R^2)/(n-k-1)} \]
Quick revision
- \(r\) → strength of linear association; unit free; \(-1\le r\le1\).
- Grouped data → use coded mid-points and frequency-weighted sums.
- Dichotomous variable → point biserial (genuine) or biserial (artificial).
- Ranks, monotone relations, outliers → Spearman’s \(r_s\).
- \(\rho=0\) → \(t\) test with \(n-2\) df; \(\rho=\rho_0\) or two correlations → Fisher’s \(z\).
- Partial correlation → association after removing other variables; test on \(n-2-q\) df.
- Multiple correlation → \(R^2\) of a regression; test with \(F_{k,n-k-1}\).
Answers to fill in the blanks
1. \(-1\), \(+1\) 2. Origin, scale 3. Regression 4. Point biserial 5. Ranks 6. \(n-2\) 7. \(1/(n-3)\) 8. Partial 9. \(n-4\) 10. Coefficient of determination
Solutions to numerical and conceptual questions
By Equation 2.2, \(r=\dfrac{10(430)-50(80)}{\sqrt{[2900-2500][7000-6400]}}=\dfrac{300}{\sqrt{400\times600}}=0.612\).
\(r=\sqrt{0.9\times0.4}=0.6\) (positive, as both coefficients are positive).
By Equation 2.6, \(r_s=1-\dfrac{6(30)}{10(99)}=0.818\).
By Equation 2.8, \(t=0.5\sqrt{16}/\sqrt{0.75}=2.309>t_{0.025,16}=2.120\); reject \(H_0\).
By Equation 2.12, \(r_{12\cdot3}=\dfrac{0.7-0.2}{\sqrt{0.75\times0.84}}=0.630\).
By Equation 2.14, \(R^2=\dfrac{0.49+0.25-0.28}{0.84}=0.548\), \(R=0.740\).
By Equation 2.15, \(F=\dfrac{0.548/2}{0.452/27}=16.37>F_{0.05}(2,27)=3.35\); significant.
\(z_1=0.693\), \(z_2=0.424\); by Equation 2.11, \(Z=\dfrac{0.269}{\sqrt{1/25+1/36}}=1.03<1.96\); not significant.
No. \(R_{1\cdot23}\ge|r_{12}|\) and \(\ge|r_{13}|\), because adding a variable cannot reduce the explained variation.
\(m(m^2-1)/12=4(15)/12=5\) (Equation 2.7).