How To Calculate

Learn how to calculate anything
Menu
  • bmi
Home
statistics
How to Calculate Least Squares Regression Line.
statistics

How to Calculate Least Squares Regression Line.

Rosemary Njeri

A regression line is a straight line that describes how a response variable y changes as an explanatory variable x changes.

Ordinary least squares regression is a way to find the line of best fit for a set of data.

Formula to calculate squares regression line.

Since the line’s equation is y = mx + b, all we need to do is find the values of m (gradient) and b (y-intercept) using the following formulas.

Least Squares Regression Line.

N is the number of points

x,y are the values on the x and y axis.

 Least Squares Regression Line.

M is the gradient.

Example:

Suppose you found out how many hours of sunshine verse how many bottles of water were sold at the shop from Monday to Friday to be as follows;

Hours of Sunshine (x)Bottles of Water Sold (y)
612
510
48
57
59

Therefore, we will begin by finding the value of m.

We first need to find;

N = 5

Σx^2 = 625

Σy = 46

Σxy = 234

Σx = 25

Therefore m is;

 Least Squares Regression Line.

m = 0.00833

 Least Squares Regression Line.

Therefore, the y-intercept is 9.2.

If y = mx + b

Then y = 0.00833x + 9.2

Share
Tweet
Reddit
Pinterest
Email
Prev Article
Next Article

Related Articles

How to Calculate Probability.
Probability is a measure of the likelihood of an event …

How to Calculate Probability.

How to Calculate Correlation Coefficient.
The correlation coefficient is a statistical measure of the strength …

How to Calculate Correlation Coefficient.

Leave a Reply Cancel Reply

Popular Posts

  • 5 Best AI Apps for Solving Complex …
    March 22, 2023 0

Categories

learntocalculate.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.

How To Calculate

Learn how to calculate anything

Pages

  • About Us
  • Contact Us
  • Privacy Policy
Copyright © 2023 How To Calculate

Ad Blocker Detected

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Refresh