Linear regression Linear regression

Linear regression

SHARE THE ARTICLE ON

Table of Contents

What is Linear regression?

Linear regression Linear regression

Linear regression is used to define a relationship between two variables. These variables are quantitative variables and one or more variables influence one output variable. The output variable that we predict is called a dependent variable and the ones that influence the output variable are called independent variables. 

Example: the below graph shows the increasing sales of a company as the years increase.

Linear regression will help you determine these two things:

  • How strong is the relationship between two variables? 
  • What is the value of the dependent variable at a certain value of the independent variable?

You can perform linear regression using the following methods:

  • R linear regression
  • MATLAB linear regression
  • Sklearn linear regression
  • Linear regression Python
  • Excel linear regression

Transform your insight generation process

Create an actionable feedback collection process.

online survey

Example of linear regression

In this example, the below table shows the sales and the expenses the company invests in product development. 

Year

Sales (in Crores)

Expenses in product development (in Crore)

1

123

20

2

190

25

3

220

30

4

345

35

5

399

40

6

400

45

 

As you can see, as the company invests more in the products and develops more products, the sales also increase relatively. 

Assumptions of Linear regression

  • For each variable, consider a number of valid cases, mean and standard deviation.
  • For each model, consider: regression coefficients, correlation matrix, part and partial correlations, multiple R, R2, adjusted R2, change in R2, standard error of the estimate, analysis-of-variance table, predicted values and residuals, 95-per cent-confidence intervals for each regression coefficient, variance-covariance matrix, variance inflation factor, tolerance, Durbin-Watson test, distance measures (Mahalanobis, Cook and leverage values), DfBeta, DfFit, prediction intervals and case-wise diagnostic information
  • Consider various plots like scatterplots, histograms, partial plots and probability plots.
  • Variable data: the data like religion, gender, the cast should be measured quantitatively using some dummy variables. 
  • The variance of the dependent variable for each independent variable value should be normal and constant. 
  • Homoscedasticity: the size of the error in our prediction does not change significantly across the independent variable values. 
  • Normality: the data follows a normal distribution.

 

Download Market Research Toolkit

Get market research trends guide, Online Surveys guide, Agile Market Research Guide & 5 Market research Template

Making the most of your B2B market research in 2021 PDF 3 s 1.png

How to find a Linear regression equation?

Step 1: Make a chart of the data you have like below. And include the extra columns according to the Linear regression equation.

Subject

Age (yrs)

x

Glucose level y

xy

x2

y2

1

25

79

1975

625

6241

2

43

99

4257

1849

9801

3

59

81

4779

3481

6561

4

21

65

1365

441

4225

5

42

75

3150

1764

5625

Total

190

399

15526

8160

32453

 

We have the values of all Σ an n = 5 in our case. 

Step 2: Find a and b using the following equations

a = (399)(8160) – (190)(15526) / 5(8160) – (190)2

a = 3255840 – 2949940 / 40800 – 36100

a = 305900 / 4700

a = 65.08

b = 5(15526) – (190)(399) / 5(8160)(190)2

b = 77630 – 75810 / 4700

b = 1820 / 4700

b = 0.38

Step 3: Insert the values into the ir equation 

y = a+bx

y = 65.08 + 0.38x

Hence the Linear regression equation for our example is y = 65.08 + 0.38x 

See Voxco survey software in action with a Free demo.

Why use Linear regression?

  • Linear regression allows you to predict one variable using another one. In cases of financial aspects, you can predict your sales based on your investments in advertisements, product development, etc.
  • Linear regression can help you predict the changes in pricing. Let’s say you have increased the price of a product, Linear regression can help you determine if the consumption drops and if yes then how much.
  • You can analyze risks in your companies using Linear regression. 
  • As you can predict the variables, it makes it easy for you to manage the independent variables which are going to directly influence the dependent variables. 

Explore all the survey question types
possible on Voxco

Read more

Face to Face Surveyscvr

Welch’s t-test

Welch's t-test SHARE THE ARTICLE ON Share on facebook Share on twitter Share on linkedin Table of Contents What is Welch’s t-test? Welch’s t-te ...

COVER-IMAGE (1)

Voice of customer survey

Voice of customer survey SHARE THE ARTICLE ON Table of Contents What is a voice of customer survey? Voice of customer refers to gathering and capturing cu ...

Customer 360 analytics

Customer 360 analytics SHARE THE ARTICLE ON Share on facebook Share on twitter Share on linkedin Table of Contents Customer 360 view allows an ...

Shopping Basket
Great Research
Fast Insights
Best-in-class ROI

Voxco’s platform helps you gather omnichannel feedback, measure sentiment, uncover insights and act on them.

Join 500 + global clients across 40+ countries

Great Research
Fast Insights
Best-in-class ROI

Voxco’s platform helps you gather omnichannel feedback, measure sentiment, uncover insights and act on them.

Join 500 + global clients across 40+ countries