

The slope measures the change in height with respect to the age in months. Newborn babies with zero months are not zero centimeters necessarily this is the function of the intercept. With the same example, “a” or the intercept, is the value from where you start measuring. In this case, “a” and “b” are called the intercept and the slope, respectively. In this particular example, you can calculate the height of a child if you know her age: In the previous example of the child's age, it is clear that there is a relationship between the age of children and their height. This means that you can fit a line between the two (or more variables). In this case, linear regression assumes that there exists a linear relationship between the response variable and the explanatory variables. Not every problem can be solved with the same algorithm. In this linear regression tutorial, we will explore how to create a linear regression in R, looking at the steps you'll need to take with an example you can work through.

It’s even predicted it will still be used in the year 2118! Even though it is not as sophisticated as other algorithms like artificial neural networks or random forests, according to a survey made by KD Nuggets, regression was the algorithm most used by data scientists in 20. It’s simple, and it has survived for hundreds of years. This is precisely what makes linear regression so popular. Linear regression is one of the most basic statistical models out there, its results can be interpreted by almost everyone, and it has been around since the 19th century. You make this kind of relationship in your head all the time, for example, when you calculate the age of a child based on their height, you are assuming the older they are, the taller they will be. A linear regression is a statistical model that analyzes the relationship between a response variable (often called y) and one or more variables and their interactions (often called x or explanatory variables).
