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

Presentation on regression analysis
Presentation on regression analysisPresentation on regression analysis
Presentation on regression analysisSujeet Singh
 
Linear Equations
Linear EquationsLinear Equations
Linear Equationsrfant
 
Measures of central tendency
Measures of central tendencyMeasures of central tendency
Measures of central tendencyChie Pegollo
 
Probability Distributions
Probability DistributionsProbability Distributions
Probability DistributionsCIToolkit
 
Estimating population mean
Estimating population meanEstimating population mean
Estimating population meanRonaldo Cabardo
 
Applications of regression analysis - Measurement of validity of relationship
Applications of regression analysis - Measurement of validity of relationshipApplications of regression analysis - Measurement of validity of relationship
Applications of regression analysis - Measurement of validity of relationshipRithish Kumar
 
Regression analysis by akanksha Bali
Regression analysis by akanksha BaliRegression analysis by akanksha Bali
Regression analysis by akanksha BaliAkanksha Bali
 
Graphs of polynomial functions
Graphs of polynomial functionsGraphs of polynomial functions
Graphs of polynomial functionsCarlos Erepol
 
Non Linear Equation
Non Linear EquationNon Linear Equation
Non Linear EquationMdAlAmin187
 
Quartile in Statistics
Quartile in StatisticsQuartile in Statistics
Quartile in StatisticsHennaAnsari
 
Simple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepSimple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepDan Wellisch
 
Linear Regression Using SPSS
Linear Regression Using SPSSLinear Regression Using SPSS
Linear Regression Using SPSSDr Athar Khan
 
Stability of Differential Equations
Stability of Differential EquationsStability of Differential Equations
Stability of Differential EquationsAbdullahMdSaifee
 

What's hot (20)

Presentation on regression analysis
Presentation on regression analysisPresentation on regression analysis
Presentation on regression analysis
 
Linear Equations
Linear EquationsLinear Equations
Linear Equations
 
Measures of central tendency
Measures of central tendencyMeasures of central tendency
Measures of central tendency
 
Probability Distributions
Probability DistributionsProbability Distributions
Probability Distributions
 
Simple linear regression
Simple linear regressionSimple linear regression
Simple linear regression
 
Estimating population mean
Estimating population meanEstimating population mean
Estimating population mean
 
Applications of regression analysis - Measurement of validity of relationship
Applications of regression analysis - Measurement of validity of relationshipApplications of regression analysis - Measurement of validity of relationship
Applications of regression analysis - Measurement of validity of relationship
 
Regression analysis by akanksha Bali
Regression analysis by akanksha BaliRegression analysis by akanksha Bali
Regression analysis by akanksha Bali
 
T distribution
T distributionT distribution
T distribution
 
Graphs of polynomial functions
Graphs of polynomial functionsGraphs of polynomial functions
Graphs of polynomial functions
 
Non Linear Equation
Non Linear EquationNon Linear Equation
Non Linear Equation
 
Measures of variability
Measures of variabilityMeasures of variability
Measures of variability
 
Quartile in Statistics
Quartile in StatisticsQuartile in Statistics
Quartile in Statistics
 
Basic Concepts of Probability
Basic Concepts of ProbabilityBasic Concepts of Probability
Basic Concepts of Probability
 
Simple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepSimple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-Step
 
Normal Curve
Normal CurveNormal Curve
Normal Curve
 
Linear Regression Using SPSS
Linear Regression Using SPSSLinear Regression Using SPSS
Linear Regression Using SPSS
 
Stability of Differential Equations
Stability of Differential EquationsStability of Differential Equations
Stability of Differential Equations
 
Matrix
MatrixMatrix
Matrix
 
Discrete and Continuous Random Variables
Discrete and Continuous Random VariablesDiscrete and Continuous Random Variables
Discrete and Continuous Random Variables
 

Viewers also liked (20)

Regression Analysis
Regression AnalysisRegression Analysis
Regression Analysis
 
Regression analysis ppt
Regression analysis pptRegression analysis ppt
Regression analysis ppt
 
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
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
 
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
 

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

Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 

Recently uploaded (20)

Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 

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)