Dustin K MacDonald

Menu
  • Home
  • About
  • Economic and Community Development
    • Notary in Sigourney Iowa
  • Nonprofit Management
    • Counselling and Service Delivery
    • Suicide Prevention / Crisis Intervention
  • Politics and Governance
  • Math and Statistics
Menu

Least-Squares Regression

Posted on January 26, 2015November 25, 2018 by Dustin

Regression is a technique used to predict future values based on known values. For instance, linear regression allows us to predict what an unknown Y value will be, given a series of known X and Y’s, and a given X value.

Given the following, it’s easy to see the pattern. But assuming no obvious pattern exists, regression can help us determine what the Y value will be given our known X values.

X Y
2 3
4 6
6 9
8 12
10 15
12
14

 

The X value is known as the independent variable, the “predictor variable”, while the Y value is the value you’re being predicted.

The linear regression (or “least squares regression”) equation is Y’ = a + bX

  • Y’ (Y-prime) is the predicted Y value for the X value
  • a is the estimated value of Y when X is 0
  • b is the slope (the average change in Y’ for each change in X)
  • X is any value of the independent variable

There are additional formulas for both a and b.

a b

Let’s take a look at the following data-set, that compares the number of calls made for a product against the number of sales:

Calls (X) Sales (Y)
20 30
40 60
20 40
30 60
10 30
10 40
20 40
20 50
20 30
30 70
220 450

 

First we need to calculate the sum of X-squared, Y-squared and X*Y:

Calls (X) Sales (Y) X2 Y2 XY
20 30 400 900 600
40 60 1600 3600 2400
20 40 400 1600 800
30 60 900 3600 1800
10 30 100 900 300
10 40 100 1600 400
20 40 400 1600 800
20 50 400 2500 1000
20 30 400 900 600
30 70 900 4900 2100
Total 220 450 5600 22100 10800

 

Returning to our formula, let’s start with b first:

b

The top of the equation looks like this: b = 10(10800) – 220 * 450 / n(∑X2)-(∑X)2. We’ve simply filled in the values from our chart.

b = 10(10800) – 220 * 450
b = 108,000 – 99,000
b = 9,000 / n(∑X2)-( ∑X)2

Now we have to do the bottom half of the equation:

n(∑X2)-(∑X)2

=10(5600)-(220) 2
=56,000 – 48,400
=7,600

Returning to our equation:

b = 9,000 / 7,600
b = 1.1842

Now let’s move on to a:

a2

a = 450 / 10 – 1.1842 * (220 / 10)
a = 45 – (1.1842 * 22)
a = 45 – 26.0524
a = 18.9476

So, going back to our original regression equation, Y’ = a + bX and plugging our numbers, we get:

Y’ = 18.9476 + (1.1842)X

To use this equation, we now put our desired value in for X. With an estimated 20 calls:

Y’ = 18.9476 + (1.1842)*20
Y’ = 18.9476 + 23.684
Y’ = 42.63

So, a salesperson who makes 20 calls will expect to make 42 sales.



Cite this article as: MacDonald, D.K., (2015), "Least-Squares Regression," retrieved on April 20, 2021 from https://dustinkmacdonald.com/least-squares-regression/.

4 thoughts on “Least-Squares Regression”

  1. Pingback: Predicting Your Helpline Call Answer Rate | Dustin K MacDonald Dustin K MacDonald
  2. Pingback: An Introduction to Intelligence Research and Analysis | Dustin K MacDonald Dustin K MacDonald
  3. Pingback: Extrapolation - Intelligence Analyst Training
  4. Pingback: Scales of Measurement - Dustin K MacDonald

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Privacy Policy

See here for our privacy policy. This site uses affiliate links and Adsense ads to provide targeted advertising.

Tags

analytical technique assessment city council communication community development counselling crisis chat crisis intervention economic development empathy evaluation forecasting fundraising governance humint inpatient intelligence intelligence analysis keokuk county language learning legal local government management peer support personal development politics professional development protective factors psychosocial risk factors safety planning sexual violence sigourney social media statistics suicide suicide assessment suicide myths suicide risk assessment technology terrorism training violence violence risk assessment youth

Recommended Posts

  • Conducting Psychosocial Assessments
  • DCIB Model of Suicide Risk Assessment
  • ABC Model of Crisis Intervention
  • My Friend is Suicidal - What do I do?

Recent Posts

  • Jarad Klein ignores the science on COVID-19
  • Certificate for the Study of Capitalism
  • Review of UpLevel Data Science 2020
  • Quantic Master of Business Administration (MBA)
  • 2020 Election Results, Keokuk County Iowa

Archives

  • January 2021 (1)
  • December 2020 (1)
  • November 2020 (4)
  • July 2020 (1)
  • June 2020 (1)
  • April 2020 (1)
  • March 2020 (4)
  • February 2020 (7)
  • January 2020 (1)
  • November 2019 (1)
  • October 2019 (2)
  • September 2019 (4)
  • August 2019 (2)
  • March 2019 (1)
  • February 2019 (1)
  • January 2019 (1)
  • December 2018 (4)
  • November 2018 (3)
  • October 2018 (3)
  • September 2018 (19)
  • October 2017 (2)
  • September 2017 (2)
  • August 2017 (1)
  • July 2017 (39)
  • May 2017 (3)
  • April 2017 (4)
  • March 2017 (4)
  • February 2017 (4)
  • January 2017 (5)
  • December 2016 (4)
  • November 2016 (4)
  • October 2016 (5)
  • September 2016 (4)
  • August 2016 (5)
  • July 2016 (5)
  • June 2016 (5)
  • May 2016 (3)
  • April 2016 (2)
  • March 2016 (2)
  • February 2016 (2)
  • January 2016 (4)
  • December 2015 (2)
  • November 2015 (2)
  • October 2015 (2)
  • September 2015 (2)
  • August 2015 (1)
  • June 2015 (2)
  • May 2015 (5)
  • April 2015 (3)
  • March 2015 (8)
  • February 2015 (12)
  • January 2015 (28)

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Recent Comments

  • Dustin on Ultimate Guide to Starting a Crisis Line
  • Jarin on Ultimate Guide to Starting a Crisis Line
  • Dustin on Quantic Master of Business Administration (MBA)
  • Dustin on Certificate for the Study of Capitalism
  • Tricia Fox on Quantic Master of Business Administration (MBA)

Tags

analytical technique assessment city council communication community development counselling crisis chat crisis intervention economic development empathy evaluation forecasting fundraising governance humint inpatient intelligence intelligence analysis keokuk county language learning legal local government management peer support personal development politics professional development protective factors psychosocial risk factors safety planning sexual violence sigourney social media statistics suicide suicide assessment suicide myths suicide risk assessment technology terrorism training violence violence risk assessment youth
© 2021 Dustin K MacDonald | Powered by Minimalist Blog WordPress Theme