Understanding Regression using Real-life examples

Parag Sasturkar
3 min readFeb 13, 2023

--

PC: https://www.analyticsvidhya.com/blog/2021/05/5-regression-algorithms-you-should-know-introductory-guide/

Regression analysis is a type of machine learning algorithm that predicts a continuous outcome or dependent variable based on one or more predictor variables. This type of analysis is widely used in various fields such as finance, economics, marketing, and healthcare. In this blog, we will explore regression analysis in detail and learn how it works using real-life examples.

First, let’s start with the basics. Regression analysis involves finding the relationship between a dependent variable and one or more independent variables. The goal is to predict the value of the dependent variable based on the values of the independent variables. For example, consider a real estate company that wants to predict the selling price of a house based on its square footage, number of rooms, location, and age. In this case, the selling price of the house is the dependent variable, and the square footage, number of rooms, location, and age are the independent variables.

There are several types of regression analysis, including linear regression, logistic regression, and non-linear regression. The choice of regression type depends on the nature of the dependent variable and the independent variables. For example, if the dependent variable is continuous and the relationship between the dependent variable and the independent variables is linear, then linear regression is the best choice. On the other hand, if the dependent variable is categorical and the relationship between the dependent variable and the independent variables is non-linear, then logistic regression is the best choice.

One of the most commonly used regression analysis methods is linear regression. Linear regression assumes that there is a linear relationship between the dependent variable and the independent variables. The algorithm finds the best line that fits the data points and uses this line to make predictions. For example, consider a manufacturer that wants to predict the sales of its products based on advertising expenses. In this case, the sales are the dependent variable, and advertising expenses are the independent variable. The manufacturer can use linear regression to find the relationship between advertising expenses and sales and use this relationship to predict the sales for a given advertising expense.

Another example of regression analysis in real life is predicting stock prices. Stock prices are influenced by a variety of factors such as economic indicators, company performance, and investor sentiment. A financial analyst can use regression analysis to predict stock prices based on these factors. For example, the analyst can use linear regression to find the relationship between the stock price and economic indicators such as gross domestic product (GDP) and unemployment rate. The analyst can then use this relationship to predict the stock price for a given GDP and unemployment rate.

Regression analysis is also widely used in the healthcare industry. For example, doctors can use regression analysis to predict the probability of a patient developing a certain disease based on their demographic information, medical history, and lifestyle habits. In this case, the dependent variable is the probability of developing a disease, and the independent variables are demographic information, medical history, and lifestyle habits. The doctor can use logistic regression to find the relationship between the independent variables and the dependent variable and use this relationship to predict the probability of a patient developing a certain disease.

In conclusion, regression analysis is a powerful tool for predicting a continuous outcome based on one or more predictor variables. This type of analysis is widely used in various fields such as finance, economics, marketing, and healthcare. Linear regression is used when there is a linear relationship between the dependent variable and the independent variables, while logistic regression is used when the dependent variable is categorical and the relationship is non-linear. Regression analysis has a wide range of applications and can be used to solve real-life problems in various industries.

Thanks for reading! 😊 Feel free to clap 👏 or reply✍ if you have anything you would like to share. ️✌

If you like my content, follow me on — Medium & LinkedIn.

--

--

Parag Sasturkar

A data science professional; Passionate about driving business actions and Investing; A commitment to continuous learning; Writing is a new hobby!