Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Example of practical work 3:

1. Rewrite the task (work plan):


I. Exploring the relationship between quantitative variables. Functional and
correlation: concepts.
II. Strength and direction of communication.
III. Types of correlation coefficients.
IV. Pearson linear correlation coefficient, its estimation, characteristic.
V. Regression analysis, regression coefficients, regression equation. Using
regression analysis to predict.

2. For each task, outline theoretical material and, if necessary, perform


calculations:
I. Correlation dependency is called such a statistical dependence between random
variables when changing one of the variables, for example (X), results in a change
in the mathematical expectation of the other variable (B). Unlike functional
dependency, each value of one random variable can be matched by several values
of another. Correlation analysis evaluates such a relationship by using a linear
correlation coefficient.
II. The correlation coefficient determines the direction and strength of the
correlation:

A) if
r xy >0 the correlation is straight,

      if
r xy <0 the correlation is feedback,

      if
r xy=0 there is no correlation link,

      if
r xy=±1 the connection is functional;

B) if
|r xy|>0,7 the connection is strong,

      if
|r xy|<0,3 the connection is weak,
      in other cases communication is average.
III. The Pearson correlation coefficient is calculated for quantitative data that is
distributed according to the normal distribution law. Kendall, Spearman, and
gamma correlation coefficients are used for data whose distribution differs from
normal, ordinal, and qualitative data. Association coefficients and contingencies
are used for qualitative nominal data.
IV. Pearson correlation coefficient is calculated by the formula:
XY − X⋅Y
r xy=
σ x⋅σ y
,

σ 2 =X 2 −( X )2 σ 2 =Y 2 −(Y )2
де x , y .

CORRELATION ANALYSIS ALGORITHM


We build a correlation field and evaluate qualitatively the presence or absence of
communication, its nature and orientation.

Variant 15

X 3 5 7 9 11 13
У 16 20 21 22 25 27

Constructed correlation field:


30

25

20

15

10

0
2 4 6 8 10 12 14

Based on the correlation field, you can hypothesize that there is a direct
connection.

We calculate the Pearson linear correlation coefficient.


To calculate the correlation coefficient, fill in the table:

48
3 5 7 9 11 13 48 X= =8
X 6
131
16 20 21 22 25 27 131 Y= =21 ,83
Y 6
454
Х2 454 X 2= =76 ,67
9 25 49 81 121 169 6
2935
Y2 2935 Y 2= =489 ,17
256 400 441 484 625 729 6
1119
XY XY = =186 , 5
48 100 147 198 275 351 1119 6

2
σ =X −( X )2 =76 , 67−64=12 ,67
x2

σ x =√ 12 , 67=3 ,56
2
σ =Y −( Y )2= 489 ,17− 476 ,55=12 ,62
y2

σ y= √12 , 62=3 , 55
XY − X⋅Y 186 , 6−8⋅21 , 83 11 ,96
r xy= = = =0 , 946
σ x⋅σ y 3 ,56⋅3 ,55 12 , 64
In Excel, the result is:

The discrepancy of results is explained by the low accuracy of manual calculations


(performed rounding)
Conclusion: the link is strong.
Using the Student's t test, we estimate the statistical significance of the correlation
coefficient.

The null hypothesis


H0 states: "the correlation coefficient is not significant, it is
0 in the population, there is no correlation."

Alternative hypothesis
H1 : "correlation coefficient statistically significant for
the population").

r xy √ n−2 0 , 946⋅√ 4 1 ,88


t exp= = = =5,8
√1−r xy2 √1−0 , 895 0 ,324

V. Analytically, the relation between the random variables X and Y can be


described by the regression line equations. Regression lines can be defined by
straight or more complex lines (straight or curved regressions) in form.

Linear regression equation Y to X:;


y=ρ yx x +b

Linear regression equation X on Y:


x=ρ xy y+d
XY −X⋅Y X 2⋅Y −X⋅XY
ρ yx = b=
σ 2 σ 2
x , x .

XY − X⋅Y Y 2⋅X−Y⋅XY
ρ xy = d=
σ 2 σ 2
y , y

In the graph, the regression lines intersect at the point with the coordinates:

XY −X⋅Y 186 ,5−8⋅21 , 83 11, 86


ρ yx = = = =0 , 936
σ 2 12, 67 12 ,67
x
X 2⋅Y −X⋅XY 76 ,67⋅21 , 83−8⋅186 ,5 181 ,7
b= = = =14 , 34
σ 2 12, 67 12 , 67
x
y=ρ yx x+b=0 , 936 х +14 , 34
XY − X⋅Y 11, 86
ρ xy = = =0 , 940
σ 2 12 ,62
y
2
Y ⋅X−Y⋅XY 489 , 17⋅8−21 , 83⋅186 , 5 −157 , 9
d= = = =−12, 51
σ 2 12 ,62 12, 62
y
x=ρ xy y+d=0 , 94 y−12, 51

We plot the regression lines on the correlation field and see that the angle between
them is very small, indicating a close relationship between the variables ::

You might also like