Photo by Luke Chesser on Unsplash
Learning Data Science without any prior experience - Part 6
Linear Regression
Intro
Hi Guys My name is Sunain and I have been working on a company in the climate tech space basically what I started as a newer form of carbon credits (a market-based tool to boost net-zero) is now a net-zero transitioning company. I have started learning data science to understand better the impact of emitted carbon dioxide in the atmosphere both environmentally and financially.
Continuing from where we left off (I hope you’ve read the previous article and are comfortable with notations of the book also please note that in this series I have copied most of the data as it is from the book because I think it’s relatively simple and only changed the stuff which was difficult for me to grasp).
I know we were going to discuss practicals in this article but I was busy today so let’s shift to this weekend.
Linear Regression
Simple Linear Regression
Simple linear regression lives up to its name: it is a very straightforward approach for predicting a quantitative response Y based on a single predictor variable X. It assumes that there is approximately a linear relationship between X and Y . Mathematically, we can write this linear relationship as
You might read “≈” as “is approximately modeled as”.
This equation will sometimes be described as by saying that we are regressing Y on X (or Y onto X).
For example, X may represent TV advertising and Y may represent sales. Then we can regress sales onto TV by fitting the model
β0 and β1 are two unknown constants that represent the intercept and slope terms in the linear model. Together they are known as the model coefficients and parameters
Once we have used our training data to produce estimates β0 and β1 for the model coefficients, we can predict future sales on the basis of a particular value of TV advertising
where ˆy indicates a prediction of Y on the basis of X = x. Here we use a hat symbol, ˆ , to denote the estimated value for an unknown parameter or coefficient, or to denote the predicted value of the response.
alright that’s it for today (I was busy)
I hope tomorrow we can cover a large extent of linear regression with some practicals.
until then,
Bye.