1.4.3 The least square method used for the linear ...

更新于 2026年10月10日 版权声明
1.4.3 The least square method used for the linear regression method

The least square method is the most accurate one in a series of approximate calculations,by which the best value can be determined from a group of measured values with the same accuracy.Take the linear equation as an example:the slope m and intercept b can be obtained once the line equation is determined.So linear regression(linear fitting)is the process of determining the size of m and b from the experimental data set(xi,yi).

According to the least square method principle,if the best fitted linear equation is Y=f(x),the sums of squares of the deviation values between measured values yi and corresponding values on the fitted line is the minimum,i.e.

图示

In order to simplify the question,it is supposed that every measured value xi is of equal accuracy,and only yi is accompanied by obviously measured accidental error.Substitute the linear equation into Equation(1.4.1),we may get the following formula:

图示

So m and b should be solutions to the following equations:

图示

i.e.

图示

Solve Equation(1.4.4)to obtain:

图示

Where

图示

图示(https://www.daowen.com)

In order to examine the linear fitting,the correlation coefficient is defined as follows:

图示

It can be proved that the absolute value of r always lays between 0 and 1.The closer the absolute value approaches 1,the better the linear relationship between x and y is.

Example 1.4.1

Data is shown in Table 1.4.2.

Table 1.4.2 Measuring results for surface tension coefficient of water α acquired at different temperatures

图示

Suppose the primary function form α=mT+b,where T stands for the thermodynamic temperature.Evaluate m and b by ordinary least squares.Firstly,work the following quantities out:

图示

Then,m and b can be evaluated through Equation(1.4.5)and Equation(1.4.6),i.e.

图示

Finally,the analytic equation for relationship between surface tension coefficient α and temperature T can be concluded as α=-(0.16T+119.6)×103 N/m.

For exponential function,logarithmic function and power function,we can obtain the linear relationship by the variable substitution,which is suitable for least square fitting.

We can also use a computer to perform the linear regression,directly solving the experimental equation and obtaining the relevant parameters and their errors.This approach is now viable due to the popularization of computers.

↑上一章 ↓下一章
关注公众号获取验证码
复制内容需要验证码(7.99元/天)