DEV Community

Cover image for Becoming a Data Analyst: My Linear Regression Story
Sharon Otieno
Sharon Otieno

Posted on

Becoming a Data Analyst: My Linear Regression Story

Transitioning from environmental science into the world of data and machine learning has undoubtedly been a challenging journey. This is especially because I have always been intimidated by the complexities of mathematical models. But despite all these, I have gradually learned the importance of breaking down concepts and ultimately using them to uncover patterns and make predictions.

Linear Regression

A core area of machine learning is linear regression. It basically entails modeling the relationship between variables to predict an outcome. asay, for instance, you wanted to predict house prices based on the number of rooms each room has. Normally, a house's price increases as the size of the house increases. Therefore, by plotting the relationship between the square footage and price of the house, linear regression helps you find a line that estimates how the prices rise due to additional square meters.

Use Cases

While I initially found it challenging to grasp these ideas, over time, I learned just how strongly variables influence the prediction outcome. Consider these cases:

  1. Estimating salary based on years of experience.
  2. Predicting water demand based on population growth.
  3. Predicting academic performance from attendance rates.

The Modelling Process

  • In each scenario, you first have to define your features and the target variable. In the water/population growth example, the target variable (y) is water demand, while the independent variable (x) is the population size.

  • Our assumption is that as the population increases, water's demand also rises.

  • We would then visualize the relationship, train a linear regression model, interpret coefficients, and use the insights acquired to predict future water demand based on the projected population growth.

  • Ultimately, we would evaluate how effective and accurate the model is in providing valuable recommendations.

Final Words

Overall, my journey with linear regression has made me realize that despite one's anxiety, one can use mathematical tools to unlock insights, guide real-world decisions, and engage in data-driven processes.

Top comments (0)