DEV Community

Cover image for "Day 44 of My Learning Journey: Setting Sail into Data Excellence! Today's Focus: Mathematics for Data Analysis (Stats Day -22)
Nitin-bhatt46
Nitin-bhatt46

Posted on

"Day 44 of My Learning Journey: Setting Sail into Data Excellence! Today's Focus: Mathematics for Data Analysis (Stats Day -22)

STATISTICS FOR DATA ANALYTICS - 22

Regression Analysis

What is Regression analysis ?

It is a tool to investigate how two or more variables are related.

X is a predictor value or explanatory variable. ( independent variable )
Y is a response variable ( dependent variable )

Based on the number of independent variables, regression is of 2 type.

Simple Linear Regression
Multiple Linear Regression.

Simple Linear Regression :-

There is one independent and another one dependent value.

When and why to use Simple Linear Regression ?

The relationship between two quantitative variables.How strong the relationship is between two variables.
The value of the dependent variables(x) at a certain value of the independent variable (y).

Simple linear regression explains the relationship between a dependent variable and independent variable using a straight line.

y= mx + c

M = slope
C = at which part of y the line cuts.

Slope

Slope ( + ) = there is a positive linear relationship, i.e., as one increases, the other increases.

Slope ( - ) = there is a negative linear relationship, i.e., as one increases, the other variable decreases.

Linear regression finds the line which fits best through your data, which we call Best Fit Line.

Residuals is the error between a predicted value and the observed actual value.

How to find the best fit line ?
Using Ordinary Least Squares ( OLS ) Method.

Different Assumption

There is a linear relationship between x and y
Residuals/Error terms are normally distributed with mean zero(not X,Y )
Error terms are independent of each other.
Error terms have constant variance ( homoscedasticity )
Feel free to share this post to enhance awareness and understanding of these fundamental concepts in statistical analysis!

🙏 Thank you all for your time and support! 🙏
Don't forget to catch me daily at 6:30 Pm (Monday to Friday)for the latest updates on my programming journey! Let's continue to learn, grow, and inspire together! 💻✨

Top comments (0)