Simple Linear Regression

We will use the Linear Regression technique to generate trend lines for a randomly generated vector. To do this, we will search for a line whose distance from each of the data points in the vector is minimal. This distance will be calculated using the sum of squares of two data points. So the formula that we are using to determine this line is

D = i = 1 to n [yi - (0 + 1x)]2

For simple linear regression, we can find the line that minimizes this line by the following equations:

SXY = i = 1 to n(xy) -
(i = 1 to nx)(i = 1 to ny)

n
SXX = i = 1 to n(x2) -
(i = 1 to nx)2

n
1 =
SXY

SXX
0 = - 1

Show Work
your browser does not support the canvas tag

Recent Updates

  • 03-20-2017 Longest Common Subsequence at LEARNINGLOVER.COM
  • 10-27-2016 Independent Set Puzzles
  • 06-28-2016 Lets Learn About XOR Encryption
  • 06-15-2016 Discrete-time Markov Chains
  • 03-01-2016 Topological Sort
  • 01-21-2016 The RSA Algorithm
  • 11-20-2015 How To Take Notes in Math Class
  • 10-28-2015 The Depth-First-Search Algorithm
  • 10-28-2015 The Breadth-First-Search Algorithm
  • 09-23-2015 ID3 Algorithm Decision Trees
  • 07-08-2015 Clique Problem Puzzles
  • 06-25-2015 Unidirectional TSP Puzzles
  • 04-04-2015 Learn About Descriptive Statistics
  • 02-19-2015 Slope Formula
  • 01-15-2015 Interactive Midpoint Formula
  • 12-18-2014 Triangle Sum Puzzle
  • 12-02-2014 The Bridge Crossing Problem
  • 11-26-2014 Magical Squares Game
  • 11-07-2014 QR Decomposition
  • 09-12-2014 The A* Algorithm