Title: New questions with the correlation coefficient
1New questionswith the correlation coefficient
2Testing the H0 r r0 hypothesis
3In general
Fishers Z-transformation Z(r) will be normal
4E.g., if r 0.80see MiniStat
5Z(r) N(Z(r), sz) (sz )2 1/(n - 3) E.g.,
Z(0.80) 1.099 If n 10 (sz )2 1/7
6H0 r r0
Under H0 Z will be N(0, 1)
7Decision
-1.96 lt Z lt 1.96 Keep H0
Z -1.96 r lt r0
Z ³ 1.96 r gt r0
8An example
H0 r 0.5 n 28, r 0.8
92. Interval estimation of r
For Z(r) C0.95 Z(r) 1.96sz (z1 z2)
For r Transform back C0.95 (r1 r2)
10An example
n 28, r 0.8
C0.95(Z(r)) Z(0.8) 1.96/sz 1.099
1.96/5 (0.707 1.491) C0.95(r) (0.610
0.905)
113. H0 r1 r2
Under H0 ZN(0, 1)
12Surprising correlations
(a) Wagners preference and number of socks (b)
Word proficiency and foot size
134. Partial correlation
X Y
Z
14r 0.85
Y
r3 -0.20
20
r2 -0.54
15
10
5
0
X
0
5
10
15
20
r1 -0.61
15By means of linear regression
X Xz Xres
Y Yz Yres
rXY.Z r(Xres,Yres)
16Formula of theoretical partial correlation
coefficient
17Formula of sample partial correlation coefficient
18Two examples
0.64
0.46
X Y
X Y
0.80
0.80
0.80
0.80
Z
Z
rxy.z 0
rxy.z -0.50
19Another two examples
0
0.10
X Y
X Y
0.60
0.60
-0.60
0.60
Z
Z
rxy.z -0.56
rxy.z 0.72
20Comparing two dependent samples
21 Ss X Y Y - X 1. 4 1 -
2. 1 0 - 3. 2 0 -
4. 0 0 0 5. 3 7
6. 3 11 7. 4.5 16
22Means and medians
X
Y
Mean
2.5
5.0
X lt Y
Median
3
1
X gt Y
23Stochastic equality (equality in tendency)
P(X lt Y) P(X gt Y)
24Meaningful null hypotheses
H0 E(X) E(Y)
H0 Med(X) Med(Y)
H0 P(X lt Y) P(X gt Y)
25H0 E(X) E(Y)
- One-sample t-test
- Assumption normality
- Robust alternatives
- Johnson test
- Gayen test
26H0 Med(X) Med(Y)
- Wilcoxon test
- Assumptions
- X and Y are continuous
- Y-X is symmetric
27If X and Y are symmetric Med(X)
Med(Y) and Med(Y-X) 0 are equivalent.
28If X and Y are continuous Med(Y-X) 0 and P(X lt
Y) P(X gt Y) are equivalent.
29H0 P(X lt Y) P(X gt Y)
- Sign test
- Assumptions
- None
- But, it is good if N is large
30How to perform the sign test?
- To be determined
- n of X gt Y occurrences
- n- of X lt Y occurrences
- (t1 t2) region of acceptance
31Decision in the sign test
- t1 lt n lt t2 Keep H0
- n t1 P(X lt Y) lt P(X gt Y) (Y lt X
stochastically) - n ³ t2 P(X lt Y) gt P(X gt Y)
- (Y gt X stochastically)
32An example to the sign test
N 50 X Pulse rate before experiment Y Pulse
rate during experiment n 33 (incr.) n- 15
(decr.) In case of n 3315 48 and a
5 (t1-t2) (16-32) n ³ t2 P(X lt Y) gt P(X gt
Y)
33Comparing two independent samples
34 X-sample Y-sample 0 1 1 2 8 3 X lt
Y (0 1), (0 2), (0 3), (12), (1 3)
X gt Y (8 1), (8 2), (8 3) n 5 (incr.)
n- 3 (decr.)
35Means and medians
X
Y
Mean
3
2
X gt Y
Median
1
2
X lt Y
36Stochastic equality (equality in tendency)
P(X lt Y) P(X gt Y)
37Meaningful null hypotheses
H0 E(X) E(Y)
H0 Med(X) Med(Y)
H0 P(X lt Y) P(X gt Y)
38H0 E(X) E(Y)
- Two-sample t-test
- Assumptions
- normaliy, s1 s2
- Robust variant
- Welch-test
39H0 P(X lt Y) P(X gt Y)
- Mann-Whitney test (MW)
- Assumption
- s1 s2
- Robust variants
- Brunner-Munzel test (BM)
- Fligner-Policello test (FP)
40How to perform MW
xi rank yj rank 0 1 1
2.5 1 2.5 2 4 8 6 3
5 R1 9.5 R2 11.5
(t1 t2) Region of acceptance
41Decision in MW
- t1 lt R1 lt t2 Keep H0
- R1 t1 Xlt Y stochastically
- R1³ t2 X gtY stochastically
42Monotonic relationship of two variables, X and Y
43Deterministic monotonicity
Y
16
If X grows then Y grows too
12
8
4
0
X
0
1
2
3
4
44Stochastic monotonicity
Y
16
If X grows then likely Y grows too
12
8
4
0
X
0
1
2
3
4
45An example
Ss X Y 1 1 35 2
1.5 34 3 2 36 4 3 37 5
7 38 6 10 39
46Rank data separately for X and Y
Ss X rank Y rank 1 1 1
35 2 2 1.5 2 34 1 3 2
3 36 3 4 3 4 37 4 5
7 5 38 5 6 10 6 39 6
47Spearmans rank correlation (rS)Correlation
between ranksIn the above example r 0.91, rS
0.94
48Discordancy
Concordancy
49Concordancy and discordancy
Y
B
C
-
A
X
D
50Kendall-s tau
p Proportion of concordant pairs in the
population p- Proportion of discordant pairs in
the population
t p - p-