What is a Simple Linear Regression?
Regression analysis is a statistical technique used to show the relationship between two variables that estimate the value of the dependent variable Y based on the selected value of the independent variable X. Regression aims to determine the nature of the relationship, that is, the form of dependence between observed phenomena. We achieve this using a suitable regression model, which is the closest to the quantitative agreement of the variations of the observed phenomena. In simple regression analysis, we have one dependent and one independent variable.
Where is linear regression usually used?
An Example Of Simple Regression Analysis
For example, a researcher wants to examine whether stress level predicts test scores. Stress level is the independent variable, and exam score is the dependent variable.
What are the use of null and alternative hypothesis for the Simple Linear Regression?
Therefore, we test the following hypotheses:
Null hypothesis: The stress level does not significantly predict exam scores.
Alternative hypothesis: The stress level significantly predicts exam scores.
R function to Compute Simple Linear Regression
The code to run a Linear Regression using R is as follows:
lm (DV~ IV, data = dataframe)
DV: dependent variable
IV: Independent variable