0% found this document useful (0 votes)
11 views52 pages

L20-22 Linear Regression

System Hai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views52 pages

L20-22 Linear Regression

System Hai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Linear Regression

Linear Regression
• Linear regression quantifies the relationship between one or
more predictor variable(s) and one outcome variable.
• Linear regression is commonly used for predictive analysis
and modeling.
• For example, it can be used to quantify the relative impacts of
age, gender, and diet (the predictor variables) on height (the
outcome variable).
• Linear regression makes predictions for continuous/real or
numeric variables such as sales, salary, age, product
price, etc.
Linear Regression
Data:
X y
95 85
85 95
80 70
70 65
60 75
∑x=390 ∑y=385
x ̅= 78 y ̅= 77
Solution
x y X[x-mean( Y[y-mean( X2 Y2 XY
x)] y)]
95 85 17 8 289 64 136
85 95 7 18 49 324 126
80 70 2 -7 4 49 -14
70 65 -8 -12 64 144 96
60 75 -18 -7 324 49 126
∑=390 385 730 630 470
Contd..

2
Coefficient of Determination (R )

Coefficient of Determination

How to use Regression Equation ??
• Given X, Find out Y?
• Problem:
• X= Math Aptitude Score Y= Statistics Grade
• If X= 75, find out Y??
• Y= 26.77+0.64(75) = 74.8
• Avoid Exploration:
• Using X values for prediction outside the range for
generating Regression Equation (i.e values below
60 and above 95)
Linear Regression using Least Square
Method
Y= ax+b
Question??
• Create Regression equation using Least Square
Method for the given data points:
• {(-2,-1),(1,1),(3,2)}
Solution
X Y XY X2
-2 -1 2 4
1 1 1 1
3 2 6 9
Solution

Question??
• Find the Least Square Regression Line for the
given data. Also Estimate the value of y when
x=10 X Y
0 2
1 3
2 5
3 4
4 6
Regression Analysis

References
• http://cse.iitkgp.ac.in/~saptarshi/courses/ml2
018spring/ML-02-linear-regression.pdf
• Course material of Andrew Ng
http://cs229.stanford.edu/

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy