We decompose the Pearson correlation coefficient into two components. We recommend the first component for detecting linear relationships and the second for recognizing patterns of two parallel lines, providing robust versions to outliers. The significance of the Pearson coefficient without significant components indicates a fit of three parallel lines. Thus, we reveal the unknown aspect of the Pearson coefficient that identifies a two- or three-group association other than a group, producing Type I or III errors. Finally, we apply the proposed coefficients with permutation tests to simulated and real data. The proposed coefficients identify two- or three-parallel line correlations or weaker but significant relationships not recognized by the Pearson coefficient. In testing correlation hypotheses with normal data, the proposed methodology, in an objective simulation study, minimizes the total error resulting from the Person coefficient by 4%.
2. 2
CONTENTS
ΓABSTRACT
ΓINTRODUCTION: What, Why, and How we do it
ΓLITERATURE REVIEW: Pearson, Spearman, and Kendall
ΓREFORMULATION & DECOMPOSITION OF PEARSON'S COEFFICIENT
ΓPROPOSED MEASURES & METHODOLOGY
ΓMADE-UP EXAMPLES: 2 & 3-Parallel Lines - Robustness to Outliers
ΓSIMULATIONS WITH NORMAL DATA
ΓAN APPLICATION TO GDP PER CAPITA
ΓBut in fact CONCLUSIONS
3. 3
ABSTRACT1
We decompose the Pearson correlation coefficient into two components. We recommend the
first component for detecting linear relationships and the second for recognizing patterns of two
parallel lines, providing robust versions to outliers. The significance of the Pearson coefficient
without significant components indicates a fit of three parallel lines. Thus, we reveal the
unknown aspect of the Pearson coefficient that identifies a two- or three-group association other
than a group, producing Type I or III2
errors. Finally, we apply the proposed coefficients with
permutation tests to simulated and real data. The proposed coefficients identify two- or three-
parallel line correlations or weaker but significant relationships not recognized by the Pearson
coefficient. In testing correlation hypotheses with normal data, the proposed methodology, in
an objective simulation study, minimizes the total error resulting from the Person coefficient by
4%.
Keywords: coefficients of correlation; Pearson decomposition; permutation tests; computational
statistics; robust correlation coefficient to outliers; parallel regression lines; cluster analysis
JEL CLASSIFICATION CODES: C10, C12, C14
1
[1] Papadopoulos, Savas, A Practical, Powerful, Robust and Interpretable Family of Correlation Coefficients (May 28, 2022). Available at
SSRN: https://ssrn.com/abstract=4114080 or http://dx.doi.org/10.2139/ssrn.4114080
2
https://en.wikipedia.org/wiki/Type_III_error
4. 4
INTRODUCTION: Motivation
If we conducted a competition for which statistical quantity
would be the most valuable in exploratory data analysis, the
winner would most likely be the correlation coefficient with a
significant difference from its first competitor. It is very
striking that although the three correlation coefficients,
Pearson, Spearman, and Kendall, were developed in the late
19th and early 20th centuries, and despite the rapid
development of computers, the three coefficients still
dominate the use.
5. 5
INTRODUCTION: What we do
Estimation & Hypothesis Testing for Correlation Coefficients
Let the hypotheses π»!: π = 0, π»": π β 0 and
Ξ± = P(Type I error), Ξ² = P(Type II error), Ξ³ = P(Type III error)
Type I Error: Reject a TRUE H0
Type II Error: NOT Reject a FALSE H0
Type III Error3: Reject a FALSE H0 for the WRONG
Reason (Correct by accident)
Note that the errors are due to the data and not the correlation
measures, e.g., in random data, by chance, a significant percentage of
the data could be close to a line (type I error).
3
https://en.wikipedia.org/wiki/Type_III_error
6. 6
INTRODUCTION: What we do
Γ We propose new correlation coefficients π! & π£! with
permutation tests for computing the p-values.
Γ The proposed correlation coefficient, π!, finds linear
relationships not detected by the Pearson coefficient (π").
Γ The proposed correlation coefficient is more robust due to
multivariate outliers than the Pearson coefficient (π").
Γ We reveal type III errors by using the Pearson coefficient (π").
That is, the π" can be significant, p-value(π") < πΌ, with an
insignificant linear relationship but a significant 2 or 3 parallel-line
association.
Γ The proposed combination coefficients π!, π£!, and π",
significantly eliminate the total error =Ξ±+Ξ²+Ξ³ compared to π" and π!
separately, e.g., for normal data by 4% (See Figure 1).
7. 7
INTRODUCTION: What we do
Figure 1: Global Simulation Results with Normal Data
0.051 0.051
0.100
0.096
0.150
0.073
0.066
0.000
0.000
0.00
0.05
0.10
0.15
0.20
0.25
Pearson r1 Combining r1, v1 & rP
Total Error for Pearson=rP=0.21, for r1=0.20 & for (r1,v1,rP)=0.17
P(Type I Error) P(Type II Error) P(Type III Error)
8. 8
INTRODUCTION: Why are the results important?
Γ By applying π", we minimize the overall error, compared
to the error using the Pearson coefficient (π#), and thus
make more correct decisions about whether two variables
are linearly dependent or not.
Γ In some cases, researchers and analysts may have the
illusion that there is a significant linear relationship, but the
real situation is a significant 2 or 3 parallel lines.
Γ The correlation coefficient, π", recognizes significant
linear relationships not detected by the Pearson coefficient
(see the two graphs in the 1st column of Figure 5).
Γ In cases with the presence of multivariate outliers π" is
more powerful than π#. That is, more accurate decisions.
9. 9
INTRODUCTION: How we do it
Γ Decompose the Pearson coefficient (π#) into two
components (The math proof is in the appendix).
ππ· β π. ππ β ππ + π. ππ β ππ
Γ We use robust to outliersβ versions of the two components
ππ & ππ. The π" shows only for 1-line fit & π£" indicates 1 or 2
parallel-line fit, and thus their linear combination π# detects 1
or 2 or 3 parallel-line fit.
Γ Viewing 0.64 & 0.36 as weights, at least 64% of π# shows a
1-line fit, and at most 36% indicates a 2-line fit.
10. 10
INTRODUCTION: How we do it
Γ Myths and Realities
Γ A Linear relationship Γ Significant Pearson coefficient,
p-value(π#) < πΌ
Γ Significant Pearson coefficient β Linear Association
Γ In this paper we show that:
Significant Pearson coefficient (π#) Γ Fit with 1 or 2 or 3
parallel lines.
11. 11
INTRODUCTION: How we do it
Γ Methodology:
Γ If p-value(π") < πΌ Γ a 1 line fit (see the flowchart)
Γ If p-value(π") β₯ πΌ & If p-value(π£") < πΌ Γ a 2 parallel-
line fit
Γ If p-value(π#) < πΌ & p-value(π") β₯ πΌ & If p-value(π£") β₯
πΌ Γ 3 parallel lines fit (based on math results)
Note: The methodology only detects some 2 or 3 parallel-line
fits. The significance of the method shows 1 or 2, or 3 parallel
lines and not the other way around. That is if there is a 2- or 3-
line fit, our methodology is not guaranteed to likely detect it.
13. 13
LITERATURE REVIEW
Γ Existing literature recommends the Pearson
correlation for normal data and the Spearman correlation
for nonnormal data. But some global simulations,
including ours, indicate that the Kendall coefficient
outperforms the Pearson and Spearman coefficients.
Γ Data-analysis software typically computes three
classic correlation coefficients, Pearsonβs, Spearmanβs,
and Kendallβs.
14. 14
LITERATURE REVIEW: Rankings
Γ There is certainly a lot of overlap between significant correlation
in face values and significant correlation in rankings
Γ But significant correlation in rankings β Significant correlation in
face values
Γ And significant correlation in face values β Significant correlation
in rankings
Γ Therefore, we lose power by using rankings
Γ We can plugin rankings to π!
4 and change the denominator
accordingly.
Γ Denote π != [π! with rankings]
Γ Our simulation studies, not presented here, show that π ! is more
powerful and robust than Spearmanβs coefficient.
4
https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4276146
15. 15
LITERATURE REVIEW: Kendall Coefficient
The Kendall coefficient (π") just shows:
The Percentage of monotonic pairs=
!#|%!|
&
(a novel approach)
from all possible point pairs
'β('*!)
&
= π + π, where π" = 2 β
,*-
'β('*!)
π = pairs with increasing pattern
π = pairs with decreasing pattern
Γ Thus, we correct that the π" is not only a rank correlation coefficient;
π" is the same for nominal values and no-repeat rankings.
Γ π" does not show how close the points are to a curve; the points
could be close to multi-curves.
Γ Our simulations5
show that π" reveals relationships with one-sided
multivariate outliers not signaled by Pearson or Spearman coefficients.
5
https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4276146
16. 16
LITERATURE REVIEW: Outliers
Γ The Pearson coefficient (π#) is known to be sensitive to
outliers, so some researchers suggest using rank
coefficients, e.g., Spearman & Kendall.
Γ Alternatively, we recommend removing univariate
outliers, e.g., using the simple π β πΌππ criterion, thus
eliminating influential points.
Γ After removing univariate outliers, we cannot have
extreme multivariate outliers. Near the most extreme cases
are the made-up examples in Figure 4.
Γ Note that with rankings, there are never univariate
outliers.
17. 17
MAIN RESULT: THE DECOMPOSITION
We proved the following meaningful decomposition:
Pearson = ππ· =
π
π
β πΒ±,π +
π βπ
π
β ππ β π. ππ β πΒ±,π + π. ππ β ππ
πΒ±,& = Β± ;1 β
12"
($)
β3"
($)
1
444444444444444$
5/7
>, π£Β±,& = Β± A1 β
8
&'
(
($)
β*
(
($)
&
$
&β9!*
$
+
:
B
(The mathematical proof is in the appendix).
STANDARDIZED VARIABLES: π§,
(;)
=
<(*<
|<"*<|π
44444444441/π , π = 1,2; π = 1,2, β― , π
Symbolize + for positive and β for negative relationship
Symbolize by π§ the sample mean, by |π| β‘ absolute value and
by s the population variance.
20. 20
PROPERTIES FOR ππ & ππ (two-parallel lines)
Γ β1 β€ π& β€ 1 & β1 β€ π£& β€ 1 due to the restrictions in the
definitions.
Γ An exact value of +1 or -1 for π& indicates a perfect positive
or negative relationship and vice versa, since the mean
distance of the standardized points is 0 and so all points fall
on the line y=x or on the line y=-x.
Γ An exact value of +1 or -1 for ππ implies (two-parallel
lines):
|π£&| = 1 βΊ MAD()"
($)
β+"
($)
(
,
= 0 βΊ β π, ?π₯-
(&)
β π¦-
(&)
? = π βΊ
21. 21
βΊ β π, π¦-
(&)
= Β±π₯0,-
(&)
+ π or π¦0,-
(&)
= Β±π₯0,-
(&)
β π (continued)
Two symmetrical lines, y=x+c and y=x-c around the line
y=x or two symmetrical lines, y=-x+c and y=-x-c around
the line y=-x. In the special case for c=0 the points fall on
the line y=x or on the line y=-x.
Γ A correlation value close to 0 or 0 indicates no relationship.
Γ The closer to +1 or -1 the coefficient, π!, the stronger a one-line
association, assuming no influential points.
Γ The closer to +1 or -1 the coefficient, π£!, the stronger a one-line
or a two-line association, assuming no influential points.
22. 22
Two- or Three parallel lines
The significance of the Pearson correlation coefficient may be
misleading if some standardized points are close to the line y=x or y=-x,
and other standardized points are close to the lines y=x+c and y=x-c or
close to the lines y=-x+c and y=-x-c. The 1st set of points magnifies the
1st component π& towards 1 or -1, and the 2nd set stretches the 2nd
component π£& towards 1. The linear combination ππ· β π. ππ β ππ +
π. ππ β ππ can give a significant value for the Pearson coefficient ππ·
because most points are close to 2 or 3 lines and not necessarily close
to 1 line, as known in the literature. We justify this with simulations and
real data later.
23. 23
Two- or Three parallel lines (cont.)
Without loss of generality, we assume univariate outlier removal, variable
standardization, and a positive relationship.
If π# βΆ 1 (close to 1), then $π₯$
(#)
β π¦$
(#)
$
((((((((((((((((
βΆ 0, and thus the points are close to
the line y=x.
If π£# βΆ 1, then π
'($
(&)
)*$
(&)
'
#
βΆ 0 or $π₯+
(#)
β π¦+
(#)
$ = π and thus the points are
close to the parallel lines, y=x+c and y=x-c, symmetric to the line y=x (shown
earlier).
If π, βΆ 1, then π# βΆ 1 & π£# β 1 (a 1-line fit only)
or π# β 1 & π£# βΆ 1 (a 2-line fit only). In this case, we cannot
have a single line because otherwise, π# βΆ 1.
24. 24
Two- or Three parallel lines (cont.)
or π' βΆ 1 & π£' βΆ 1 (for c = 0, we have a 1-line, & for c>>0,
have a 3-line fit)
Example with 1 line: A perfect single-line fit with
ππ· = ππ = ππ = 1.
Example with 3 parallel lines: In Figure 3, the 2nd example
with 3 lines. In this example, all three coefficients are large ππ· =
0.71, ππ = 0.66, ππ = 0.79. We have three points exactly to the
middle line and six points to two symmetric lines around the
middle line, 3 points to each line.
25. 25
Three-parallel lines (cont.)
The significance of the Pearson coefficient with insignificant
components indicates a fit of three parallel lines. The logic behind
this is that the insignificance of the two components indicates that
the points are not close to one or two parallel lines; otherwise,
they would be significant. Therefore, the significance of the
Pearson coefficient, in this case, is that some points are close to a
straight line, and others are close to two symmetrical lines around
the first line. Another example is the 3rd plot of Figure 5, π1 = 0.16,
π, = 0.12, π£, = 0.25 with p-values 0.02, 0.07, and 0.07,
respectively. The existence of such cases is shown in Figure 10.
26. 26
Two- or Three parallel lines
Mean and STD Relationship for positive numbers
In general, the Mean (M) and the Standard Deviation (SD) sizes
are independent of each other. But for positive numbers, as in
the case with Vertical Projections (VP) Gπ₯(
(')
β π¦(
(')
G, a small M
implies a small SD but not vice versa, without outliers. A small M
indicates small positive numbers close together and, therefore,
a small SD. A small SD can also occur in large positive numbers,
so M can be large.
27. 27
Γ A small M implies small VPs, uπ₯,
(&)
β π¦,
(&)
u β π, or points close to
the lines π¦ = π₯ β π and π¦ = π₯ + π. Since M is small, the points can
be considered close to the line π¦ = π₯.
Γ A small SD (significant π£&) implies VPs close to M, uπ₯,
(&)
β π¦,
(&)
u β
π = uπ₯B
(&)
β π¦B
(&)
u
xxxxxxxxxxxxxxxx
or points close to the lines π¦ = π₯ β π and π¦ = π₯ +
π. If M is large (insignificant π&) then we have a two-line fit.
Γ For large M & SD (insignificant π& & π£&) with significant πD, a
large portion of the data minimizes M & SD and therefore maximizes
πD. In addition, another large portion of points maximizes M, SD,
otherwise π& & π£& would be significant, and therefore minimizes π&
& π£&, see Figure 9.
28. 28
Figure 3: MADE-UP EXAMPLES: Two & Three parallel lines
In both cases, the Pearson coefficient is significant (p-values of ππ 0.02 & 0.03),
giving us the impression that there is a significant linear relationship. The
proposed coefficients ππ and ππ show an insignificant linear relationship (p-
values of ππ 0.09 & 0.06), a significant two-parallel line fit in Case 1 (p-value of
ππ=0.002), and a significant three-parallel line fit in Case 2 (insignificant
ππ and ππ, 0.06 & 0.06, and a significant Pearson coefficient, p-value=0.03).
29. 29
Figure 4: A MADE-UP EXAMPLES: Perfect Linear
Relationships with 1 & 2 outliers
The Pearson correlation coefficient is not robust under the presence of outliers6.
We consider a perfect linear relationship with ONE &TWO multivariate outliers.
We use the Pearson coefficient & the proposed π. coefficient. Only the
proposed correlation, ππ, recognizes the linear relationships, p-
values=0.04 & 0.02<0.05.
6
https://en.wikipedia.org/wiki/Pearson_correlation_coefficient
30. 30
Constructing a Correlation Measure
Let G be a distance measure between the standardized values
of two paired variables and
πΒ±,- = Β± L1 β
.
/
M, where πΊ
01
O
P πΏ (convergence in probability)
π
- = R
π2,-, if positive relationship & πΊ < πΏ,
π3,-, if negative relationship & πΊ < πΏ,
0, otherwise
Note that the desired properties apply.
Γ e.g., in πΒ±,- and π£Β±,-, for g=1,2; the denominators of the
fractions are the expected values of the numerators under
the assumptions of normality and independence.
31. 31
AN INTERPRETATION OF THE CORRELATION COEFFICIENT
Γ The correlation coefficient, π&, can be interpreted as the
percentage change between the squared distance of the
standardized values and the squared limiting distance for
independent normal π₯ and π¦.
Γ For example, a value of π&=0.5 implies 50% reduction of the
squared observed distance from the squared distance of the
limiting distance under independence and normality.
Γ In the literature, it is known that Pearsonβs correlation can be
viewed as a rescaled variance of the difference between
standardized scores7.
7
Rodgers; Nicewander (1988). "Thirteen ways to look at the correlation coefficient" (PDF). The American
Statistician. 42 (1): 59β66.
32. 32
PERMUTATION TESTS: computing the p-values
Permutation tests8 have been used for hypothesis testing of correlation
coefficients between two variables, x and y. Initially, calculate the
correlation coefficient repeatedly after shuffling the observations of the
variable y and keeping constant the order of the observations for the
variable x. Then, we can derive p-values from the distribution of the
computed correlation coefficients. Permutation tests9 enjoy the
following merits against other standard statistical tests:
β’ Approximate p-values very satisfactory.
β’ Do not assume any particular distribution (distribution-free).
β’ Are suitable for small samples.
β’ Are applicable to non-random samples, e.g., time-series data.
8
https://en.wikipedia.org/wiki/Pearson_correlation_coefficient
9
Berry, K. J., Johnston, J. E., & Mielke, Jr.(Paul W.). (2018). The measurement of association: a permutation statistical
approach. Springer International Publishing.
33. 33
SIMULATION DESIGN WITH NORMAL DATA
Γ 100,000 simulations by Python (NUMPY library)
Γ Picking randomly one of the following 6 pairs (n, r) with equal
probabilities (1/6):
n 20 35 50 100 150 200
r 0.7 0.6 0.5 0.35 0.3 0.25
Γ Generating n correlated-bivariate data, π₯- and π¦- with Pearsonβs
coefficient π1 = r. All the data are correlated as follows:
Γ π₯- βΌ ππππππ(0,1), π- βΌ ππππππ(0,1),
Γ π¦- = r β π₯- + R1 β r β π-
Γ Applied in Figure 5, 1st row, & Tables 1a & 1b.
34. 34
AN APPLICATION TO GDP PER CAPITA
Γ Publicly available data10 WORLD BANK
Γ N=62 countries with GDP per Cap > 10,000$ in 2020, and
full annual data for 1982-2020
Γ T=39 for the period 1982-2020. Analyze Growth Rates (%)
Γ (622
-62)/2 = 1891 pairs (x,y) correlation cases
Γ No causality. Lurking variables: Global or Continental
Economy
Γ Compare the economic growth of a country with its
correlated countries by regression residuals.
Γ Applied in Figure 5, 2nd
row, & Table 2.
10
https://data.worldbank.org/indicator/NY.GDP.PCAP.CD
35. 35
Result Presentation in a Graph, see Figure 4
Γ Simulated data in the 1st row and application data in the
2nd row.
Γ 1-, 2-, and 3-line fit in the 1st, 2nd, & 3rd columns,
respectively.
Γ In the application initial sample size n=39 and we remove
univariate outliers by the 1.5 β πΌππ criterion. In the
simulation plots the sample size is n=200.
Γ By p, p1, & p2 we represent the p-values of Pearson,
π"and π£", respectively.
Γ By significance, we mean that the p-value<0.05
36. 36
Conclusions from Figure 4
Γ In the 1st column, only π" shows a significant linear
relationship. The application graph shows the robustness of π"
to non-normal data.
Γ In the 2nd column, in the 1st graph with simulated data, the
Pearson coefficient is significant, and the insignificance of π"
with the significance of π£" indicates a 2-line fit. From the
existing literature, there is a significant 1-line fit; this is a Type
III error.
Γ In the 2nd column, in the 2nd graph with the application
data, the Pearson coefficient is insignificant, and the
insignificance of π" with the significance of π£" indicates a 2-line
fit. From the existing literature, there is no significant 1-line fit.
37. 37
Conclusions from Figure 4 (continued)
Γ In the 3rd column, in both graphs, the Pearson coefficient is
significant, and both π" and π£" are insignificant. Thus, we
conclude that there is a significant fit of a 3-line fit. From the
existing literature, there is a significant 1-line fit; this is a Type III
error.
39. 39
Simulation Results (Tables 1a & 1b)
Γ See the simulation design earlier.
Γ Tables 1a (π = 0) & 1b (πΒΉ0) are 3-way tables for the 3
correlation coefficients π# (Pearson), π", and π£", with 2
categories each, whether significant or not.
Γ For π = 0, the Ξ± = P(Type I error) for π# is Ξ± =5.1% (close to
5 as was expected), and for π" is Ξ± =5.1%=3.2+1.9. By
combining π#, π" and π£", Ξ± =10%=1-0.90.
Γ For π β 0, the Ξ² = P(Type II error) for π# is Ξ² =9.6%, while
for π" is Ξ² =15%=6.6+8.4. By combining π#, π" and π£", Ξ²=7.3%.
40. 40
Simulation Results (Tables 1a & 1b)
Γ For π β 0, the Ξ³ = P(Type III error) for π! is Ξ³ =6.6%=4.3+2.3 while
combining π!, π" and π£" is Ξ³ =0.
Γ With the proposed methodology, the Ξ± =P(Type I error) doubles
from 5 to 10, as it detects parallel lines in addition to linear fits, but
the Ξ² = P(Type II error) is significantly smaller than that for Pearsonβs
correlation from 9.6 to 7.3, and there is no Ξ³ = P(Type III error).
Γ The above results appear in Figure 1.
Γ Thus, by combining π", π£", and π!, we minimize the total error
compared to the total error by π# and π" separately.
Γ In this case, we get the smallest total error if we use the Pearson
significance and exclude the Type III error, which the significance of π!,
π", and π£" can account for. In the case of non-normal data, we can use
the combination π", π£", and π!.
41. 41
Table 1a: Simulation (π = π)
N=100,000 π = π ππ
Pearson ππ Significant Not Signif. Total
SignificantSignificant 1.1, 1 line 2.1, 1 line 3.2
Not Signif. 1.0, 2 lines 0.8, 3 lines 1.8
Total 2.1 2.9 5.0
Not Signif.Significant 0.0, 1 line 1.9, 1 line 1.9
Not Signif. 3.1, 2 lines 90.0, No lines 93.1
Total 3.1 91.9 95.0
42. 42
Table 1b: Simulation (πΒΉπ)
N=100,000 πΒΉπ ππ
Pearson ππ Significant Not Signif. Total
Significant Significant 66.1, 1 line 17.7, 1 line 83.8
Not Signif. 4.3, 2 lines 2.3, 3 lines 6.6
Total 70.4 20.0 90.4
Not Signif. Significant 0.0, 1 line 1.2, 1 line 1.2
Not Signif. 1.1, 2 lines 7.3, No lines 8.4
Total 1.1 8.5 9.6
43. 43
Application Results (Table 2)
Γ See the application information earlier.
Γ Table 2 is a 3-way table for the 3 correlation coefficients π1
(Pearson), π&, and π£&, with 2 categories each, whether significant or
not.
Γ The initial sample size is n=39, and we remove univariate
outliers by the 1.5 β πΌππ criterion.
Γ In 4.4%=0.3+4.1 of the 1891 cases, π& recognizes a significant
linear relationship not detected by the Pearson π1 coefficient.
Γ Combining π&, and π£&, we show a significant 2-line fit in
4.9%=0.6+4.3 of the 1891 cases, not detected otherwise.
Γ By combining π&, π£&, and π1, we detect a significant 3-line fit in
1.5% of the 1891 cases, not recognized otherwise.
44. 44
Table 2: AN APPLICATION TO GDP PER CAPITA
N=1891 % ππ
Pearson ππ Significant Not Signif. Total
SignificantSignificant 40.8, 1 line 16.9, 1 line 57.7
Not Signif. 0.6, 2 lines 1.5, 3 lines 2.1
Total 41.4 18.4 59.8
Not Signif.Significant 0.4, 1 line 4.0, 1 line 4.4
Not Signif. 4.2, 2 lines31.6, No 1-3 lines 35.8
Total 4.6 35.6 40.2
45. 45
Figure 6: Venn Diagrams11 for the Simulation (Table 1a & 1b)
π = π πΒΉπ
11
For understanding the diagrams see the link: https://www.easycalculation.com/algebra/venn-diagram-3sets.php
47. 47
Comments on Figures 6 & 7 (Venn Diagrams)
Γ The Pearson πD and the proposed coefficient for a linear fit π! AGREE
by 93.2%=90+1.1+2.1, by 91.1%=66.1+17.7+7.3, and by
89.3%=40.8+16.9+31.6, in the cases for π = 0, πΒΉ0, and in the application,
respectively. Roughly, there is 90% agreement and 10% disagreement.
Γ A significant TWO- or THREE-LINE FIT appears in 4.1%=3.1+1 & 0.8% in
the case π = 0, 5.4%=4.3+1.1 & 2.3% in the case πΒΉ0, and 4.8%=4.2+0.6 &
1.5% in the application, respectively.
Γ The robust version of the 2nd
component of the Pearson
decomposition, the coefficient π£!, does not recognize the linear
relationship for a large amount, 17.7% in the case πΒΉ0, and 16.9% in the
application, respectively. Thus, we recommend π! for linear relationships
and π£! for 2 and 3-parellel fitting lines in combination with π! and πD.
48. 48
OVERALL CONCLUSIONS
Γ The significance of the Pearson correlation coefficient may
imply 1 or 2, or 3 parallel-line fits. There is a type III error; we may
think there is a significant fit with 1 line, but in fact, exists a fit of 2
or 3 parallel lines.
Γ We provide a methodology to detect 1 or 2- or 3-line fits.
Γ Prove a meaningful decomposition of the Pearson coefficient.
Γ The proposed π& coefficient detects more linear relationships
and has a smaller overall error than the Pearson coefficient.
49. 49
OVERALL CONCLUSIONS
Γ π! is more robust to non-normality & outliers than the Pearson
coefficient.
Γ The robust version of the 2nd component of the Pearson
decomposition, the coefficient π£!, does not recognize many linear
relationships since it detects two parallel lines. Thus, we recommend
only π! for single-line detection.
Γ The two robust version components, π!, and π£!, of the Pearson
decomposition combined with the Pearson coefficient, can be applied by
all scientists to detect accurate significant fits of 1 or 2, or 3 parallel
lines.
50. 50
APPENDIX: THE DECOMPOSITION
Pearson =
π
π
β πΒ±,π +
π 3π
π
β ππ β π. ππ β πΒ±,π + π. ππ β ππ
πΒ±,& = Β± ;1 β
12"
($)
β3"
($)
1
444444444444444$
5/7
>, π£Β±,& = Β± A1 β
8
&'
(
($)
β*
(
($)
&
$
&β9!*
$
+
:
B
With standardized values: π§,
(&)
=
<(*<
|<"*<|2
44444444441/2 , π = 1,2, β― , π
Symbolize by π the known mathematical constant, by π§ the sample mean,
by |π| β‘ absolute value, and by s the population variance.
Define as π& = Ε
π#,&, for positive relationship
π*,&, for negative relationship
and π£& = Ε
π£#,& for positive relationship
π£*,& for negative relationship
51. 51
APPENDIX: A Proof for the Decomposition:
We write the Pearson coefficient as: π14 = π₯5
(,)
β π¦5
(,)
aaaaaaaaaaaa
.
The mean square of the standardized values is equal to 1:
βΉπ₯B
(&)
Ε
&
xxxxxxxxxx
= βΉπ¦B
(&)
Ε
&
xxxxxxxxxx
= 1, and from the identity (π β π)&
= π&
+ π&
β 2ππ
we get the following reformulation of the Pearson coefficient:
π14 = π₯5
(,)
β π¦5
(,)
aaaaaaaaaaaa
= Β± k1 β
6)&
(')
β+&
(')
7
'
888888888888888888
,
l
Using the known identity13 |π§9|,
aaaaaa = p|π§9|
aaaaq
,
+ π|zΞΉ|
2
, for π§9 = π₯-
(,)
β π¦-
(,)
and by some calculations we get the result.
13
https://en.wikipedia.org/wiki/Root_mean_square
53. 53
APPENDIX: Notes on the Decomposition:
Γ If we assume π₯,~π(π2, π2
&) & π¦,~πΕΎπ3, π3
&
ΕΈ then the sum of the
standardized values: π₯,
(&)
β π¦,
(&)
βΌ π(0,2) and therefore
uπ₯,
(&)
β π¦,
(&)
u ~π»πππ-π Β€
&
β7
, 2 β βΉ1 β
&
7
ΕΒ₯ (Half-normal14 distribution)
We used that if π₯,~π(0, π&) then
|π₯|~π»πππ-π =π β @
2
π
, π!
β C1 β
2
π
FG
Γ In πΒ±,& and π£Β±,&, the denominators of the fractions are the expected
values of the numerators under the assumptions of normality and
independence.
14
https://en.wikipedia.org/wiki/Half-normal_distribution
54. 54
APPENDIX: Notes on the Normality Assumption
Γ Despite using the normality assumption to obtain the limiting
distances in the proposed coefficients, this assumption does not affect
the p-values computed by permutation tests.
Γ For non-normal data, we may have some bias in estimating the
correlation coefficients π! and π£!. However, the estimation of their p-
values does not depend on the normality assumption. So, with non-
normal data, we look at the p-values of π! and π£!.
Γ For large sample sizes and normal data, we could use already
calculated critical values if the calculated time was an issue.
Γ For large sample sizes and non-normal data, we could use already
calculated critical values of the respective rank coefficients π! and π£!,
denoted as π ! and π!, with a power compensation if the calculated time
was an issue.
56. 56
APPENDIX: A Tip: The Parallelism between
Hypothesis Testing and Proof by Contradiction
Γ In proof by contradiction, we establish a
proposition by leading to a contradiction by
assuming that the
Γ proposition is false.
Γ In hypothesis testing, we accept the
alternative hypothesis, H1, concluding
improbably (in a small p-value) by assuming
a false H1 (a true H0). And
57. 57
APPENDIX: THE CRITICAL VALUES AND P-VALUES
FOR ππ ARE COMPUTED BY PERMUTATION TESTS
Cut-Off Points for π" (two-sided Ξ±=0.05 or one-sided Ξ±=0.025)
n c n c n c n c n c n c
5 0.924 12 0.662 19 0.543 30 0.437 80 0.278 500 0.113
6 0.868 13 0.637 20 0.528 35 0.409 90 0.262 1000 0.080
7 0.819 14 0.617 21 0.517 40 0.386 100 0.249 2000 0.057
8 0.780 15 0.602 22 0.505 45 0.363 150 0.205 5000 0.036
9 0.742 16 0.582 23 0.496 50 0.346 200 0.179 104
0.026
10 0.715 17 0.570 24 0.487 60 0.318 300 0.146 105
0.008
11 0.687 18 0.556 25 0.477 70 0.296 400 0.126 106
0.001
Under Normality
Example: In a case with data not rejected as normal and n=90, we observe π. =
0.21. Then we cannot reject π»/: π = 0 against π».: π β 0 with Ξ±=0.05 since |π.| <
π. = 0.262.
58. 58
APPENDIX: THE CRITICAL VALUES AND P-VALUES
FOR ππ ARE COMPUTED BY PERMUTATION TESTS
Cut-Off Points for π£" (two-sided Ξ±=0.05 or one-sided Ξ±=0.025)
n c n c n c n c n c n c
5 0.962 12 0.751 19 0.629 30 0.522 80 0.337 500 0.141
6 0.932 13 0.732 20 0.616 35 0.490 90 0.319 1000 0.100
7 0.893 14 0.709 21 0.605 40 0.461 100 0.303 2000 0.072
8 0.860 15 0.692 22 0.595 45 0.435 150 0.251 5000 0.046
9 0.830 16 0.675 23 0.582 50 0.415 200 0.219 104
0.033
10 0.801 17 0.658 24 0.573 60 0.384 300 0.180 105
0.011
11 0.775 18 0.644 25 0.560 70 0.358 400 0.158 106
0.003
Under normal data
59. 59
APPENDIX: THE CRITICAL VALUES FOR PEARSON
COMPUTED BY PERMUTATION TESTS
Cut-Off Points for π# (two-sided Ξ±=0.05 or one-sided Ξ±=0.025)
n c n c n c n c n c n c
5 0.923 12 0.640 19 0.510 30 0.408 80 0.250 500 0.100
6 0.866 13 0.618 20 0.497 35 0.379 90 0.236 1000 0.071
7 0.816 14 0.591 21 0.488 40 0.353 100 0.223 2000 0.050
8 0.771 15 0.576 22 0.475 45 0.332 150 0.182 5000 0.031
9 0.730 16 0.558 23 0.468 50 0.317 200 0.158 104
0.022
10 0.698 17 0.540 24 0.457 60 0.291 300 0.130 105
0.007
11 0.668 18 0.528 25 0.446 70 0.267 400 0.112 106
0.002
Under normal data
60. 60
APPENDIX: EXACT CRITICAL VALUES FOR PEARSON
Cut-Off Points for π# (two-sided Ξ±=0.05 or one-sided Ξ±=0.025)
n c n c n c n c n c n c
5 0.878 12 0.576 19 0.456 30 0.361 80 0.220 500 0.088
6 0.811 13 0.553 20 0.444 35 0.334 90 0.207 1000 0.062
7 0.754 14 0.532 21 0.433 40 0.312 100 0.197 2000 0.044
8 0.707 15 0.514 22 0.423 45 0.294 150 0.160 5000 0.028
9 0.666 16 0.497 23 0.413 50 0.279 200 0.139 104
0.020
10 0.632 17 0.482 24 0.404 60 0.254 300 0.113 105
0.006
11 0.602 18 0.468 25 0.396 70 0.235 400 0.098 106
0.002
π =
π‘;/,
tπ β 2 + π‘;/,
,
61. 61
Figure 9. Example n=1000, r =0.5, standardized points
Blue points (near the y=x line) maximize the 1st component, red points
maximize the 2nd component. In the histogram the selected points are the
red points. Red and blue points may overlap or disjoint.
62. 62
Figure10. A Significant Pearson coefficient with
insignificant component
e.g., n=50, r2<0.335, v2<0.404, v2>0.7512-1.751938*r2
0.279< 0.64*r2+0.36*v2<1.
This case occurs in the triangle. So, it is possible.
63. 63
PYTHON CODE FOR THE COEFFICIENTS & PERMUTATION TESTS
# =============================================================================
def r1(x,y): # Computes the coefficient r1
nxy = x.shape[0]
xm = np.mean(x)*np.ones(nxy); ym = np.mean(y)*np.ones(nxy)
dmx = np.mean(abs(x-xm)); dmy = np.mean(abs(y-ym))
x = (x-xm)/dmx; y = (y-ym)/dmy; del xm, ym, dmx, dmy
dxyp = (np.mean(abs(x-y))); dxyn = (np.mean(abs(x+y)))
if ( (dxyp < dxyn) & (dxyp < np.sqrt(2)) ):
rc1 = 1-dxyp**2 / 2
elif ( (dxyp > dxyn) & (dxyn < np.sqrt(2)) ):
rc1 = -( 1-dxyn**2 / 2 )
else:
rc1 = 0
return rc1
# =============================================================================
def pvr1(x,y): # p-value for r1 by permutation tests
rcc1 = r1(x,y)
nper=1000
dr = np.zeros(nper)
yh = y.tolist()
for ii in range(0,nper): # Permutation
yr = np.array( random.sample( yh, len(yh) ) )
dr[ii] = r1(x,yr)
ecdfr = ECDF(dr[:])
return ecdfr(-abs(rcc1)) + 1 - ecdfr(abs(rcc1))
# =============================================================================
def v1(x,y): # Computes the coefficient v1
nxy = x.shape[0]
xm = np.mean(x)*np.ones(nxy); ym = np.mean(y)*np.ones(nxy)
dmx = np.mean(abs(x-xm)); dmy = np.mean(abs(y-ym))