Why Compare Three Correlations?
A dependence summary is useful only when its meaning matches the question being asked. Pearson correlation measures the strength and direction of linear association. Spearman correlation compares ranks, while Kendall’s tau summarizes the balance of concordant and discordant pairs. These measures can agree, but agreement is not guaranteed: an extreme observation can substantially affect Pearson correlation, and a curved but strictly increasing relationship can have perfect rank correlations without perfect Pearson correlation.
The calculations below use hypothetical paired loss indicators or risk scores. Each listed pair is treated as the complete dataset for its example; no interest, mortality, or probability distribution model is assumed. A sample coefficient describes the pairs provided. It does not, by itself, establish causation or quantify dependence in every part of a loss distribution.
What the Sample Coefficients Measure
For observations \((x_i,y_i)\), \(i=1,\ldots,n\), the sample Pearson correlation is the standardized cross-product of deviations from the sample means. The sample-size factors in covariance and standard deviation cancel, giving the computational form below.
Spearman’s sample coefficient is the ordinary Pearson correlation calculated on the ranks of the observations. When values tie, assign each tied observation the average of the ranks those observations would have occupied. This is sometimes called the midrank. The resulting Spearman coefficient is therefore a correlation of rank scores, not a count of concordant pairs.
For Kendall’s \(\tau_b\), compare every unordered pair of observations. A pair is concordant if the ordering of its \(x\)-values agrees with the ordering of its \(y\)-values, and discordant if the orderings disagree. Let \(C\) and \(D\) be the counts of concordant and discordant pairs. Let \(T_x\) count pairs tied only on \(x\), and \(T_y\) count pairs tied only on \(y\). Pairs tied on both variables are excluded from all four counts. Then
With no ties, \(\tau_b=(C-D)/(C+D)\). Ties matter because a pair tied on one variable cannot be called concordant or discordant, while a tie on both variables provides no ordering information on either variable.
Worked Examples
Worked Example: An Extreme Score Changes Pearson Correlation
A hypothetical risk team compares two ordered risk scores for five portfolios. The observed pairs are \((1,1),(2,2),(3,3),(4,4),(5,100)\). Calculate Pearson’s \(r\), Spearman’s \(\rho\), and Kendall’s \(\tau_b\). Explain which result is most affected by the unusually large final score.
Method. Calculate Pearson’s coefficient from centered values, then calculate the two rank-based measures. There are no ties. The common mistake is to assume that a very large value must reduce every correlation in the same way.
For Pearson’s coefficient, \(\bar{x}=(1+2+3+4+5)/5=3\), and \(\bar{y}=(1+2+3+4+100)/5=22\). The centered \(x\)-values are \((-2,-1,0,1,2)\); the centered \(y\)-values are \((-21,-20,-19,-18,78)\). Thus
while \(\sum(x_i-\bar{x})^2=10\) and \(\sum(y_i-\bar{y})^2=441+400+361+324+6084=7610\). Therefore
The \(x\)-values and \(y\)-values have exactly the same rank order, so the rank lists are both \(1,2,3,4,5\). Their Pearson correlation is \(1\), hence Spearman’s \(\rho=1\). Every one of the \(\binom{5}{2}=10\) observation pairs is concordant and none is discordant, so Kendall’s \(\tau_b=(10-0)/10=1\).
Check. The results are \(r\approx0.7250\), \(\rho=1\), and \(\tau_b=1\). The extreme magnitude reduces Pearson’s coefficient, but it does not change the ranking or pair ordering in this dataset. Rank measures are less sensitive to the size of an observation, not immune to a change in its rank.
Worked Example: A Strictly Increasing Nonlinear Transformation
Suppose four hypothetical exposure scores are \(X=(1,2,3,4)\), and their associated loss scores are \(Y=(10,20,30,40)\). A revised score is \(Z=Y^2=(100,400,900,1600)\). Compare the three sample correlations of \(X\) with \(Z\), and explain what changes when the response is squared.
Method. Compute Pearson’s coefficient from the centered values and use the unchanged order for the rank coefficients. The trap is to assume that every strictly increasing transformation preserves Pearson correlation.
The means are \(\bar{x}=2.5\) and \(\bar{z}=750\). The centered values are \(x_i-\bar{x}=(-1.5,-0.5,0.5,1.5)\) and \(z_i-\bar{z}=(-650,-350,150,850)\). Their cross-products sum to
The sums of squared deviations are \(\sum(x_i-\bar{x})^2=5\) and \(\sum(z_i-\bar{z})^2=422500+122500+22500+722500=1{,}290{,}000\). Consequently,
Squaring preserves the strict order \(10<20<30<40\), so the ranks of \(Z\) are \(1,2,3,4\), exactly the ranks of \(X\). Therefore Spearman’s \(\rho=1\). All six pairs are concordant, so Kendall’s \(\tau_b=6/6=1\).
Check. Pearson’s correlation changes from \(1\) for \(X,Y\) to approximately \(0.9844\) for \(X,Z\), while both rank correlations remain \(1\). The relationship with \(Z\) is increasing, but it is not perfectly linear. Association does not establish causation.
Worked Example: Midranks and Kendall’s Tau With Ties
A hypothetical analyst records five paired ordinal indicators: \((1,1),(1,2),(2,2),(3,3),(3,3)\). Calculate Spearman’s rank correlation and Kendall’s \(\tau_b\). The purpose is to distinguish how the two rank measures handle ties.
Method. Use average ranks for Spearman’s coefficient, then count concordant and tie-only pairs for Kendall’s \(\tau_b\). The common mistake is to apply a no-ties rank-difference shortcut or to count a pair tied on both variables as concordant.
For \(x=(1,1,2,3,3)\), the midranks are \((1.5,1.5,3,4.5,4.5)\). For \(y=(1,2,2,3,3)\), they are \((1,2.5,2.5,4.5,4.5)\). Both rank means are \(3\). The sum of cross-products of centered ranks is
The sums of squared deviations of the two rank lists are each \(9\). Thus Spearman’s coefficient is \(8.25/\sqrt{9(9)}=8.25/9\approx0.9167\).
There are \(\binom{5}{2}=10\) pairs. Seven are concordant: the first observation with the third, fourth, and fifth; the second with the fourth and fifth; and the third with the fourth and fifth. There are no discordant pairs. One pair is tied only on \(x\), the first and second observations; one is tied only on \(y\), the second and third. The fourth and fifth observations are tied on both variables and are excluded. Therefore \(C=7\), \(D=0\), \(T_x=1\), and \(T_y=1\), giving
Check. Spearman’s \(\rho\approx0.9167\) and Kendall’s \(\tau_b=0.8750\). Both indicate positive rank association, but they use different summaries: correlation of midranks versus a tie-adjusted balance of ordered pairs.
Why Monotone Transformations Preserve Rank Association
A strictly increasing function preserves order: if \(x_i<x_j\), then \(g(x_i)<g(x_j)\). Applying such a transformation to either variable therefore leaves every rank unchanged and leaves every pair’s concordant, discordant, or tied status unchanged. This is why Spearman’s correlation and Kendall’s tau are invariant to strictly increasing transformations, provided the transformation does not introduce or remove ties.
Pearson correlation has a different invariance. If \(X\) and \(Y\) are transformed to \(a+bX\) and \(c+dY\), with \(b\) and \(d\) nonzero, the correlation is unchanged when \(bd>0\) and changes sign when \(bd<0\). This follows because centering removes the additive constants, while the standard deviations scale by \(|b|\) and \(|d|\). A general nonlinear transformation does not simply rescale centered values, so Pearson correlation need not be preserved.
This distinction is useful when reading risk data. A high rank correlation supports a consistent ordering of pairs; it does not imply a linear relation or a fixed change in one variable for a unit change in the other. Conversely, Pearson correlation near zero does not prove independence. Each coefficient summarizes a different feature and can miss other forms of dependence.
Common Exam Trap
Wrong calculation: “Squaring a positive, increasing response keeps all three correlations at \(1\), because the order is unchanged.” This confuses order preservation with linearity. In the four-point example, the squared-response Pearson numerator is \(2500\), and its denominator is \(\sqrt{5(1{,}290{,}000)}\), so Pearson’s coefficient is approximately \(0.9844\), not \(1\). Spearman’s coefficient and Kendall’s tau remain \(1\) because the order is unchanged.
A practical interpretation should name the measure and the feature it summarizes. Pearson’s \(r\) describes linear association; Spearman’s \(\rho\) describes correlation of ranks; and Kendall’s \(\tau_b\) describes tie-adjusted pair ordering. None alone is a complete description of dependence in extreme losses.
Check Your Understanding
For each problem, identify the relevant calculation before interpreting the result.
- For \(x=(1,2,3,4)\) and \(y=(4,1,3,2)\), calculate Pearson’s \(r\), Spearman’s \(\rho\), and Kendall’s \(\tau_b\). (Answer: \(r=-0.4000\), \(\rho=-0.4000\), \(\tau_b=-1/3\approx-0.3333\).)
- A strictly decreasing transformation is applied to one variable, with no ties introduced. What happens to Spearman’s correlation and Kendall’s tau? (Answer: Both change sign, because all ranks reverse and concordant pairs become discordant, and vice versa.)
- For the pairs \((1,1),(1,2),(2,2),(3,3),(3,3)\), state \(C,D,T_x,T_y\) and calculate \(\tau_b\). (Answer: \(C=7,\ D=0,\ T_x=1,\ T_y=1,\ \tau_b=0.8750\).)
- Let \(x=(1,2,3,4)\) and \(y=(10,20,30,40)\). Replace \(y\) with \(y^2\). Give the three correlations after the transformation to four decimal places where needed. (Answer: Pearson’s correlation is approximately \(0.9844\); Spearman’s correlation and Kendall’s \(\tau_b\) remain \(1\).)
- In a dataset with no ties, there are 12 concordant pairs and 8 discordant pairs. Calculate Kendall’s tau and interpret its sign. (Answer: \(\tau=(12-8)/(12+8)=0.2000\), indicating a modest net excess of concordant pairs.)