What is Linear Regression
Linear regression is a statistical method which models the linear relationship between a dependent variable and one or more dependent variable. It finds the best-fitting straight line through a set of data points.
purpose of Linear regression
The purpose of linear regression is to predict continuous values, understand the relationship between variable and make inference about data. it also measures the strength of relationships.
There are two types of linear regression, one is Simple Linear Regression and the other is Multiple Linear Regression.
Simple vs Multiple Linear Regression
- Simple Linear Regression: One independent variable (X) predicting one dependent variable(Y) 2.Multiple Linear Regression: Multiple Independent variable predicts one dependent variable
Below is the Linear Regression Equation.
Y = β₀ + β₁X + ε
where Y is the dependent variable that we are predicting. X is the independent Variable, β₀ is the y intercept, which is the Y axis when X is zero, β₁ is the slope and ε is the error term which is the unexplained variation.
Core Concepts
Linear Regression does not prove Causation it shows correlation. Residuals are the difference between actual values and predicted values. The goal is always minimize the sum of squared residuals.
Least Squares Method is the standard approach to find the best fitting line. It minimizes the sum of squared residuals and provides the line closest to all data points.
Evaluation metrics
R-squared (R²) is a coefficient of Determination ranging from 0 to 1. It is the percentage of variance in Y explained by X.
Root Mean Squared Error (RMSE) measures the average prediction error. The lower values indicate better fit. It is Useful for comparing models.
Top comments (0)