SlideShare a Scribd company logo
1 of 27
WINTERTemplate
SUBJECT: BASIC AND INFERENTIAL STATISTICS
REPORTER: SHIELA ROBETH B. VINARAO
TOPIC: REGRESSION ANALYSIS
PROFESSOR: DR. GLORIA T. MIANO
REGRESSION
ANALYSIS
THE SIMPLE LINEAR
REGESSION ANALYSIS
The simple linear regression analysis
is used when there is a significant
relationship between 𝒙 and 𝒚 variables.
This is used in predicting the value of
a dependent variable 𝒚 given the value of
the independent variable 𝒙.
D
E
F
I
N
I
T
I
O
N
THE SIMPLE LINEAR
REGESSION ANALYSIS
Suppose the advertising cost 𝒙 and
sales (𝒚) are correlated, then we can predict
the future sales (𝒚) in terms of advertising
cost (𝒙).
Another type of problem which uses
regression analysis is when variables
corresponding to years are given, it is
possible to predict the value of that variable
several years hence or several years back.
E
X
A
M
P
L
E
THE SIMPLE LINEAR
REGESSION ANALYSIS
F
O
R
M
U
L
A
𝒚 = 𝒂 + 𝒃𝒙
WINTERTemplate
Example
Consider the following data:
𝑥 𝑦
1 6
2 4
3 3
4 5
5 4
6 2
0
1
2
3
4
5
6
7
0 2 4 6 8
y-axis
x-axis
 Straight line indicates that the two variables are to some
extent LINEARLY RELATED
 The variable we are basing our predictions on is called the
predictor variable and is referred to as 𝑥. When there is only
one predictor variable, the prediction method is called
𝑠𝑖𝑚𝑝𝑙𝑒 𝑟𝑒𝑔𝑟𝑒𝑠𝑠𝑖𝑜𝑛.
𝒙 𝒚 𝒙𝑦 𝒙 𝟐
1 6 6 1
2 4 8 4
3 3 9 9
4 5 20 16
5 4 20 25
6 2 12 36
Σ𝑥 = 21
𝑥 = 3.5
Σ𝑦 = 24
𝒚 = 4
Σ𝑥𝑦 =75 Σ𝑥2 = 91
SIMPLE LINEAR REGESSION
𝒚 = 𝒂 + 𝒃𝒙
Σ𝑥 = 21
𝑥 = 3.5
Σ𝑦 = 24
𝒚 = 4
Σ𝑥𝑦 =75
𝒏 = 𝟔
Σ𝑥2 = 91
𝒃 =
𝒏 𝒙𝒚 − 𝒙 𝒚
𝒏 𝒙2 − 𝒙 2
=
6(75) − 21 24
6(91) − 21 2
=
450 − 504
546 − 441
=
−54
105
𝒃 = −𝟎. 𝟓𝟏
𝒂 = 𝒚 − 𝒃 𝒙
= 4 − −0.51 3.5
= 4 − (−1.79)
= 4 + 1.79
𝒂 = 𝟓. 𝟕𝟗
𝒚 = 𝟓. 𝟕𝟗 − 𝟎. 𝟓𝟏𝒙
05Example
A study is conducted
on the relationship of
the number of
absences (𝒙) and the
grades (𝒚) of the
students in English.
Determine the
relationship using the
following data.
Number of Absences
𝒙
Grades in English
𝒚
1 90
2 85
2 80
3 75
3 80
8 65
6 70
1 95
4 80
5 80
5 75
1 92
2 89
1 80
9 65
Number of
Absences
𝒙
Grades in
English
𝒚
1 90
2 85
2 80
3 75
3 80
8 65
6 70
1 95
4 80
5 80
5 75
1 92
2 89
1 80
9 65
0
10
20
30
40
50
60
70
80
90
100
0 2 4 6 8 10
GradesinEnglish
y
Number of absences
x
Scatter Diagram
WINTERTemplate
Solving by the Stepwise Method
Problem : Is there a significant relationship between the
number of absences and the grades of 15
students in English class?
Hypotheses :
Level of significance :
𝜶 = 𝟎. 𝟎𝟓
𝑟. 05 = −5.14
There is no significant relationship between the number
of absences and the grades of 15 students in English
class.
Ho:
There is a significant relationship between the number of
absences and the grades of 15 students in English class.H1:
df = n – 2
= 15 – 2
= 13
S
T
A
T
I
S
T
I
C
S
Pearson Product Moment
Coefficient of Correlation 𝒓
𝒙 = 𝟓𝟑 𝒚 = 𝟏𝟐𝟎𝟏 𝒙 𝟐
= 281 𝒚 𝟐
= 𝟗7335 𝒙𝒚 = 3950
𝒏 = 𝟏𝟓 𝒙 = 𝟑. 𝟓𝟑 𝒚 = 𝟖𝟎. 𝟎𝟕
𝒓 =
𝟓𝟗𝟐𝟓𝟎 − 𝟔𝟑𝟔𝟓𝟑
𝟒𝟐𝟏𝟓 − 𝟐𝟖𝟎𝟗 𝟏𝟒𝟔𝟎𝟎𝟐𝟓 − 𝟏𝟒𝟒𝟐𝟒𝟎𝟏
𝒓 =
𝟏𝟓 𝟑𝟗𝟓𝟎 − 𝟓𝟑 𝟏𝟐𝟎𝟏
𝟏𝟓 𝟐𝟖𝟏 − 𝟓𝟑 𝟐 𝟏𝟓 𝟗𝟕, 𝟑𝟑𝟓 − 𝟏𝟐𝟎𝟏 𝟐
𝒓 =
−𝟒𝟒𝟎𝟑
𝟏𝟒𝟎𝟔 𝟏𝟕𝟔𝟐𝟒
𝒓 =
−𝟒𝟒𝟎𝟑
𝟐𝟒𝟕𝟕𝟗𝟑𝟒𝟒
𝒓 =
−𝟒𝟒𝟎𝟑
𝟒𝟗𝟕𝟕. 𝟖𝟖 𝒓 = −𝟎. 𝟖𝟖
The computed r value of −0.88 is beyond the
critical value of −5.14 at 0.05 level of significance with 13
degrees of freedom, so the null hypothesis is rejected.
This means that there is a significant relationship
between the number of absences and the grades of
students in English. Since the value of r is negative, it
implies that students who had more absences had lower
grades.
Decision Rule :
If the r computed value is greater than or
beyond the critical value, reject Ho.
Conclusion :
Suppose we want to predict the grade (𝒚) of the student who
has incurred 7 absences (𝒙). To get the value of x, the simple
linear regression analysis will be used.
𝒚 = 𝒂 + 𝒃𝒙
𝒂 = 𝒚 − 𝒃 𝒙
= 80.07 − −3.13 3.53
= 80.07 – (−11.05)
= 80.07 + 11.05
𝒂 = 𝟗𝟏. 𝟏𝟐
𝒃 =
𝒏 𝒙𝒚 − 𝒙 𝒚
𝒏 𝒙2 − 𝒙 2
=
15 3950 − 53 1201
15 281 − 53 2
=
59250 − 63653
4215 − 2809
=
−4403
1406
𝒃 = −𝟑. 𝟏𝟑
= 91.12 + −3.13 𝒙
= 91.12 − 3.13 𝟕
= 91.12 − 21.91
= 𝟔𝟗. 𝟐𝟏 𝒐𝒓 𝟔𝟗
69 is the grade of
the student with 7
absences.
WINTERTemplate
Remarks:
 It is important to remember that the
