KANDA DATA

  • Home
  • About Us
  • Contact
  • Sitemap
  • Privacy Policy
  • Disclaimer
  • Bimbingan Online Kanda Data
Menu
  • Home
  • About Us
  • Contact
  • Sitemap
  • Privacy Policy
  • Disclaimer
  • Bimbingan Online Kanda Data
Home/Assumptions of Linear Regression/How to Test Linearity Assumption in Linear Regression using Scatter Plot

Blog

8,823 views

How to Test Linearity Assumption in Linear Regression using Scatter Plot

By Kanda Data / Date May 24.2022
Assumptions of Linear Regression

The linearity test is one of the assumption tests in linear regression using the ordinary least square (OLS) method. The objective of the linearity test is to determine whether the distribution of the data of the dependent variable and the independent variable forms a linear line pattern or not?

The linearity assumption must be fulfilled because the regression used is linear regression. In the linearity assumption test in linear regression, you test the distribution of the data between the dependent variable and the independent variable.

On this occasion, Kanda Data will discuss testing linearity in linear regression using a scatter plot graph. I will use an example of a mini-research case to test its linearity.

Linearity Test on Linear Regression using Mini Research

The objective of our mini-research is to determine the effect of income and population on rice consumption. In the mini-research, income and population were used as independent variables. Rice consumption is used as the dependent variable.

The data we use for exercise can be seen in the table below:

How to test for linearity using scatter plot in STATA

In STATA, you will find several icons. Then you select the table icon with a pencil drawing. In the next step, you input all the data I have conveyed above. Data from the rice consumption variable (Y) is inputted in the first column, then data from the income (X1) and population (X2) variables are entered in the 2nd column and 3rd column.

To test linearity in linear regression, I will use a scatter plot graph. In creating a scatter plot graph between rice consumption (Y) and income (X1), you type in the command in STATA as follows:

twoway (scatter Y X1)

Next, you can press enter, and the scatter plot results of the linearity test between rice consumption (Y) and income (X1) can be seen below:

In creating a scatter plot graph between rice consumption (Y) and population (X2), type in the command in STATA as follows:

twoway (scatter Y X2)

You can press enter, and the scatter plot results of the linearity test between rice consumption (Y), and population (X2) can be seen below:

Interpreting the Output

Based on the scatter plot graph for the rice consumption variable with the income variable, we can see that the data distribution forms a linear trend line. The linear line is formed from the bottom left to the top right (positive linear line).

The same thing also happens for the scatter plot graph for the rice consumption variable with the population variable. We can see that the data distribution forms a positive linear trend.

Based on the results of the linearity test using a scatter plot, we can conclude that the regression model has fulfilled the linearity assumption. Therefore, it is correct that we choose to use linear regression. To deepen your understanding of linear regression and how to test assumptions like linearity using scatter plots, I recommend the book Regression Analysis: An Intuitive Guide for Using and Interpreting Linear Models.

Well, that’s the topic of our discussion this time. Hopefully, it will be useful for all of you. See you in the following article.

Tags: assumption test of linear regression using STATA, assumptions of regression analysis, checking the linearity test in linear regression, Kanda data, regression model assumptions, Testing assumptions of linear regression using scatter plot diagram, testing linearity of linear regression using scatter plot

Related posts

How to Create a Research Location Map in Excel: District, Province, and Country Maps

Date Oct 07.2025

How to Determine the Minimum Sample Size in Survey Research to Ensure Representativeness

Date Oct 02.2025

Regression Analysis for Binary Categorical Dependent Variables

Date Sep 27.2025

Leave a Reply Cancel reply

You must be logged in to post a comment.

Categories

  • Article Publication
  • Assumptions of Linear Regression
  • Comparison Test
  • Correlation Test
  • Data Analysis in R
  • Econometrics
  • Excel Tutorial for Statistics
  • Multiple Linear Regression
  • Nonparametric Statistics
  • Profit Analysis
  • Regression Tutorial using Excel
  • Research Methodology
  • Simple Linear Regression
  • Statistics

Popular Post

October 2025
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  
« Sep    
  • How to Create a Research Location Map in Excel: District, Province, and Country Maps
  • How to Determine the Minimum Sample Size in Survey Research to Ensure Representativeness
  • Regression Analysis for Binary Categorical Dependent Variables
  • How to Sort Values from Highest to Lowest in Excel
  • How to Perform Descriptive Statistics in Excel in Under 1 Minute
Copyright KANDA DATA 2025. All Rights Reserved