The purpose of regression analysis:
1. Forecast-Forecast the future trend.
2. Factor analysis-study which factor is the most influential factor.
What is unary linear regression?
In regression analysis, there is only one independent variable and one dependent variable, and the relationship between them can be approximately expressed by a straight line. This regression analysis is called univariate linear regression analysis.
For example:
As shown in the figure, there is a company whose monthly advertising expenses and output sales are shown in the figure below. Draw the data on the quadrant to get the scatter plot, and use excel to fit the straight line.
How to evaluate the fitting degree of the regression line;
The drawn fitting straight line is only an approximation, because many points will definitely not fall on the straight line. The square of r, also known as the judgment coefficient, is used to judge the fitting degree of the regression equation.
The square of r is between 0- 1, and the closer to 1, the higher the fitting degree and the better the data correlation.
Description of correlation coefficient:
When R= 1, it means that X and Y are perfectly positively correlated, that is, all sample points (X, Y) can be strung together by a straight line with a positive slope;
When R=- 1, it shows that there is a complete negative correlation, and all points can be strung together by a straight line with negative slope;
EXCEL operation method
Enter two columns of values, check the values in the box, and choose to make a chart-choose a scatter chart, click on the points in the chart, right-click to add fitting line drawing, and you can also add the sum of squares and slope of R;