values of a and b are only estimates of the
corresponding parameters of a and b.
 To justify the assumption of linearity, a
test for linearity of regression should be
performed.
 If there are two or more independent
variables, the regression equation becomes
𝑦 = 𝑏0 + 𝑏1 𝑥1+𝑏2 𝑥2 + ⋯ + 𝑏 𝑛 𝑥 𝑛
 The significance of the slope of the regression line is to determine if
the regression model is usable.
 If the slope is not equal to zero, then we can use the regression
model to predict the dependent variable for any value of the
independent variable.
 If the slope is equal to zero, we do not use the model to make
predictions.
The scatter plot amounts to determining whether or not the
slope of the line of the best fit is significantly different from a
horizontal line or not.
A horizontal line means there is no association between two
variables, that is 𝑟 = 0.
 In testing for significance in simple linear regression, the null
hypothesis is H0: 𝑏 = 0 and the alternative hypothesis is H1: 𝑏 ≠ 0
Significance Test in Simple Linear
Regression
0
0.2
0.4
0.6
0.8
1
1.2
0 1 2 3 4 5 6
y-axis
x-axis
𝒚 = 𝒂 + 𝒃𝒙
If 𝒃 = 𝟎
𝑦 = 1 + 0(1)
y = 1 + 0(2)
𝑦 = 1 + 0 3
𝑦 = 1 + 0 4
𝑦 = 1 + 0(5)
A horizontal line means there is no
association between two variables.
Slope of
Linear Regression
Significance Test in Simple Linear
Regression
The t-test is conducted for testing the significance of r to
determine if the relationship is not a zero correlation.
𝑡 = 𝑟
𝑛 − 2
1 − 𝑟2
Where:
𝑛 = 𝑠𝑎𝑚𝑝𝑙𝑒 𝑠𝑖𝑧𝑒
F
O
R
M
U
L
A
1
Significance Test in Simple Linear
Regression
The t-test is conducted for testing the significance of r to
determine if the relationship is not a zero correlation.
𝑡 =
𝑏
𝑆 𝑏
Where:
𝑆 𝑏 =
𝑠
Σ 𝒙− 𝒙 𝟐
is the estimated standard deviation of 𝑏.
𝑠 =
Σ 𝑦− 𝒚 2
𝑛−2
is the standard deviation of the 𝑦 values about
the regression line.
F
O
R
M
U
L
A
2
Example
Given are two sets of data on the number of customers
(in hundreds) and sales (in thousand of pesos) for a given
period of time from ten eateries. Find the equation of the
regression line which can predict the amount of sales
from the number of customers. Can we conclude that we
can use the model to make such a prediction?
Eatery 1 2 3 4 5 6 7 8 9 10
x 2 6 8 8 12 16 20 20 22 26
y 58 105 88 118 117 137 157 169 149 202
𝑥 𝑦 𝑥𝑦 𝑥2 𝑦2
2 58 116 4 3364
6 105 630 36 11025
8 88 704 64 7744
8 118 944 64 13924
12 117 1404 144 13689
16 137 2192 256 18769
20 157 3140 400 24649
20 169 3380 400 28561
22 149 3278 484 22201
26 202 5252 676 40804
Significance Test in Simple Linear
Regression
𝒕 = 𝒓
𝒏 − 𝟐
𝟏 − 𝒓 𝟐
𝑡 = 0.95
10 − 2
1 − 0.95 2
𝑡 = 0.95
8
1 − .90
𝑡 = 0.95
8
.097
𝒕 = 𝟖. 𝟔𝟐
Given: 𝑛 = 10
𝑟 = 0.950122955
𝑥 𝑦 𝑥𝑦 𝑥2 𝑦2
𝑦 = 60 + 5𝑥 𝒙 − 𝒙 𝟐 𝑦 − 𝑦 2
2 58 116 4 3364 70 144 144
6 105 630 36 11025 90 64 225
8 88 704 64 7744 100 36 144
8 118 944 64 13924 100 36 324
12 117 1404 144 13689 120 4 9
16 137 2192 256 18769 140 4 9
20 157 3140 400 24649 160 36 9
20 169 3380 400 28561 160 36 81
22 149 3278 484 22201 170 64 441
26 202 5252 676 40804 190 144 144
Significance Test in Simple Linear
Regression
Σ𝑥 = 140
Σ𝑦 = 1300
Σ𝑥𝑦 = 21040Σ𝑥2 = 2528
Σ𝑦2
= 184730
𝒙 − 𝒙
𝟐
= 568
𝑦 − 𝒚
2
= 1530𝒕 =
𝒃
𝑺 𝒃𝑆 𝑏 =
Σ 𝑦 − 𝒚 2
𝑛 − 2
Σ 𝒙 − 𝒙 𝟐
𝑆 𝑏 =
1530
8
568
𝑆 𝑏 = 0.5803
𝒕 =
𝟓
𝟎. 𝟓𝟖𝟎𝟑
𝒕 = 𝟖. 𝟔𝟐
Σ 𝒙 = 14
Since 8.62 is greater than 3.355, we
reject the H0 or accept the H1. Thus, the
obtained relationship is significant or is
non zero using .005 level.
We can conclude that we can use the
model to predict sales from population.
Decision:
COMPUTATION USING
MICROSOFT EXCEL
Pearson r
Slope b
Intercept a
Syntax
+pearson(array1,array2)
or
+correl(array1,array2)
+slope(known_y’s,known_x’s)
+intercept(known_y’s,known_x’s)
PEARSON r
SLOPE b INTERCEPT a
THANK YOU

