Please enable JavaScript.
Coggle requires JavaScript to display documents.
Linear regression - Coggle Diagram
Linear regression
What is is?
A statistical model
Shows a realtionship between variables
Aims to fit a line in order to represent the data
Types
Simple linear regression
Involves 1 independent variable
Multiple linear regression
Involves 2 or more independent variables
Proven by mathematics
Linear equation formula: y = mx + b + e
B represents the y intercept of the graph
E represents the error, how far the
predicted Y is from the actual Y
M represents the slope of the line
X and Y represent the independent and dependent variables respectively
Fitting the line using the least squares method
Residual sum of squares = sum (Yobserved - Ypredicted) ^2
Adjust M and B to minimize the residual sum
Goodness of the fit
How well the model works
R squared
Proportion of variance in Y (0-1)
= 1 - (RSS/TSS)
TSS is the total sum of square
How does it work?
Key parts
Independent variable
On the x axis
Variable is used to explain the dependant variable
Line of best fit
A straight line that best follows the relationship of the graph
Minimizes residuals
Dependant variable
On Y axis
Variable you are trying to explain