• Security
• Take a peek at our powerful survey features to design surveys that scale discoveries.

• Explore VoxcoÂ

Need to map Voxcoâ€™s features & offerings? We can help!

Watch a DemoÂ

Get a Quote

• Find the best customer experience platform

Uncover customer pain points, analyze feedback and run successful CX programs with the best CX platform for your team.

Get the Guide Now

• "

Weâ€™ve been avid users of the Voxco platform now for over 20 years. It gives us the flexibility to routinely enhance our survey toolkit and provides our clients with a more robust dataset and story to tell their clients.

Steve Male

VP Innovation & Strategic Partnerships, The Logit Group

• PRICING
• Explore Regional Offices

• Call us

America: +13236381128

Australia: +61480040096
• Security
• Take a peek at our powerful survey features to design surveys that scale discoveries.

• Explore VoxcoÂ

Need to map Voxcoâ€™s features & offerings? We can help!

Watch a DemoÂ

Get a Quote

• Find the best customer experience platform

Uncover customer pain points, analyze feedback and run successful CX programs with the best CX platform for your team.

Get the Guide Now

• "

Weâ€™ve been avid users of the Voxco platform now for over 20 years. It gives us the flexibility to routinely enhance our survey toolkit and provides our clients with a more robust dataset and story to tell their clients.

Steve Male

VP Innovation & Strategic Partnerships, The Logit Group

• PRICING
• Explore Regional Offices

• Call us

America: +13236381128

Australia: +61480040096

# Linear regression

SHARE THE ARTICLE ON

## What is 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.

• 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.

## 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.

Â

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

## 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.Â