More Related Content

What's hot

Regression Analysis - Thiyagu
Regression Analysis - ThiyaguRegression Analysis - Thiyagu
Regression Analysis - ThiyaguThiyagu K
 
Spearman rank correlation coefficient
Spearman rank correlation coefficientSpearman rank correlation coefficient
Spearman rank correlation coefficientKarishma Chaudhary
 
T test, independant sample, paired sample and anova
T test, independant sample, paired sample and anovaT test, independant sample, paired sample and anova
T test, independant sample, paired sample and anovaQasim Raza
 
Pearson Product Moment Correlation - Thiyagu
Pearson Product Moment Correlation - ThiyaguPearson Product Moment Correlation - Thiyagu
Pearson Product Moment Correlation - ThiyaguThiyagu K
 
Multiple linear regression
Multiple linear regressionMultiple linear regression
Multiple linear regressionKen Plummer
 
Spearman Rank Correlation Presentation
Spearman Rank Correlation PresentationSpearman Rank Correlation Presentation
Spearman Rank Correlation Presentationcae_021
 
Two-sample Hypothesis Tests
Two-sample Hypothesis Tests Two-sample Hypothesis Tests
Two-sample Hypothesis Tests mgbardossy
 
The spearman rank order correlation coefficient
The spearman rank order correlation coefficientThe spearman rank order correlation coefficient
The spearman rank order correlation coefficientRegent University
 
