SlideShare a Scribd company logo
Regression Line
(with an example)
Explained
By Amarnath R
https://sites.google.com/view/amarnath-r/
Example
Consider a map
Cities in the map
The criteria is that the
track must be straight-enough,
That is, not curvy.
Pave a railway track
that connects every city
Regression Line
How to draw the regression
Line?
x- axis
y-axis
Every city is called as
sample in PR
Every Sample should be
represented by attributes /
features
In this case, every sample is
represented by two
features namely, x and y
coordinates
Example
x- axis
y-axis
Samples/
Cities
X
feature
Y
feature
1 6 6
2 10 12
3 14 3
4 22 9
5 24 25
6 32 17
7 33 30
8 43 40
9 47 22
10 52 35
Line Equation
y = mx + b
Assume m = 1 and b = 0
If x = 1, then y = 1(1) + 0
y = 1
If x = 2, then y = 2
If x = 3, then y = 3
If x = 4, then y = 4
If x = 5, then y = 5
If x = 6, then y = 6
If x = 7, then y = 7
If x = 8, then y = 8
If x = 9, then y = 9
If x = 10, then y = 10
m is slope and b is offset
X Y
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
Line Equation
y = mx + b
X Y
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
Assume m = 1 and b = 1
X Y
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 14
Assume m = 0 and b = 1
X Y
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
Assume m = 1 and b = 0
Assume m = 0 and b = 0
X Y
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
Compute Line Equation for the
samples
Samples
/ Cities
X
feature
Y
feature
1 6 6
2 10 12
3 14 3
4 22 9
5 24 25
6 32 17
7 33 30
8 43 40
9 47 22
10 52 35
xmean : mean of x features
ymean : mean of y features
xymean : mean of x*y features
xmeansqr : xmean * xmean
xsqrmean : mean of x*x features
m = Slope? and b = offset?
m=
𝑥𝑚𝑒𝑎𝑛 ∗𝑦𝑚𝑒𝑎𝑛 −𝑥𝑦𝑚𝑒𝑎𝑛
𝑥𝑚𝑒𝑎𝑛𝑠𝑞𝑟 −𝑥𝑠𝑞𝑟𝑚𝑒𝑎𝑛
X.Y
36
120
42
198
600
544
990
1720
1034
1820
X.X
36
100
196
484
576
1024
1089
1849
2209
2704
28.3 19.9 710.4 1026.7
Compute m
m=
28.3 ∗19.9 −710.4
800.89 −1026.7
xmeansqr = 800.89
m = .652
Compute b
b = ymean – m * xmean
b = 19.9–.652 * 28.3
b = 1.448
y = mx + b
Samples
/ Cities
X
feature
Y
feature
1 6 6
2 10 12
3 14 3
4 22 9
5 24 25
6 32 17
7 33 30
8 43 40
9 47 22
10 52 35
X.Y
36
120
42
198
600
544
990
1720
1034
1820
X.X
36
100
196
484
576
1024
1089
1849
2209
2704
28.3 19.9 710.4 1026.7
m = .652
b = 1.448
y = mx + b
y = .652 * x + 1.448
Samples/
Cities
X
feature
New Y
1 6 5.360214
2 10 7.968248
3 14 10.57628
4 22 15.79235
5 24 17.09636
6 32 22.31243
7 33 22.96444
8 43 29.48452
9 47 32.09256
10 52 35.3526
Research
There is a VIP in this City Connecting 2 or more cities and
ignoring the other cities
Thank you,
If you have any queries
Contact:
https://sites.google.com/view/amarnath-r/

More Related Content

PPSX
QR 1 Lesson Notes 8 - Motivation for Modelling with Linear Functions PP Show
PPTX
5.8 rectilinear motion
PPT
5.2 first and second derivative test
PPTX
5.5 optimization
PPT
5.7 rolle's thrm & mv theorem
PPTX
HERMITE CURVES AND B SPLINES
PDF
nuigSem2019
PDF
Benginning Calculus Lecture notes 15 - techniques of integration
QR 1 Lesson Notes 8 - Motivation for Modelling with Linear Functions PP Show
5.8 rectilinear motion
5.2 first and second derivative test
5.5 optimization
5.7 rolle's thrm & mv theorem
HERMITE CURVES AND B SPLINES
nuigSem2019
Benginning Calculus Lecture notes 15 - techniques of integration

