How to Calculate ANOVA Table Manually in Simple Linear Regression

In simple linear regression, the calculation of the Analysis of variance (ANOVA) table is important for researchers to understand. ANOVA table can be used to determine how the influence of the independent variable on the dependent variable simultaneously.

This article continues the previous article that I have written with the title “Calculate Coefficients bo, b1, and R Squared Manually in Simple Linear Regression

In a previous article, I have written a tutorial on manually calculating the coefficients of b0, b1, and R Square in simple linear regression using Excel. If you haven’t read my previous article, please read the article first.

Regression ANOVA Table Components

The ANOVA regression table generally calculates the sum of squares, degree of freedom, mean square, and F value. Calculating the value of the components I have mentioned is interrelated. Therefore, the calculation of these components must be done sequentially.

In the ANOVA table, the regression consists of two rows, namely regression/model as row 1 and residual/error as row 2. Researchers are required to calculate the sum of squares, degrees of freedom, and mean square of each regression row and residual row in the ANOVA table.

The writing of residuals and errors is different depending on the data used. To distinguish them is quite easy. Researchers can distinguish them based on the existing data sources used in the study. If the researcher uses sample data, it is called residual, while if the researcher uses population data, it is called error. An example of a regression ANOVA table can be seen in the image below:

How to calculate the sum of square

To calculate the sum of squares, researchers must understand the calculation method that I wrote earlier in the article entitled: “Calculate Coefficients bo, b1, and R Squared Manually in Simple Linear Regression

The regression coefficient estimation must be calculated first if we will calculate the sum of squares. The estimated regression coefficient is used to calculate the predicted Y value.

Therefore, the researcher must first calculate the predicted Y value based on the previously calculated coefficients b0 and b1. To make it easier to calculate, the data we use can be rechecked in the table below:

In addition, the researcher also made sure to have calculated the actual average Y value. The formula used to calculate the sum of square value based on the book written by Koutsoyiannis (1977) can be seen in the image below:

Based on the above formula, researchers need to calculate the sum of square regression and the sum of square residual values. To make it easier, we can create a template for the components required for the calculation formula, as shown in the table below:

The first calculation step is to calculate the predicted Y value using the estimated coefficient values b0 and b1 based on the calculations I wrote in the previous article. Based on the previous calculation results, the formula used to calculate the predicted Y value can be seen in the image below:

The next step is to input each X value from 2010 to 2019 to get the predicted Y value. If we use Excel, we can make the formula easily, as shown in the image below:

Next, do the following calculations with the formula template in Excel. Then we can copy and paste the formula up to the year 2019, so that the predicted Y value will be obtained. The complete calculation results can be seen in the image below:

Based on the picture above, it can be seen that the sum of squares regression value is 288.07, and the sum of squares residual value is 52.83. To calculate the total sum of squares, you only need to add the sum of square regression and square residual values.

How to calculate the degree of freedom

The degree of freedom is the next component calculated after calculating the sum of squares. The degree of freedom also consists of the degree of freedom regression and the degree of freedom residual. The formula used to calculate the degree of freedom based on the book written by Koutsoyiannis (1977) can be seen in the image below:

Based on the above formula, K indicates the number of variables used in the regression. Because the regression equation used in this research example is simple linear regression, the value of K = 2.

The value of K = 2 means that it consists of one dependent variable and one independent variable. Furthermore, n is the number of observations used in the study. The example in this mini-research uses n = 10. The results of the calculation of the degree of freedom value can be seen in the table below:

How to calculate Mean Square and F Value

The sum of squares and the degree of freedom are used to calculate the mean square and F value. In the Anova regression table to calculate the mean square and F value, you can use the formula as written by Koutsoyiannis (1977) as follows:

Based on the results of calculations using the above formula, the final results obtained from the ANOVA regression table can be seen in the image below:

That’s the tutorial on calculating the ANOVA regression table that I can write manually. Hopefully useful for all of you! Thank you.

Leave a Comment