The least squares regression line is a statistical tool used to model the relationship between two variables. We can use this estimated regression equation to calculate the expected exam score for a student, based on the number of hours they study.įor example, a student who studies for three hours is expected to receive an exam score of 82.91:Įxam score = 67.16 + 5.2503*(3) = 82.Related Articles What Is Least Squares Regression Line? W e interpret the coefficient for the intercept to mean that the expected exam score for a student who studies zero hours is 67.16. We interpret the coefficient for hours to mean that for each additional hour studied, the exam score is expected to increase by 5.2503, on average. In this example the estimated regression equation is: In this case the p-value is less than 0.05, which indicates that there is a statistically significant association between hours studied and exam score received.Ĭoefficients: The coefficients give us the numbers necessary to write the estimated regression equation. In other words, it tells us if the explanatory variable has a statistically significant association with the response variable. It tells us whether or not the regression model is statistically significant. This is the p-value associated with the overall F statistic.
This is the overall F statistic for the regression model, calculated as regression MS / residual MS. In this example, the observed values fall an average of 5.2805 units from the regression line.į: 47.9952. This is the average distance that the observed values fall from the regression line. In this example, 72.73% of the variation in the exam scores can be explained by the number of hours studied. It is the proportion of the variance in the response variable that can be explained by the explanatory variable. This is known as the coefficient of determination. Here is how to interpret the most relevant numbers in the output: The following output will automatically appear: For Input X Range, fill in the array of values for the explanatory variable.Ĭheck the box next to Labels so Excel knows that we included the variable names in the input ranges.įor Output Range, select a cell where you would like the output of the regression to appear. Select Regression and click OK.įor Input Y Range, fill in the array of values for the response variable.
Once you click on Data Analysis, a new window will pop up. Step 3: Perform simple linear regression.Īlong the top ribbon in Excel, go to the Data tab and click on Data Analysis. If you don’t see this option, then you need to first install the free Analysis ToolPak.
To quantify the relationship between these two variables, we can perform simple linear regression. We can see that there is a linear relationship between the two variables – more hours studied is associated with higher exam scores. The number of hours studied is shown on the x-axis and the exam scores are shown on the y-axis. This will automatically produce the following scatterplot: Within the Charts group, click Insert Scatter (X, Y) and click on the first option titled Scatter. Along the top ribbon in Excel go to the Insert tab. Perform the following steps in Excel to conduct a simple linear regression.Įnter the following data for the number of hours studied and the exam score received for 20 students:īefore we perform simple linear regression, it’s helpful to create a scatterplot of the data to make sure there actually exists a linear relationship between hours studied and exam score. To explore this relationship, we can perform simple linear regression using hours studied as an explanatory variable and exam score as a response variable. Suppose we are interested in understanding the relationship between the number of hours a student studies for an exam and the exam score they receive. Example: Simple Linear Regression in Excel
This tutorial explains how to perform simple linear regression in Excel. Simple linear regression is a method we can use to understand the relationship between an explanatory variable, x, and a response variable, y.