Current location - Training Enrollment Network - Mathematics courses - How to find kb by least square method
How to find kb by least square method
Find kb by least square method: a = y (average) -b * x (average).

The least square formula is a mathematical formula, which is mathematically called curve fitting. The least square method mentioned here refers to the linear regression equation! The least square formula is a=y (average) -b*x (average).

x=[x 1,x2,x3,xn].

y=[y 1,y2,y3,yn].

p=polyfit(x,y,n).

Then the calculated matrix p is the coefficient from the highest bit to the lowest price from left to right.

Least square estimator

According to the sample data, the estimator of parameters of simple linear regression model can be obtained by using the least square estimation formula. However, how close the parameters of the estimator are to the real parameters of the population, and whether there are better other estimators, which involves the least square estimator or the minimum variance (or Best), the linearity and unbiased of the estimator, which is referred to as BLU characteristics.