Linear regression

What is regression analysis?

Linear regression is a methodology developed from statistics and econometrics. This method is used to evaluate the effects that other variables have on an analyzed variable.

The relationship starts from a variable of interest (dependent) with others that can influence it. For example: analyzing the sale of a product related to the growth of a country’s population.

With the results obtained, the linear regression visualizes the most important trends presented by the analyzed variables. The regression consists of statistically modeling the values ​​to be observed.

This regression is linear when the events observed in a scatter diagram indicate a trend in a straight line format, as in the following image

Regression analysis is most useful when presented in a scatterplot, widely used in economics, business administration, or also for country data.

When events are not combined linearly, they are known as nonlinear regression, and graphically, the trend appears in other formats.

Simple linear regression

Linear regression is simple when only two variables are analyzed, generally X and Y, one of which is dependent (Y) and will be the function of another that behaves independently (X).

Simple linear regression is analyzed using the formula:

  • Y =  α  +  β  X

Where: “α” is the linear coefficient and “β” is the slope or the regression coefficient.

This calculation can only be done if there is a linear relationship between X and Y and they contain the same number of related elements.

In cases where there are more than two variables, it is called  multiple linear regression  and the visual demonstration of a graph becomes more complex.

A well-known example in linear regression economics is Okun’s Law, which negatively relates a country’s GDP growth to its unemployment rates.