Simple linear regression is a statistical approach that allows us to study and summarize the relationship between two continuous quantitative variables.

Out of the two variables, one variable is called **the dependent variable**, and the other variable is called the **independent variable**. Our goal is to predict the dependent variable’s value based on the value of the independent variable. A simple linear regression aims to find the best relationship between X (independent variable) and Y (dependent variable).

There are three types of relationships. The kind of relationship where we can predict the output variable using its function is called a **deterministic relationship**. In **random relationships**, there are no relationships between the variables. In our statistical world, it is not likely to have a deterministic relationship. In statistics, we generally have a relationship that is not so perfect, that is called a **statistical relationship**, which is a mixture of deterministic and random relationships.

**1. Deterministic Relationship:**

a. Diameter = 2*pi*radius

b. Fahrenheit = 1.8*celsius+32

**2. Statistical Relationship:**

a. Number of chocolates vs. cost

b. Income vs. expenditure

## What Actually is Simple Linear Regression?

It can be described as a method of statistical analysis that can be used to study the relationship between two quantitative variables. Primarily, there are two things which can be found out by using the method of simple linear regression:

**Strength of the relationship between the given duo of variables.**(For example, the relationship between global warming and the melting of glaciers)**How much the value of the dependent variable is at a given value of the independent variable.**(For example, the amount of melting of a glacier at a certain level of global warming or temperature)

Regression models are used for the elaborated explanation of the relationship between two given variables. There are certain types of regression models like logistic regression models, nonlinear regression models, and linear regression models. The linear regression model fits a straight line into the summarized data to establish the relationship between two variables.

## Assumptions of Linear Regression

To conduct a simple linear regression, one has to make certain assumptions about the data. This is because it is a parametric test. The assumptions used while performing a simple linear regression are as follows:

One of the main predictions in a simple linear regression method is that the size of the error stays constant. This simply means that in the value of the independent variable, the error size never changes significantly.**Homogeneity of variance (homoscedasticity)-**All the relationships between the observations are transparent, which means that nothing is hidden, and only valid sampling methods are used during the collection of data.**Independence of observations-**There is a normal rate of flow in the data. These three are the assumptions of regression methods. However, there is one additional assumption that has to be taken into consideration while specifically conducting a linear regression.**Normality-**There is no curve or grouping factor during the conduction of a linear regression. There is a linear relationship between the variables (dependent variable and independent variable). If the data fails the assumptions of homoscedasticity or normality, a nonparametric test might be used.**The line is always a straight line**-

Example of data that fails to meet the assumptions: One may think that cured meat consumption and the incidence of colorectal cancer in the U.S have a linear relationship. But later on, it comes to the knowledge that there is a very high range difference between the collection of data of both the variables. Since the homoscedasticity assumption is being violated here, there can be no linear regression test. However, a Spearman rank test can be performed to know about the relationship between the given variables.

## Applications of Simple Linear Regression

Here marks scored in exams are independent and the number of hours studied is independent.__Marks scored by students based on number of hours studied (ideally)-__Yield is a dependent variable while the measure of precipitation is an independent variable.__Predicting crop yields based on the amount of rainfall-__Therefore, Experience becomes the independent while Salary turns into the dependent variable.__Predicting the Salary of a person based on years of experience-__

## Limitations of Simple Linear Regression

Indeed, even the best information doesn't recount a total story. Regression investigation is ordinarily utilized in examination to set up that a relationship exists between variables. However, correlation isn't equivalent to causation: a connection between two variables doesn't mean one causes the other to occur. Indeed, even a line in a simple linear regression that fits the information focuses well may not ensure a circumstances and logical results relationship.

Utilizing a linear regression model will permit you to find whether a connection between variables exists by any means. To see precisely what that relationship is and whether one variable causes another, you will require extra examination and statistical analysis.** **