EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home Finance Finance Resources Finance Formula Regression Line Formula
 

Regression Line Formula

Madhuri Thakur
Article byMadhuri Thakur

Updated July 24, 2023

Regression Line Formula

 

 

Regression Line Formula (Table of Contents)
  • Formula
  • Examples

What is the Regression Line Formula?

The term “Regression Line” refers to the statistical technique which is used to model the relationship between two variables. In this technique, there is an explanatory variable and a dependent variable, and the former is used to draw insights about the latter and build its forecast.

In other words, it is used to make predictions about the dependent variable based on its relationship with the explanatory variable. The formula for the regression line (Y) can be derived by multiplying the slope of line (b) with the explanatory variable (X) and then adding the result to the intercept (a). Mathematically, the regression line equation is represented as,

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

The formula for Regression Line –

Y = a + b * X

Example of Regression Line Formula (With Excel Template)

Let’s take an example to understand the calculation of the Regression Line in a better manner:

You can download this Regression Line Formula Excel Template here – Regression Line Formula Excel Template

Example #1

Let us take the example of a set of five patients whose glucose levels have been examined and presented along with their respective ages. Based on the given information, build the regression line equation and then calculate the glucose level for a person aged 77 by using the regression line equation.

five patients

Solution:

Now let’s calculate XY for ΣXY.

calculate XY

Similarly, calculated the below XY.

Regression line formula-1.3

Now let’s calculate X² for ΣX².

calculate X²

Similarly, calculated the below X².

Regression line formula-1.5

Sum is Calculated as

Regression line formula-1.6

b is calculated using the formula given below

b = [n * (∑XY) – (∑X) * (∑Y)] / [n * (∑X2) – (∑X)2]

calculating b

  • b = [5 * 20819 – 232 * 436] / [5 * 11768 – (232)2]
  • b = 0.59

a is calculated using the formula given below

a = [(∑Y) * (∑X2) – (∑X) * (∑XY)] / [n * (∑X2) – (∑X)2]

calculating a

  • a = [436 * 11768 – 232 * 20819] / [5 * 11768 – (232)2]
  • a = 59.98

In the above equation, the glucose level of a person aged 77 years can be calculated as,

Regression Line is calculated using the formula given below

Regression Line Formula = Y = a + b * X

Regression line formula-1.9

  • Y = 59.98 + 0.59 * X
  • Y  = 105.15 ~ 105

Therefore, as per the regression level, the glucose level of a 77-year-old person is predicted to be 105mg/dL.

Example #2

Let us take the example of a class with 10 students where their heights and weights were measured to check if their weight had any liner relationship with their height. The following information is available.

example of a class

Solution:

Now let’s calculate XY for ΣXY.

Regression line formula-2.2

Similarly, calculated the below XY.

Regression line formula-2.3

Now let’s calculate X² for ΣX².

Regression line formula-2.4

Similarly, calculated the below X².

Regression line formula-2.5

Sum is calculated as

Regression line formula-2.6

b is calculated using the formula given below build the regression line equation based on the given information.

b = [n * (∑XY) – (∑X) * (∑Y)] / [n * (∑X2) – (∑X)2]

Regression line formula-2.7

  • b = [10 * 114008 – 1631 * 697] / [10 * 266843 – (1631)2]
  • b = 0.40

a is calculated using the formula given below

a = [(∑Y) * (∑X2) – (∑X) * (∑XY)] / [n * (∑X2) – (∑X)2]

Regression line formula-2.8

  • a = [697 * 266843 – 1631 * 114008] / [10 * 266843 – (1631)2]
  • a = 5.14

Regression Line Equation is calculated using the formula given below

Regression Line Formula = Y = a + b * X

Y = a + b * X

Or Y = 5.14 + 0.40 * X

Explanation

The Regression Line Formula can be calculated by using the following steps:

Step 1: Firstly, determine the dependent variable or the variable that is the subject of prediction. It is denoted by Yi.

Step 2: Next, determine the explanatory or independent variable for the regression line that Xi denotes. It should be selected such that it can adequately explain the variation in the dependent variable.

Step 3: Next, determine the slope of the line that describes the relationship between the independent and the dependent variable. It is denoted by “b” and is calculated based on the number of data points (n), explanatory and dependent variable by using the following formula

b = [n * (∑XY) – (∑X) * (∑Y)] / [n * (∑X2) – (∑X)2]

Step 4: Next, determine the intercept of the regression line that remains constant irrespective of the explanatory variable’s value. It is denoted by “a” and is calculated based on the number of data points (n), explanatory and dependent variable by using the following formula

a = [(∑Y) * (∑X2) – (∑X) * (∑XY)] / [n * (∑X2) – (∑X)2]

Step 5: Finally, the formula for the regression line can be derived by multiplying the explanatory variable (step 2) and the slope of the line (step 3) and then adding the result to the intercept (step 4) as shown below.

Y = a + b * X

Relevance and Use of Regression Line Formula

It is one of the few important concepts for model building, and it is predominantly used to build the predictive model by applying the technique of best fit to the relationship between explanatory and dependent variables. It finds applications in various finance models that include the CAPM method, revenue forecasting, etc.

Recommended Articles

This is a guide to the Regression Line Formula. Here we discuss how to calculate the Regression Line along with practical examples. We also provide a Regression Line calculator with a downloadable excel template. You may also look at the following articles to learn more –

  1. Examples in Depreciation Formula
  2. Calculations in Convexity Formula
  3. How to Calculate Net Exports?
  4. What is the Moving Average Formula?

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA
Free Investment Banking Course

Corporate Valuation, Investment Banking, Accounting, CFA Calculator & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

Download Regression Line Formula Excel Template

EDUCBA Login

Forgot Password?

EDUCBA

डाउनलोड Regression Line Formula Excel Template

🚀 Limited Time Offer! - 🎁 ENROLL NOW