It is known that the processes occurring in plants and in living organisms are caused by the influence of a large number of interrelated factors, among which there are the main ones that determine the main properties and characteristics of a process or phenomenon, and secondary ones.
How to find in the form of a formula the relationship between two random variables obtained in the results of observations? How much does a change in one quantity affect a change in another ?
The least squares method has a strict mathematical justification, therefore, the results of calculations obtained with its help are considered to be closer to the exact value of unknown parameters a and b.
The variables X and Y can be related to:
a) functional dependence;
b) statistical dependence, in the particular case of correlation.
The dependence is called correlation if each possible value of one quantity is compared with a numerical characteristic corresponding to the distribution of the other.
A table with two inputs, in which the results of observations are recorded in ascending order indicating the frequency of pairs of features, is called correlation.
According to the correlation table, it is possible to construct empirical regression lines X on Y and Y on X. The leveling "smooth" curve is called the theoretical regression line. The simplest is linear. The strength or tightness of the linear correlation dependence is determined by the sample correlation coefficient:
If , then the studied relationship between the quantities is linearly dependent. If r=0, then there is no linear correlation between X and Y, i.e. signs of independence.
Example. The dependence of the ear length X (in cm) on the number of grains in the ear Y (pieces) is characterized by the following table:
| xi, length,cm | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| yi, the number of grains in an ear | 16,0 | 20,3 | 23,5 | 24,5 | 28,0 | 29,0 | 29,5 | 31,0 |
a) show that the corrediation is linear;
b) using the least squares method to find the linear relationship between X and Y;
c) find a sample correlation coefficient.
Solution: Construct points M(xi,yi) in the xOy coordinate system

The figure shows that the points are located along a straight line. To determine the coefficients a and b, we will make an auxiliary table.
| № | xi , length, | yi, the number of grains | ||
| 1 | 7 | 16 | 49 | 112 |
| 2 | 8 | 20,3 | 64 | 162,4 |
| 3 | 9 | 23,5 | 81 | 211,5 |
| 4 | 10 | 24,5 | 100 | 245 |
| 5 | 11 | 28,0 | 121 | 308 |
| 6 | 12 | 29,0 | 144 | 348 |
| 7 | 13 | 29,5 | 169 | 383,5 |
| 8 | 14 | 31,0 | 196 | 434 |
The system of equations has the form:
from where we find: and
Let's now determine the sample correlation coefficient. We find the average value of the samples:
Let's make an auxiliary table.
| № | xi | yi | |||||
| 1 | 7 | 16 | -3,5 | -9,2 | 32,2 | 12,25 | 84,64 |
| 2 | 8 | 20,3 | -2,5 | -4,9 | 12,25 | 6,25 | 24,01 |
| 3 | 9 | 23,5 | -1,5 | -1,7 | 2,55 | 2,25 | 2,89 |
| 4 | 10 | 24,5 | -0,5 | -0,7 | 0,35 | 0,25 | 0,49 |
| 5 | 11 | 28 | 0,5 | 2,8 | 1,4 | 0,25 | 7,84 |
| 6 | 12 | 29 | 1,5 | 3,8 | 5,7 | 2,25 | 14,44 |
| 7 | 13 | 29,5 | 2,5 | 4,3 | 10,75 | 6,25 | 18,49 |
| 8 | 14 | 31 | 3,5 | 5,8 | 20,3 | 12,25 | 33,64 |
| 9 | |||||||
We have
The correlation coefficient is close to one, but the relationship between the values of X and Y is linearly dependent.