Multiple Linear Regression II and ANOVA I
Multiple Linear Regression II and ANOVA IMultiple Linear Regression II and ANOVA I
Multiple Linear Regression II and ANOVA IJames Neill
 
Correlation and regression analysis
Correlation and regression analysisCorrelation and regression analysis
Correlation and regression analysis_pem
 
Data Analysis with SPSS : One-way ANOVA
Data Analysis with SPSS : One-way ANOVAData Analysis with SPSS : One-way ANOVA
Data Analysis with SPSS : One-way ANOVADr Ali Yusob Md Zain
 
Partial correlation
Partial correlationPartial correlation
Partial correlationDwaitiRoy
 
Regression analysis ppt
Regression analysis pptRegression analysis ppt
Regression analysis pptElkana Rorio
 

What's hot (20)

Regression Analysis - Thiyagu
Regression Analysis - ThiyaguRegression Analysis - Thiyagu
Regression Analysis - Thiyagu
 
Spearman rank correlation coefficient
Spearman rank correlation coefficientSpearman rank correlation coefficient
Spearman rank correlation coefficient
 
T test, independant sample, paired sample and anova
T test, independant sample, paired sample and anovaT test, independant sample, paired sample and anova
T test, independant sample, paired sample and anova
 
Regression
RegressionRegression
Regression
 
Spearman Rank
Spearman RankSpearman Rank
Spearman Rank
 
Pearson Product Moment Correlation - Thiyagu
Pearson Product Moment Correlation - ThiyaguPearson Product Moment Correlation - Thiyagu
Pearson Product Moment Correlation - Thiyagu
 
Multiple linear regression
Multiple linear regressionMultiple linear regression
Multiple linear regression
 
Spearman Rank Correlation Presentation
Spearman Rank Correlation PresentationSpearman Rank Correlation Presentation
Spearman Rank Correlation Presentation
 
Two-sample Hypothesis Tests
Two-sample Hypothesis Tests Two-sample Hypothesis Tests
Two-sample Hypothesis Tests
 
Linear regression
Linear regressionLinear regression
Linear regression
 
The spearman rank order correlation coefficient
The spearman rank order correlation coefficientThe spearman rank order correlation coefficient
The spearman rank order correlation coefficient
 
Multiple Linear Regression II and ANOVA I
Multiple Linear Regression II and ANOVA IMultiple Linear Regression II and ANOVA I
Multiple Linear Regression II and ANOVA I
 
Logistic Regression Analysis
Logistic Regression AnalysisLogistic Regression Analysis
Logistic Regression Analysis
 
COVARIANCE IN PROBABILITY
COVARIANCE IN PROBABILITYCOVARIANCE IN PROBABILITY
COVARIANCE IN PROBABILITY
 
Correlation and regression analysis
Correlation and regression analysisCorrelation and regression analysis
Correlation and regression analysis
 
Data Analysis with SPSS : One-way ANOVA
Data Analysis with SPSS : One-way ANOVAData Analysis with SPSS : One-way ANOVA
Data Analysis with SPSS : One-way ANOVA
 
Partial correlation
Partial correlationPartial correlation
Partial correlation
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Regression analysis ppt
Regression analysis pptRegression analysis ppt
Regression analysis ppt
 
Correlation Analysis
Correlation AnalysisCorrelation Analysis
Correlation Analysis
 

Viewers also liked

Viewers also liked (20)

Regression Analysis
Regression AnalysisRegression Analysis
Regression Analysis
 
Data Science - Part IV - Regression Analysis & ANOVA
Data Science - Part IV - Regression Analysis & ANOVAData Science - Part IV - Regression Analysis & ANOVA
Data Science - Part IV - Regression Analysis & ANOVA
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Regression Analysis presentation by Al Arizmendez and Cathryn Lottier
Regression Analysis presentation by Al Arizmendez and Cathryn LottierRegression Analysis presentation by Al Arizmendez and Cathryn Lottier
Regression Analysis presentation by Al Arizmendez and Cathryn Lottier
 
Regression Analysis
Regression AnalysisRegression Analysis
Regression Analysis
 
Correlation analysis
Correlation analysisCorrelation analysis
Correlation analysis
 
Regression & correlation
Regression & correlationRegression & correlation
Regression & correlation
 
Linear Regression Using SPSS
Linear Regression Using SPSSLinear Regression Using SPSS
Linear Regression Using SPSS
 
