Linear regression is modeled in order to see how unemployment is affected by CPI and fuel prices. Linear regression aims to model the relationship between two variables by fitting a linear equation to observed data. One variable is considered to be an explanatory variable and the other is considered to be a dependent variable. Before attempting to fit a linear model to observed data we examine the data with scatter plot in order to determine whether or not there is a relationship between the variables of interest. Scatter plot showed us that there is no correlation between CPI and the fuel price which is mentioned in the previous section of the report. Study is continued by finding the linear equation which is stated in the below figure.
Coefficient of the features and the interception point for the equation are also calculated.
Calculated coefficients are negative. It shows that for every additional count in CPI we can expect unemployment to decrease by an average of 0.0152 whereas for every additional count in fuel price we can expect unemployment to decrease by an average of 0.3385. As a result, linear regression score is calculates as 0.10136. This value is really close to zero. Therefore, we can conclude that unemployment is not affected by CPI and fuel prices.