What's hot (16)

PPT
Curves and Surfaces
PPT
Surfaces
PDF
Solids of known cross section WS
PDF
Pre-Cal 40S Slides February 19, 2008
DOCX
Distance time graphs
PDF
Benginning Calculus Lecture notes 14 - areas & volumes
PPT
Matrices and row operations 12123 and applications of matrices
DOCX
Ninth grade 4th period study guide key
PPTX
Data structure - traveling sales person and mesh algorithm
PPTX
Final Project Powerpoint
PPT
Quadratics
PPTX
Surface modelling
PPTX
Alg lesson 12
PPTX
Lesson 2
PPTX
FPGA-Sketch Board
PPTX
Implicit Interpolation Analytical Curves
Curves and Surfaces
Surfaces
Solids of known cross section WS
Pre-Cal 40S Slides February 19, 2008
Distance time graphs
Benginning Calculus Lecture notes 14 - areas & volumes
Matrices and row operations 12123 and applications of matrices
Ninth grade 4th period study guide key
Data structure - traveling sales person and mesh algorithm
Final Project Powerpoint
Quadratics
Surface modelling
Alg lesson 12
Lesson 2
FPGA-Sketch Board
Implicit Interpolation Analytical Curves
Ad

Similar to Introduction to Regression line (20)

PPTX
application(slope-parallel-perpendicular)_estuita.pptx
PPTX
Rasterization.pptx
PDF
Unit-2 raster scan graphics,line,circle and polygon algorithms
PPTX
STA003_WK2_L.pptx
PPTX
QUADRATIC FUNCTION MATH FORM 4 KSSM 2021 DISCUSSION PART 1
DOC
Mathematics 8 Linear Functions
PPT
PDF
STA003_WK2_L.pdf
PPTX
Função quadrática
PPTX
Rational function representation
PDF
Computer graphics notes 2 tutorials duniya
PPTX
IGCSE_Functions.pptx fffffffffffffffffffffffffffffffffffffffffffffffffffffff...
PDF
PART I.3 - Physical Mathematics
PDF
Computer Graphics Unit 2
PPT
P1.Fungsi_Linear kalkulus 2 aljabar fung
PPSX
Linear regression
PPTX
R Bootcamp Day 3 Part 1 - Statistics in R
PDF
Unit 2
PDF
computational brrtyuuufdddfgggxxzzcv.pdf
PPTX
Linear functions
application(slope-parallel-perpendicular)_estuita.pptx
Rasterization.pptx
Unit-2 raster scan graphics,line,circle and polygon algorithms
STA003_WK2_L.pptx
QUADRATIC FUNCTION MATH FORM 4 KSSM 2021 DISCUSSION PART 1
Mathematics 8 Linear Functions
STA003_WK2_L.pdf
Função quadrática
Rational function representation
Computer graphics notes 2 tutorials duniya
IGCSE_Functions.pptx fffffffffffffffffffffffffffffffffffffffffffffffffffffff...
PART I.3 - Physical Mathematics
Computer Graphics Unit 2
P1.Fungsi_Linear kalkulus 2 aljabar fung
Linear regression
R Bootcamp Day 3 Part 1 - Statistics in R
Unit 2
computational brrtyuuufdddfgggxxzzcv.pdf
Linear functions
Ad

Recently uploaded (20)

PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
master seminar digital applications in india
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Computing-Curriculum for Schools in Ghana
PDF
RMMM.pdf make it easy to upload and study
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Anesthesia in Laparoscopic Surgery in India
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
Final Presentation General Medicine 03-08-2024.pptx
Complications of Minimal Access Surgery at WLH
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
GDM (1) (1).pptx small presentation for students
202450812 BayCHI UCSC-SV 20250812 v17.pptx
VCE English Exam - Section C Student Revision Booklet
Abdominal Access Techniques with Prof. Dr. R K Mishra
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
master seminar digital applications in india
Microbial disease of the cardiovascular and lymphatic systems
O7-L3 Supply Chain Operations - ICLT Program
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Computing-Curriculum for Schools in Ghana
RMMM.pdf make it easy to upload and study
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
A systematic review of self-coping strategies used by university students to ...
102 student loan defaulters named and shamed – Is someone you know on the list?
Anesthesia in Laparoscopic Surgery in India

Introduction to Regression line

  • 1. Regression Line (with an example) Explained By Amarnath R https://sites.google.com/view/amarnath-r/
  • 2. Example Consider a map Cities in the map The criteria is that the track must be straight-enough, That is, not curvy. Pave a railway track that connects every city Regression Line
  • 3. How to draw the regression Line? x- axis y-axis Every city is called as sample in PR Every Sample should be represented by attributes / features In this case, every sample is represented by two features namely, x and y coordinates
  • 4. Example x- axis y-axis Samples/ Cities X feature Y feature 1 6 6 2 10 12 3 14 3 4 22 9 5 24 25 6 32 17 7 33 30 8 43 40 9 47 22 10 52 35
  • 5. Line Equation y = mx + b Assume m = 1 and b = 0 If x = 1, then y = 1(1) + 0 y = 1 If x = 2, then y = 2 If x = 3, then y = 3 If x = 4, then y = 4 If x = 5, then y = 5 If x = 6, then y = 6 If x = 7, then y = 7 If x = 8, then y = 8 If x = 9, then y = 9 If x = 10, then y = 10 m is slope and b is offset X Y 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10
  • 6. Line Equation y = mx + b X Y 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 Assume m = 1 and b = 1 X Y 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 14 Assume m = 0 and b = 1 X Y 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 Assume m = 1 and b = 0 Assume m = 0 and b = 0 X Y 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 0
  • 7. Compute Line Equation for the samples Samples / Cities X feature Y feature 1 6 6 2 10 12 3 14 3 4 22 9 5 24 25 6 32 17 7 33 30 8 43 40 9 47 22 10 52 35 xmean : mean of x features ymean : mean of y features xymean : mean of x*y features xmeansqr : xmean * xmean xsqrmean : mean of x*x features m = Slope? and b = offset? m= 𝑥𝑚𝑒𝑎𝑛 ∗𝑦𝑚𝑒𝑎𝑛 −𝑥𝑦𝑚𝑒𝑎𝑛 𝑥𝑚𝑒𝑎𝑛𝑠𝑞𝑟 −𝑥𝑠𝑞𝑟𝑚𝑒𝑎𝑛 X.Y 36 120 42 198 600 544 990 1720 1034 1820 X.X 36 100 196 484 576 1024 1089 1849 2209 2704 28.3 19.9 710.4 1026.7 Compute m m= 28.3 ∗19.9 −710.4 800.89 −1026.7 xmeansqr = 800.89 m = .652 Compute b b = ymean – m * xmean b = 19.9–.652 * 28.3 b = 1.448 y = mx + b
  • 8. Samples / Cities X feature Y feature 1 6 6 2 10 12 3 14 3 4 22 9 5 24 25 6 32 17 7 33 30 8 43 40 9 47 22 10 52 35 X.Y 36 120 42 198 600 544 990 1720 1034 1820 X.X 36 100 196 484 576 1024 1089 1849 2209 2704 28.3 19.9 710.4 1026.7 m = .652 b = 1.448 y = mx + b y = .652 * x + 1.448 Samples/ Cities X feature New Y 1 6 5.360214 2 10 7.968248 3 14 10.57628 4 22 15.79235 5 24 17.09636 6 32 22.31243 7 33 22.96444 8 43 29.48452 9 47 32.09256 10 52 35.3526
  • 9. Research There is a VIP in this City Connecting 2 or more cities and ignoring the other cities
  • 10. Thank you, If you have any queries Contact: https://sites.google.com/view/amarnath-r/