Correlation & regression (2)
Correlation & regression (2)Correlation & regression (2)
Correlation & regression (2)
 
лекц 2 - дэд гарчиг 2
лекц 2 - дэд гарчиг 2лекц 2 - дэд гарчиг 2
лекц 2 - дэд гарчиг 2
 
Correlation & regression
Correlation & regression Correlation & regression
Correlation & regression
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Correlational research
Correlational research Correlational research
Correlational research
 
Statistics lecture 11 (chapter 11)
Statistics lecture 11 (chapter 11)Statistics lecture 11 (chapter 11)
Statistics lecture 11 (chapter 11)
 
Correlation VS Causation
Correlation VS CausationCorrelation VS Causation
Correlation VS Causation
 
regression and correlation
regression and correlationregression and correlation
regression and correlation
 
Statistics (recap)
Statistics (recap)Statistics (recap)
Statistics (recap)
 
13 ch ken black solution
13 ch ken black solution13 ch ken black solution
13 ch ken black solution
 
Chapter13
Chapter13Chapter13
Chapter13
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
 

Similar to Regression Analysis

Lesson 27 using statistical techniques in analyzing data
Lesson 27 using statistical techniques in analyzing dataLesson 27 using statistical techniques in analyzing data
Lesson 27 using statistical techniques in analyzing datamjlobetos
 
Module 2_ Regression Models..pptx
Module 2_ Regression Models..pptxModule 2_ Regression Models..pptx
Module 2_ Regression Models..pptxnikshaikh786
 
Introduction to correlation and regression analysis
Introduction to correlation and regression analysisIntroduction to correlation and regression analysis
Introduction to correlation and regression analysisFarzad Javidanrad
 
correlation and regression
correlation and regressioncorrelation and regression
correlation and regressionUnsa Shakir
 
simple linear regression - brief introduction
simple linear regression - brief introductionsimple linear regression - brief introduction
simple linear regression - brief introductionedinyoka
 
Regression analysis
Regression analysisRegression analysis
Regression analysisSrikant001p
 
Regression and corelation (Biostatistics)
Regression and corelation (Biostatistics)Regression and corelation (Biostatistics)
Regression and corelation (Biostatistics)Muhammadasif909
 
Simple Correlation : Karl Pearson’s Correlation co- efficient and Spearman’s ...
Simple Correlation : Karl Pearson’s Correlation co- efficient and Spearman’s ...Simple Correlation : Karl Pearson’s Correlation co- efficient and Spearman’s ...
Simple Correlation : Karl Pearson’s Correlation co- efficient and Spearman’s ...RekhaChoudhary24
 
correlationcoefficient-20090414 0531.pdf
correlationcoefficient-20090414 0531.pdfcorrelationcoefficient-20090414 0531.pdf
correlationcoefficient-20090414 0531.pdfDrAmanSaxena
 
Statistics-Regression analysis
Statistics-Regression analysisStatistics-Regression analysis
Statistics-Regression analysisRabin BK
 
Correlation by Neeraj Bhandari ( Surkhet.Nepal )
Correlation by Neeraj Bhandari ( Surkhet.Nepal )Correlation by Neeraj Bhandari ( Surkhet.Nepal )
Correlation by Neeraj Bhandari ( Surkhet.Nepal )Neeraj Bhandari
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regressionAbdelaziz Tayoun
 

Similar to Regression Analysis (20)

Lesson 27 using statistical techniques in analyzing data
Lesson 27 using statistical techniques in analyzing dataLesson 27 using statistical techniques in analyzing data
Lesson 27 using statistical techniques in analyzing data
 
Module 2_ Regression Models..pptx
Module 2_ Regression Models..pptxModule 2_ Regression Models..pptx
Module 2_ Regression Models..pptx
 
Regression.pptx
Regression.pptxRegression.pptx
Regression.pptx
 
Introduction to correlation and regression analysis
Introduction to correlation and regression analysisIntroduction to correlation and regression analysis
Introduction to correlation and regression analysis
 
Correlation
CorrelationCorrelation
Correlation
 
correlation and regression
correlation and regressioncorrelation and regression
correlation and regression
 
Correlation and Regression
Correlation and Regression Correlation and Regression
Correlation and Regression
 
simple linear regression - brief introduction
simple linear regression - brief introductionsimple linear regression - brief introduction
simple linear regression - brief introduction
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Regression and corelation (Biostatistics)
Regression and corelation (Biostatistics)Regression and corelation (Biostatistics)
Regression and corelation (Biostatistics)
 
