Добавил:
kiopkiopkiop18@yandex.ru t.me/Prokururor I Вовсе не секретарь, но почту проверяю Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Ординатура / Хирургия / Библиотека им академика М.И. Перельмана / Книга_155_библиотеки_им_акад_М_И_Перельмана

.pdf
Скачиваний:
0
Добавлен:
10.10.2026
Размер:
7 Мб
Скачать
☆
12.2 Correlation 279
Table 12.1 Number of absences, number of hours of study, and final test scores on an exam of a
random sample
Hours of study Final grade Absence
6 82 6
5 86 2
1 50 15
3 74 9
1 58 12
4 90 5
4 78 8
2 70 10
2 65 12
7 94 2
8 96 0
3 75 8
5 82 5
Table 12.2 Necessary calculations for estimating correlation coefficient for data on Table
12.1
Student Hours (x) Grade (y) x
2
y
2
x.y
1 6 82 36 6724 492
2 5 86 25 7396 430
3 1 50 1 2500 50
4 3 74 9 5476 222
5 1 58 1 3364 58
6 4 90 16 8100 360
7 4 78 16 6084 312
8 2 70 4 4900 140
9 2 65 4 4225 130
10 7 94 49 8836 658
11 8 96 64 9216 768
12 3 75 9 5625 225
13 5 82 25 6724 410
Sum
x = 51
y = 1000
x
2
= 259
y
2
= 79170
x.y = 4255
Solution: Let’s to denote number of hours of study as x, final grade as y, no. of
absences as z, and obviously n = 13. Then a Table
12.2 can be made for the data
calculations, as shown here.
Now we substitute values from the last row in the formula and estimate the
coefficient correlation of r.
https://t.me/med1917
280 12 Correlation and Regression
ˆρ = r
xy
=
n
x.y −
x

y
n
x
2
−
x
2

n
y
2
−
y
2
=
13 × 4255 − 51 × 1000
13 × 259 −
(
51
)
2

