Applied Statistics for Business (MAS202)
CHAPTER XIII: Simple linear regression
Example: Which data pairs are dependent/ independent ?
(biแปu ฤแป phรขn tรกn)
CHAPTER XIII: Simple linear regression
Relationship between two variables
โ> Linear relation is the simplest,
efficient model in explaining
the dependence of Y on X
Tฦฐฦกng quan
tuyแบฟn tรญnh
Tฦฐฦกng quan
phi tuyแบฟn tรญnh
Khรดng xรกc ฤแปnh
CHAPTER XIII: Simple linear regression
AIM:
We use simple linear regression analysis to:
CHAPTER XIII: Simple linear regression
SAMPLE LINEAR REGRESSION LINE (PREDICTION LINE)
X: independent variable Y: dependent variable
The linear regression line
where
CHAPTER XIII: Simple linear regression
How to compute bโ, bโ?
Assume: (Xโ, Yโ), (Xโ, Yโ),...., (Xn, Yn) be a sample pairs of data , sample means
the sample linear regression line is
where:
CHAPTER XIII: Simple linear regression
Example 1: Does studying hard implies high grades?
The following table show the grades of 5 students and their number of study hours per week
variable?
for the sample
20 hours/week studying
Grades( /10) | study hours |
4 | 10 |
5 | 8 |
8 | 12 |
9 | 10 |
7 | 15 |
CHAPTER XIII: Simple linear regression
Exercise:
CHAPTER XIII: Simple linear regression
NOTE:
Example: Re-consider Example 1:
CHAPTER XIII: Simple linear regression
EXCEL package:
bโ
bโ
CHAPTER XIII: Simple linear regression
QUESTION: Are the predicted values correct ? How to estimate the errors ?
โ--> Consider the MEASURES OF VARIATION !
CHAPTER XIII: Simple linear regression
2. Measures of Variation SUMS OF SQUARES
Assume: (Xโ, Yโ), (Xโ, Yโ),...., (Xn, Yn) be a sample pairs of data , sample means
Error sum of squares (unexplained variation)
Regression sum of squares (explained variation):
Total sum of squares (total variation):
Measures the variation of the Yi values around their mean Y.
Variation attributed to the relationship between X and Y.
Variation in Y attributed to factors other than X.
CHAPTER XIII: Simple linear regression
2. Measures of Variation SUMS OF SQUARES
CHAPTER XIII: Simple linear regression
2. Measures of Variation SUMS OF SQUARES
EXCEL package: SST= 17,2; SSR= 2,28; SSE= 14,9
Question: Find the percentage of total variation that can
be explained by the variable X? Answer: SSR/SST *100%= 13,31%
CHAPTER XIII: Simple linear regression
2. Measures of Variation COEFFICIENT OF DETERMINATION & CORRELATION
NOTE:
- 0 โค rยฒ โค 1
- rยฒ measures the proportion of the total variation of Y which can be
explained by the factor X
Coefficient of determination:
CHAPTER XIII: Simple linear regression
2. Measures of Variation COEFFICIENT OF DETERMINATION & CORRELATION
CHAPTER XIII: Simple linear regression
2. Measures of Variation COEFFICIENT OF DETERMINATION & CORRELATION
Example: Re-consider Example 1, find the coefficient of determination. Explain the result.
CHAPTER XIII: Simple linear regression
2. Measures of Variation COEFFICIENT OF DETERMINATION & CORRELATION
EXCEL package:
CHAPTER XIII: Simple linear regression
2. Measures of Variation COEFFICIENT OF DETERMINATION & CORRELATION
EXCEL package:
CHAPTER XIII: Simple linear regression
3. The residual analysis
Assume that (Xโ, Yโ), (Xโ, Yโ),...., (Xn, Yn) is a sample of n- observations in pairs.
โ--> The residuals are eโ, eโ, โฆ, en
NOTE:
CHAPTER XIII: Simple linear regression
3. The residual analysis
EXCEL package:
Grades( /10) | study hours |
4 | 10 |
5 | 8 |
8 | 12 |
9 | 10 |
7 | 15 |
CHAPTER XIII: Simple linear regression
3. The residual analysis
4 ASSUMPTIONS ON THE RESIDUALS: L.I.N.E
CHAPTER XIII: Simple linear regression
3. The residual analysis
NOTE: EXCEL can help to create a residual plot/normal probability plot for the residuals of a data set
horizontal straight line shape
โ-> reasonable to use the linear model!
normal errors will approximately display in
a straight line.
CHAPTER XIII: Simple linear regression
4 . Hypothesis Testing for the slope & correlation
The linear regression line for the population is unknown:
The random error is
CHAPTER XIII: Simple linear regression
4 . Hypothesis Testing for the slope & correlation
Note: The random error ๐ has the estimated (sample) standard deviation
called standard error of the estimate
CHAPTER XIII: Simple linear regression
4 . Hypothesis Testing for the slope & correlation
EXCEL package:
CHAPTER XIII: Simple linear regression
4 . Hypothesis Testing for the slope (hแป sแป gรณc) & correlation (hแป sแป tฦฐฦกng quan)
2 different ways to test for the slope ๐ฝโ
T- test with df= n-2
F- test (only for zero slope)
CHAPTER XIII: Simple linear regression
4 . Hypothesis Testing for the slope & correlation
First way: t- test, df= n-2
The estimated standard
deviation of ๐ฝโ is:
where
SYX: standard error of the estimate
CHAPTER XIII: Simple linear regression
4 . Hypothesis Testing for the slope & correlation
First way: t- test, df= n-2
CHAPTER XIII: Simple linear regression
4 . Hypothesis Testing for the slope & correlation
Example: Test whether ๐ฝโ= 0.2 at 5% significance level
CHAPTER XIII: Simple linear regression
4 . Hypothesis Testing for the slope & correlation
Second way: F- test for zero slope
Reject Hโ when FSTAT > F๐ผ
If Reject Hโโ-> significant linear relationship
If not reject Hโโ> the linear relationship
is not significant
CHAPTER XIII: Simple linear regression
4 . Hypothesis Testing for the slope & correlation
EXCEL package
CHAPTER XIII: Simple linear regression
4 . Hypothesis Testing for the slope & correlation
Example: Use F-test to test for significant linear relationship. Use ๐ผ=0.05
CHAPTER XIII: Simple linear regression
4 . Hypothesis Testing for the slope & correlation
T- test for zero correlation Coefficient (or significant regression model)
๐: population correlation coefficient
r: estimated (sample) correlation for ๐
CHAPTER XIII: Simple linear regression
4 . Hypothesis Testing for the slope & correlation
T- test for zero correlation Coefficient (or significant regression model)
Example 1: You want to explore the relationship between the grades students receive on their first two exams. For a sample of 25 students, you find a correlation of 0.45.
What is your conclusion in testing ๐ปโ:๐=0 versus ๐ปโ:๐โ 0 at significant level ฮฑ=0.05.
CHAPTER XIII: Simple linear regression
QUIZ
1.
CHAPTER XIII: Simple linear regression
2.
CHAPTER XIII: Simple linear regression
3.
CHAPTER XIII: Simple linear regression
4.
CHAPTER XIII: Simple linear regression
5.
CHAPTER XIII: Simple linear regression
6.
CHAPTER XIII: Simple linear regression
CHAPTER XIII: Simple linear regression
7.
CHAPTER XIII: Simple linear regression
8.
CHAPTER XIII: Simple linear regression
CHAPTER XIII: Simple linear regression
9.
CHAPTER XIII: Simple linear regression
10.
CHAPTER XIII: Simple linear regression
CHAPTER XIII: Simple linear regression
11.
CHAPTER XIII: Simple linear regression
12.
CHAPTER XIII: Simple linear regression
13.
CHAPTER XIII: Simple linear regression
14.