Simple Correlation : Karl Pearson’s Correlation co- efficient and Spearman’s ...
Simple Correlation : Karl Pearson’s Correlation co- efficient and Spearman’s ...Simple Correlation : Karl Pearson’s Correlation co- efficient and Spearman’s ...
Simple Correlation : Karl Pearson’s Correlation co- efficient and Spearman’s ...
 
correlationcoefficient-20090414 0531.pdf
correlationcoefficient-20090414 0531.pdfcorrelationcoefficient-20090414 0531.pdf
correlationcoefficient-20090414 0531.pdf
 
33851.ppt
33851.ppt33851.ppt
33851.ppt
 
Course pack unit 5
Course pack unit 5Course pack unit 5
Course pack unit 5
 
Statistics-Regression analysis
Statistics-Regression analysisStatistics-Regression analysis
Statistics-Regression analysis
 
Correlation by Neeraj Bhandari ( Surkhet.Nepal )
Correlation by Neeraj Bhandari ( Surkhet.Nepal )Correlation by Neeraj Bhandari ( Surkhet.Nepal )
Correlation by Neeraj Bhandari ( Surkhet.Nepal )
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Simple Linear Regression.pptx
Simple Linear Regression.pptxSimple Linear Regression.pptx
Simple Linear Regression.pptx
 
Simple egression.pptx
Simple egression.pptxSimple egression.pptx
Simple egression.pptx
 

Recently uploaded

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 

Recently uploaded (20)

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 

