【20221025】[Mathematics Foundation] The connection and difference between correlation and proportional relationship


    (For the complete pdf version of this article, please pay attention to the official account "Zhang Zhangxue Algorithm" and reply "221025" to receive it by yourself~)
 

1. Proportional relationship

​ The proportional relationship is divided into direct ratio and inverse ratio. Proportional and inversely proportional both mean that two variables are related to each other in a certain deterministic relationship, and when one quantity changes, the other quantity changes accordingly.

1.1 Proportional

​ The ratio of the two variables is constant , and the two quantities are said to be proportional, expressed in mathematical language as yx = k \frac{y}{x}=kxy=ky = kxy=kxy=k x , wherekkk is constant andk ≠ 0 k\neq 0k=0

​Note      : the shape is like y = 2 xy=2xy=2 xy = − 2 xy=-2xy=2 x are all proportional! That is to say,The ratio of two variables can be positive or negative, as long as the ratio is constant, it must be proportional.

1.2 Inversely proportional

​ The product of two variables is constant , and the two quantities are said to be inversely proportional, expressed in mathematical language as: xy = k xy=kxy=k y = k x y=\frac{k}{x} y=xk, where kkk is constant andk ≠ 0 k\neq 0k=0

​Note      : In the form of xy = 2 xy=2xy=2xy = − 2 xy=-2xy=2 is inversely proportional to each other! That is to say,The product of two variables can be positive or negative, as long as the product is constant, it must be inversely proportional.

2. Correlation

2.1 Definition

​ Correlation is a non-deterministic interdependence that exists in objective phenomena, that is, for each value of the independent variable, the dependent variable is affected by random factors, and the corresponding value is non-deterministic. There is no strict distinction between the independent variable and the dependent variable in a correlation, and they can be interchanged. A causal relationship must be a correlation, and vice versa.

​ The concept of correlation is common in probability statistics. The magnitude of correlation can be described by correlation coefficient. The commonly used correlation coefficient is Pearson correlation coefficient. The nature of correlation of random variables is determined by covariance. When cov ( X , Y ) > 0 cov(X,Y)>0co v ( X ,Y)>When 0 , X and Y are positively correlated; whencov ( X , Y ) < 0 cov(X,Y)<0co v ( X ,Y)<When 0 , X and Y are negatively correlated; whencov ( X , Y ) = 0 cov(X,Y)=0co v ( X ,Y)=When 0 , X and Y are uncorrelated.

2.2 Classification

Three, distinguish several groups of relationships

3.1 Distinguish between proportional and positive correlation

​Positive correlation is a concept, which is a variable relationship statistically calculated through a large amount of data: when one variable increases, the other variable also increases. Positive correlations can be linear or non-linear. For example, common positive correlation functions are: y = kx + b , y = x 2 , y = ax , y = logax ( a > 1 , x > 0 ) y=kx+b, y=x^2, y=a ^x, y=log_ax(a>1, x>0)y=kx+b,y=x2,y=ax,y=logax(a>1,x>0 ) etc. Andthe direct ratio is expressed as a straight line, and there is a specific linear relationship $y=kx $ (whichcan be expressed by exact mathematical formulas).

​ Proportionality is a special case of correlation. As shown in the figure below, both complete positive linear correlation and complete negative linear correlation are proportional. There is no necessary connection between proportional and positive correlation, and proportional variables are not necessarily positively correlated, only the proportional coefficient k > 0 k>0k>When 0 , the two variables are positively correlated; on the contrary, the positively correlated variables are not necessarily proportional, only whencov ( X , Y ) = 1 cov(X,Y)=1co v ( X ,Y)=1时, Y = k X + b Y=kX+b Y=kX+b andk > 0 k>0k>0 , the two variables are directly proportional. (Remember and distinguish definitions!

3.2 Distinguish between linear and nonlinear relationships

​ Linear relationship refers to the proportional and linear relationship between the independent variable and the dependent variable, which is represented as a regular, smooth, and equal motion on the graph, and is understood mathematically as a function whose first derivative is a constant . A linear equation, also known as a linear equation, refers to an equation whose independent variables are all linear . The general form is: y = a 0 x 0 + a 1 x 1 + a 2 x 2 + a 3 x 3 + . . . anxny=a_0x_0+a_1x_1 +a_2x_2+a_3x_3+...a_nx_ny=a0x0+a1x1+a2x2+a3x3+...anxn

​ Nonlinear relationship refers to the relationship between the independent variable and the dependent variable that is not proportional and not in a straight line, representing irregular movement, and the first derivative is not a constant . Compared with linear equations, nonlinear equations are equations containing higher-order terms , and they are equations whose first-order derivatives are not constant. A linear relationship is an independent relationship that is not related to each other, while a nonlinear relationship is an interactive relationship.

3.3 Difference between linear model and nonlinear model

From a mathematical understanding, whether the dependence of the dependent variable function on the independent variables is linear , whether the model equation can be expressed by a linear equation , or whether the partial derivatives of the dependent variable to all independent variables are constant;

From the understanding of the sample distribution, whether the relationship between the quantity and the quantity is linear in proportion , or whether the sample can be divided by a straight line;

It should be noted that linear models can fit samples with curves, but the decision boundary of classification must be a straight line, such as the logistic model.To distinguish whether it is a linear model or not, it mainly depends on whether the decision boundary is a straight line.

Guess you like

Origin blog.csdn.net/weixin_40583722/article/details/127520698