13 × 79170 −
(
1000
)
2
=
4315
4730.21
= 0.912
The coefficient correlation of r has no unit of measurement and the value of r will
remain unchanged, if the x and y-values are switched.
12.2.2 Confidence Interval for Pearson Correlation
Coefficient
Like other estimators, it’s possible to compute a confidence interval for the correlation
coefficient in the population. However, because the sampling distribution of Pearson’s
r is not normal, we need to transform r to z using the formula below to achieve a
normal sampling distribution. Subsequently, we can reverse this transformation to
obtain a confidence interval for the population correlation coefficient.
z =
1
2
ln
1 + r
1 − r
The standard error of z is approximately:
Se
z
=
1
√
n − 3
Hence, the 95% confidence interval for z is:
z
1
= z − 1.96 × Se
z
= z −
1.96
√
n − 3
z
2
= z + 1.96 × Se
z
= z +
1.96
√
n − 3
The 95% confidence interval for correlation coefficient of r is reachable by back
transformation of the above value as below:
e
2z
1
− 1
e
2z
1
+ 1
to
e
2z
2
− 1
e
2z
2
+ 1
Example 12.2
The correlation coefficient of number of hours study and final grade
in Example 12.1 with 13 samples was 0.912. Find the 95% confidence interval for r.
https://t.me/med1917
12.2 Correlation 281
Solution: We first transform r = 0.912 as below:
z =
1
2
ln
1 + r
1 − r
=
1
2
ln
1 + 0.912
1 − 0.912
=
1
2
ln 21.7272 = 1.539
The standard error of z is:
Se
z
=
1
√
n − 3
=
1
√
13 − 3
= 0.316
The 95% confidence interval for z is:
z
1
= z −
1.96
√
n − 3
= 1.539 − 6.198 = 0.9196
z
2
= z +
1.96
√
n − 3
= 1.539 + 6.198 = 2.1584
After back transformation of the above values, 95% confidence interval for
correlation coefficient of r is:
Lower limit =
e
2z
1
− 1
e
2z
1
+ 1
=
e
2
(
0.9196
)
− 1
e
2
(
0.9196
)
+ 1
=
5.2915
7.2915
= 0.726
Upper limit =
e
2z
2
− 1
e
2z
2
+ 1
=
e
2
(
2.1584
)
− 1
e
2
(
2,1584
)
+ 1
=
73.948
75.948
= 0.974
The both confidence limits suggest that there really is quite a strong association
between the two variables in the population.
12.2.3 The Significant Test of the Pearson Correlation
Coefficient
Tips
•
Two variables have a linear relationship if the data tends to cluster around a
straight line when plotted on a scatterplot.
•
Two variables have a positive correlation if large values of one variable are
associated with large values of the other and small values of one variable are
associated with small values of the other.
•
Two variables have a negative correlation if large values of one variable are
associated with small values of the other and if small values of one variable
are associated with large values of the other.
https://t.me/med1917
282 12 Correlation and Regression
As previously noted, the correlation coefficient ranges from −1to + 1. Values
close to −1or + 1 indicate a strong linear relationship between two variables,
while values close to 0 suggest a weak or non-existent linear relationship. Since r is
estimated from sample data and influenced by sample size, when r is not zero, two
scenarios arise: Either r is sufficiently high to infer a significant linear relationship
between the variables, or r is attributable to chance and sampling fluctuations.
The hypothesis test makes this decision (there is no association in the population:
ρ = 0) easy. The null and alternative hypotheses are:
H
0
: ρ = 0
H
A
: ρ /= 0
When there is a significant difference between the estimated values of r and 0,
then the null hypothesis must be rejected at a significant level
α.Ifthe valueof r is
not significantly different from 0 (zero) and is probably due to chance, then the null
hypothesis must not be rejected. The test statistics is:
t =
r
Se
(
r
)
= r
n − 2
1 − r
2
with df = n − 2
The test statistic should compare with two-tailed critical value from t distribution
table with degree of freedom (n−2).
Example 12.3 Test the significance of the correlation coefficient (r = 0.912) found
in Example 12.1 at significant level of 0.05.
Solution: The null and alternative hypotheses are:
H
0
: ρ = 0
H
A
: ρ /= 0
. Degree of freedom
is
df = n − 2 = 13 − 2 = 11 and critical value at 0.05 significant level is t
(
0.975,11
)
=
1.796
.
The test statistic is calculated as below:
t = r
n − 2
1 − R
2
= 0.912
13 − 2
1 − 0.912
2
= 7.374
Since test statistics is greater than the critical value (7.374 > 1.796) and fall in reject
region, we reject the null hypothesis and mean that there is a significant difference
with zero.
Example 12.4
Hemoglobin level (y) and age of women (x) in a random sample of
9 are as follows. In order to simplify the calculations, hemoglobin level values have
been rounded.
Obtain the correlation coefficient of hemoglobin level and women’s age and its
confidence interval.
https://t.me/med1917
12.2 Correlation 283
Solution: Let’s to denote age of women as x, hemoglobin level as y, and obviously
n = 9. Then a Table
12.3 can be made for the data calculations, as shown here
(Table
12.4).
Now we substitute values from the last row in the formula and estimate the
coefficient correlation of r.
ˆρ = r
xy
=
n
x.y −
x

y
n
x
2
−
x
2

n
y
2
−
y
2
=
9 × 4805 − 340 × 123
9 × 14044 −
(
340
)
2