Regression Analysis

  • 1. WINTERTemplate SUBJECT: BASIC AND INFERENTIAL STATISTICS REPORTER: SHIELA ROBETH B. VINARAO TOPIC: REGRESSION ANALYSIS PROFESSOR: DR. GLORIA T. MIANO REGRESSION ANALYSIS
  • 2. THE SIMPLE LINEAR REGESSION ANALYSIS The simple linear regression analysis is used when there is a significant relationship between 𝒙 and 𝒚 variables. This is used in predicting the value of a dependent variable 𝒚 given the value of the independent variable 𝒙. D E F I N I T I O N
  • 3. THE SIMPLE LINEAR REGESSION ANALYSIS Suppose the advertising cost 𝒙 and sales (𝒚) are correlated, then we can predict the future sales (𝒚) in terms of advertising cost (𝒙). Another type of problem which uses regression analysis is when variables corresponding to years are given, it is possible to predict the value of that variable several years hence or several years back. E X A M P L E
  • 4. THE SIMPLE LINEAR REGESSION ANALYSIS F O R M U L A 𝒚 = 𝒂 + 𝒃𝒙
  • 5. WINTERTemplate Example Consider the following data: 𝑥 𝑦 1 6 2 4 3 3 4 5 5 4 6 2 0 1 2 3 4 5 6 7 0 2 4 6 8 y-axis x-axis  Straight line indicates that the two variables are to some extent LINEARLY RELATED  The variable we are basing our predictions on is called the predictor variable and is referred to as 𝑥. When there is only one predictor variable, the prediction method is called 𝑠𝑖𝑚𝑝𝑙𝑒 𝑟𝑒𝑔𝑟𝑒𝑠𝑠𝑖𝑜𝑛.
  • 6. 𝒙 𝒚 𝒙𝑦 𝒙 𝟐 1 6 6 1 2 4 8 4 3 3 9 9 4 5 20 16 5 4 20 25 6 2 12 36 Σ𝑥 = 21 𝑥 = 3.5 Σ𝑦 = 24 𝒚 = 4 Σ𝑥𝑦 =75 Σ𝑥2 = 91 SIMPLE LINEAR REGESSION
  • 7. 𝒚 = 𝒂 + 𝒃𝒙 Σ𝑥 = 21 𝑥 = 3.5 Σ𝑦 = 24 𝒚 = 4 Σ𝑥𝑦 =75 𝒏 = 𝟔 Σ𝑥2 = 91 𝒃 = 𝒏 𝒙𝒚 − 𝒙 𝒚 𝒏 𝒙2 − 𝒙 2 = 6(75) − 21 24 6(91) − 21 2 = 450 − 504 546 − 441 = −54 105 𝒃 = −𝟎. 𝟓𝟏 𝒂 = 𝒚 − 𝒃 𝒙 = 4 − −0.51 3.5 = 4 − (−1.79) = 4 + 1.79 𝒂 = 𝟓. 𝟕𝟗 𝒚 = 𝟓. 𝟕𝟗 − 𝟎. 𝟓𝟏𝒙
  • 8. 05Example A study is conducted on the relationship of the number of absences (𝒙) and the grades (𝒚) of the students in English. Determine the relationship using the following data. Number of Absences 𝒙 Grades in English 𝒚 1 90 2 85 2 80 3 75 3 80 8 65 6 70 1 95 4 80 5 80 5 75 1 92 2 89 1 80 9 65
  • 9. Number of Absences 𝒙 Grades in English 𝒚 1 90 2 85 2 80 3 75 3 80 8 65 6 70 1 95 4 80 5 80 5 75 1 92 2 89 1 80 9 65 0 10 20 30 40 50 60 70 80 90 100 0 2 4 6 8 10 GradesinEnglish y Number of absences x Scatter Diagram
  • 10. WINTERTemplate Solving by the Stepwise Method Problem : Is there a significant relationship between the number of absences and the grades of 15 students in English class? Hypotheses : Level of significance : 𝜶 = 𝟎. 𝟎𝟓 𝑟. 05 = −5.14 There is no significant relationship between the number of absences and the grades of 15 students in English class. Ho: There is a significant relationship between the number of absences and the grades of 15 students in English class.H1: df = n – 2 = 15 – 2 = 13
  • 11. S T A T I S T I C S Pearson Product Moment Coefficient of Correlation 𝒓 𝒙 = 𝟓𝟑 𝒚 = 𝟏𝟐𝟎𝟏 𝒙 𝟐 = 281 𝒚 𝟐 = 𝟗7335 𝒙𝒚 = 3950 𝒏 = 𝟏𝟓 𝒙 = 𝟑. 𝟓𝟑 𝒚 = 𝟖𝟎. 𝟎𝟕
  • 12. 𝒓 = 𝟓𝟗𝟐𝟓𝟎 − 𝟔𝟑𝟔𝟓𝟑 𝟒𝟐𝟏𝟓 − 𝟐𝟖𝟎𝟗 𝟏𝟒𝟔𝟎𝟎𝟐𝟓 − 𝟏𝟒𝟒𝟐𝟒𝟎𝟏 𝒓 = 𝟏𝟓 𝟑𝟗𝟓𝟎 − 𝟓𝟑 𝟏𝟐𝟎𝟏 𝟏𝟓 𝟐𝟖𝟏 − 𝟓𝟑 𝟐 𝟏𝟓 𝟗𝟕, 𝟑𝟑𝟓 − 𝟏𝟐𝟎𝟏 𝟐 𝒓 = −𝟒𝟒𝟎𝟑 𝟏𝟒𝟎𝟔 𝟏𝟕𝟔𝟐𝟒 𝒓 = −𝟒𝟒𝟎𝟑 𝟐𝟒𝟕𝟕𝟗𝟑𝟒𝟒 𝒓 = −𝟒𝟒𝟎𝟑 𝟒𝟗𝟕𝟕. 𝟖𝟖 𝒓 = −𝟎. 𝟖𝟖
  • 13. The computed r value of −0.88 is beyond the critical value of −5.14 at 0.05 level of significance with 13 degrees of freedom, so the null hypothesis is rejected. This means that there is a significant relationship between the number of absences and the grades of students in English. Since the value of r is negative, it implies that students who had more absences had lower grades. Decision Rule : If the r computed value is greater than or beyond the critical value, reject Ho. Conclusion :
  • 14. Suppose we want to predict the grade (𝒚) of the student who has incurred 7 absences (𝒙). To get the value of x, the simple linear regression analysis will be used. 𝒚 = 𝒂 + 𝒃𝒙 𝒂 = 𝒚 − 𝒃 𝒙 = 80.07 − −3.13 3.53 = 80.07 – (−11.05) = 80.07 + 11.05 𝒂 = 𝟗𝟏. 𝟏𝟐 𝒃 = 𝒏 𝒙𝒚 − 𝒙 𝒚 𝒏 𝒙2 − 𝒙 2 = 15 3950 − 53 1201 15 281 − 53 2 = 59250 − 63653 4215 − 2809 = −4403 1406 𝒃 = −𝟑. 𝟏𝟑 = 91.12 + −3.13 𝒙 = 91.12 − 3.13 𝟕 = 91.12 − 21.91 = 𝟔𝟗. 𝟐𝟏 𝒐𝒓 𝟔𝟗 69 is the grade of the student with 7 absences.
  • 15. WINTERTemplate Remarks:  It is important to remember that the values of a and b are only estimates of the corresponding parameters of a and b.  To justify the assumption of linearity, a test for linearity of regression should be performed.  If there are two or more independent variables, the regression equation becomes 𝑦 = 𝑏0 + 𝑏1 𝑥1+𝑏2 𝑥2 + ⋯ + 𝑏 𝑛 𝑥 𝑛
  • 16.  The significance of the slope of the regression line is to determine if the regression model is usable.  If the slope is not equal to zero, then we can use the regression model to predict the dependent variable for any value of the independent variable.  If the slope is equal to zero, we do not use the model to make predictions. The scatter plot amounts to determining whether or not the slope of the line of the best fit is significantly different from a horizontal line or not. A horizontal line means there is no association between two variables, that is 𝑟 = 0.  In testing for significance in simple linear regression, the null hypothesis is H0: 𝑏 = 0 and the alternative hypothesis is H1: 𝑏 ≠ 0 Significance Test in Simple Linear Regression
  • 17. 0 0.2 0.4 0.6 0.8 1 1.2 0 1 2 3 4 5 6 y-axis x-axis 𝒚 = 𝒂 + 𝒃𝒙 If 𝒃 = 𝟎 𝑦 = 1 + 0(1) y = 1 + 0(2) 𝑦 = 1 + 0 3 𝑦 = 1 + 0 4 𝑦 = 1 + 0(5) A horizontal line means there is no association between two variables. Slope of Linear Regression
  • 18. Significance Test in Simple Linear Regression The t-test is conducted for testing the significance of r to determine if the relationship is not a zero correlation. 𝑡 = 𝑟 𝑛 − 2 1 − 𝑟2 Where: 𝑛 = 𝑠𝑎𝑚𝑝𝑙𝑒 𝑠𝑖𝑧𝑒 F O R M U L A 1
  • 19. Significance Test in Simple Linear Regression The t-test is conducted for testing the significance of r to determine if the relationship is not a zero correlation. 𝑡 = 𝑏 𝑆 𝑏 Where: 𝑆 𝑏 = 𝑠 Σ 𝒙− 𝒙 𝟐 is the estimated standard deviation of 𝑏. 𝑠 = Σ 𝑦− 𝒚 2 𝑛−2 is the standard deviation of the 𝑦 values about the regression line. F O R M U L A 2
  • 20. Example Given are two sets of data on the number of customers (in hundreds) and sales (in thousand of pesos) for a given period of time from ten eateries. Find the equation of the regression line which can predict the amount of sales from the number of customers. Can we conclude that we can use the model to make such a prediction? Eatery 1 2 3 4 5 6 7 8 9 10 x 2 6 8 8 12 16 20 20 22 26 y 58 105 88 118 117 137 157 169 149 202
  • 21. 𝑥 𝑦 𝑥𝑦 𝑥2 𝑦2 2 58 116 4 3364 6 105 630 36 11025 8 88 704 64 7744 8 118 944 64 13924 12 117 1404 144 13689 16 137 2192 256 18769 20 157 3140 400 24649 20 169 3380 400 28561 22 149 3278 484 22201 26 202 5252 676 40804 Significance Test in Simple Linear Regression 𝒕 = 𝒓 𝒏 − 𝟐 𝟏 − 𝒓 𝟐 𝑡 = 0.95 10 − 2 1 − 0.95 2 𝑡 = 0.95 8 1 − .90 𝑡 = 0.95 8 .097 𝒕 = 𝟖. 𝟔𝟐 Given: 𝑛 = 10 𝑟 = 0.950122955
  • 22. 𝑥 𝑦 𝑥𝑦 𝑥2 𝑦2 𝑦 = 60 + 5𝑥 𝒙 − 𝒙 𝟐 𝑦 − 𝑦 2 2 58 116 4 3364 70 144 144 6 105 630 36 11025 90 64 225 8 88 704 64 7744 100 36 144 8 118 944 64 13924 100 36 324 12 117 1404 144 13689 120 4 9 16 137 2192 256 18769 140 4 9 20 157 3140 400 24649 160 36 9 20 169 3380 400 28561 160 36 81 22 149 3278 484 22201 170 64 441 26 202 5252 676 40804 190 144 144 Significance Test in Simple Linear Regression Σ𝑥 = 140 Σ𝑦 = 1300 Σ𝑥𝑦 = 21040Σ𝑥2 = 2528 Σ𝑦2 = 184730 𝒙 − 𝒙 𝟐 = 568 𝑦 − 𝒚 2 = 1530𝒕 = 𝒃 𝑺 𝒃𝑆 𝑏 = Σ 𝑦 − 𝒚 2 𝑛 − 2 Σ 𝒙 − 𝒙 𝟐 𝑆 𝑏 = 1530 8 568 𝑆 𝑏 = 0.5803 𝒕 = 𝟓 𝟎. 𝟓𝟖𝟎𝟑 𝒕 = 𝟖. 𝟔𝟐 Σ 𝒙 = 14
  • 23. Since 8.62 is greater than 3.355, we reject the H0 or accept the H1. Thus, the obtained relationship is significant or is non zero using .005 level. We can conclude that we can use the model to predict sales from population. Decision:
  • 24. COMPUTATION USING MICROSOFT EXCEL Pearson r Slope b Intercept a Syntax +pearson(array1,array2) or +correl(array1,array2) +slope(known_y’s,known_x’s) +intercept(known_y’s,known_x’s)