9 × 1707 −
(
123
)
2
=
1425
1589.42
= 0.897
To carry out the significant test, the null and alternative hypotheses are:
H
0
: ρ = 0
H
A
: ρ /= 0
Degree of freedom is df = n −2 = 9−2 = 7 and critical value at 0.05 significant
level is
t
(
0.975,7
)
= 1.895.
Table 12.3 Hemoglobin level (y)andageofwomen(x) in a random sample
Sample 1 2 3 4 5 6 7 8 9
Age 20 25 28 35 38 40 45 54 55
Hemoglobin 11 12 14 12 13 14 15 16 16
Table 12.4 Necessary calculations for estimating correlation coefficient for data on Table 12.3
Sample Age (x) Hemoglobin (y) x
2
y
2
x.y
1 20 11 400 121 220
2 25 12 625 144 300
3 28 14 784 196 392
4 35 12 1225 144 420
5 38 13 1444 169 494
6 40 14 1600 196 560
7 45 15 2025 225 675
8 54 16 2916 256 864
9 55 16 3025 256 880
Sum
x = 340
y = 123
x
2
= 14044
y
2
= 1707
x.y = 4805
https://t.me/med1917
284 12 Correlation and Regression
The test statistic is calculated as below:
t = r
n − 2
1 − r
2
= 0.897
9 − 2
1 − 0.897
2
= 5.369
Since test statistics is greater than the critical value (5.369 > 1.895) and fall in reject
region, we reject the null hypothesis and mean that there is a significant difference
with zero.
To construct confidence interval, we first transform r = 0.897 as below:
z =
1
2
ln
1 + r
1 − r
=
1
2
ln
1 + 0.897
1 − 0.897
=
1
2
ln 18.4175 = 1.457
The standard error of z is:
S
z
=
1
√
n − 3
=
1
√
9 − 3
= 0.408
The 95% confidence interval for z is:
z
1
= z −
1.96
√
n − 3
= 1.457 − 0.800 = 0.657
z
2
= z +
1.96
√
n − 3
= 1.457 + 0.800 = 2.2572
After by back transformation of the above values, 95% confidence interval for
correlation coefficient of r is:
Lower limit =
e
2z
1
− 1
e
2z
1
+ 1
=
e
2
(
0.657
)
− 1
e
2
(
0.657
)
+ 1
=
2.721
4.721
= 0.5764
Upper limit =
e
2z
2
− 1
e
2z
2
+ 1
=
e
2
(
2.2572
)
− 1
e
2
(
2,2572
)
+ 1
=
90.3228
92.3228
= 0.978
Tips
It should be noted that when the sample size is too large, a weak correlation
may also be statistically significant. On the contrary, if the sample size is too
small, a strong and intense correlation may not be statistically significant.
However, the sample size is small, but its confidence interval suggests that
there really is quite a strong association between the two variables in the
population.
https://t.me/med1917
12.2 Correlation 285
12.2.4 Running Correlation Coefficient on SPSS
To calculate the Pearson correlation coefficient in SPSS, first select the
Analyze\Correlate\Bivariate path to open the following window.
In this window, we select the two variables we want to calculate their correlation
coefficient from the list on the left side and move to the Variables box. In the same
box, we mark Pearson. Then, the program runs with OK confirmation and the value
r can be seen in the correlations table.
For example, SPSS output for data of Example 12.4 is as:
Correlations
Hemoglobin Age
Hemoglobin Pearson correlation 1 0.897
**
Sig. (2-tailed) 0.001
N 9 9
Age Pearson correlation 0.897
**
1
Sig. (2-tailed) 0.001
N 9 9
**
. Correlation is significant at the 0.01 level (two-tailed)
https://t.me/med1917
286 12 Correlation and Regression
If one wishes to classify the strength of the relationship between two variables, for
absolute values of r, 0–0.19 is regarded as very weak, 0.2–0.39 as weak, 0.40–0.59
as moderate, 0.6–0.79 as strong and as very strong correlation, but these are rather
arbitrary limits, and the context of the results should be considered.
Val u e o f r Interpretation n
0–0.19 Very weak
0.2–0.39 Weak
0.40–0.59 Moderate
0.6–0.79 Strong
0.8–0.99 Very strong
1.0 Perfect
12.2.5 The Spearman Rank Correlation Coefficient
Spearman’s rank correlation coefficient, denoted as r
s
, provides a non-parametric
alternative to the Pearson correlation. It assesses the correlation between two
variables based on their ranks rather than their r aw values. Spearman’s correlation
is particularly useful when the assumptions underlying the Pearson correlation are
significantly violated, such as in cases with outliers or when the distributions of x
or y are not normal.
When the two variables (x and y) clearly increase or decrease together, but the
relationship is not necessarily linear, this is called a monotonic relationship
(Fig.
12.3). The dependence of height on age of children is an example of such a
relationship. This is not linear but definitely exists. Monotonicity is “less
restrictive” than that of a linear relationship. A monotonic relationship is not
strictly an assumption of Spearman’s correlation. But, if a scatterplot shows that the
relationship between your two variables looks monotonic, you would run a
Spearman’s correlation to measure the strength and direction of this monotonic
relationship.
https://t.me/med1917
12.2 Correlation 287
The Spearman correlation coefficient has simpler computations than those for
the Pearson correlation coefficient and involves ranking each set of data rather than
numeric values. The difference in ranks is obtained for any pairs of data (
d
i
= x
i
−y
i
)
and then
r
s
is estimated by equivalent formula for correlation which is given, except
using these differences instead of raw data.
r
S
= 1 −
6
n
i=1
d
2
i
n
n
2
− 1
If both datasets have the same ranks, r
s
will be + 1, and if two datasets are ranked
in exactly the opposite way,
r
s
will be −1 and r
s
= 0 indicates no relationship
between ranks of two datasets.
If two or more observations have the same value, it means that all of them should
be given the same rank. They are called “tied” and cause problems in calculations.
For this purpose, tied observations should be given average ranks as if there are no
tied observations in the dataset. For example, suppose the dataset of 7 figures (1,
1, 2, 4, 5, 5, 5). Usually they are expected to be given ordinal ranks 1, 2, 3, 4, 5,
6, 7. However, since the value 1 is repeated twice and both of them must have the
identical rank, we give the average of the two ordinal ranks to both equal values of 1.
Therefore, the fractional rank for both values of 1 is
1+2
2
= 1.5. The rank of values
2 and 4 is unchanged equal to 3 and 4. The rank of the last three values (5, 5, 5) will
be equal to the average ranks of 5, 6, and 7, i.e.,
5+6+7
3
= 6
. Thus the fractional
ranks are: 1.5, 1.5, 3, 4, 6, 6, 6.
Example 12.5
Table 12.5 shows the age, accommodation (ACC), and intraocular
pressure (IOP) and gender in a sample of 20 clients to an optometry clinic. Find t he
Spearman correlation coefficient for age and right intraocular (R.IOP) pressure in
women.
Solution: First we create two more columns (x
i
and y
i
) for the ranks of each variable
and create another column for their difference (
d
i
= x
i
− y
i
). Write the square of
differences (
d
2
I
) in the last column on the right and get the sum of this column
(Table 12.6)
Now by substituting the sum of the last column in t he corresponding formula, the
Spearman correlation coefficient is obtained.
r
S
= 1 −
6
d
2
i
n
n
2
− 1
= 1 −
6 × 101
10
10
2
− 1
= 1 − 0.612 = 0.388
https://t.me/med1917
288 12 Correlation and Regression
Table 12.5 Age, accommodation (ACC), intraocular pressure (IOP), and gender in a sample of 20
clients to an optometry clinic
Age Gender R. Acc L. Acc R.IOP L.IOP
6 M 15 16 12 10
8 M 14 14 15 14
29 M 11.5 12 8 9
30 M 9 10.5 18 17
34 M 7.5 8 14 14
37 M 5 6 15 16
38 M 6 6 18 20
38 M 5.5 6 9 9
43 M 2.5 2.5 17 20
43 M 3.5 4 16 15
16 F 10 10.5 15 12
20 F 9.5 10 10 11
22 F 12 11 16 16
22 F 11 9 13 13
26 F 10 10 22 20
28 F 10.5 11.5 12 14
34 F 6.5 6.5 12 13
35 F 8 8.5 13 13
40 F 5 6.5 18 19
58 F 0 0 25 23
Table 12.6 Calculations for Spearman correlation coefficient in Table
12.3
Age R.IOP Age rank R.IOP rank d
i
= x
i
− y
i
d
2
I
16 15 1 6 −5 25
20 10 2 1 1 1
22 16 3.5 7 −3.5 12.25
22 13 3.5 4.5 −1 1
26 22 5 9 −4 16
28 12 6 2.5 3.5 12.25
34 12 7 2.5 4.5 20.25
35 13 8 4.5 3.5 12.25
40 18 9 8 1 1
58 25 10 10 0 0
Sum 101
https://t.me/med1917