Topic04 - Simple Linear Regression
Topic04 - Simple Linear Regression
Topic04 - Simple Linear Regression
1
𝑏𝑏0 = 𝑛𝑛 (∑ 𝑌𝑌𝑖𝑖 − 𝑏𝑏1 ∑ 𝑋𝑋𝑖𝑖 ) OR 𝑏𝑏0 = 𝑌𝑌� − 𝑏𝑏1 𝑋𝑋�
The deviations 𝑋𝑋𝑖𝑖 − 𝑋𝑋� and 𝑌𝑌𝑖𝑖 − 𝑌𝑌� or the errors of the prediction are the vertical distances
between observed and predicted values.
It is possible to find many lines for which the value sum of errors is equal to 0, or there is
one line for the value sum of square errors is a minimum where
𝑛𝑛 𝑛𝑛
Example 1 :
A study was conducted about the age and weight from eight BWK year 2 students in UTHM.
The data of the age and the weight was shown below.
Sample Age (years) Weight (kg)
1 20 50
2 21 51
3 22 55
4 21 60
5 22 72
6 20 48
7 20 48
8 21 49
b) Find the value of 𝑏𝑏0 and 𝑏𝑏1 and construct the regression model.
b) Find the value of 𝑏𝑏0 and 𝑏𝑏1 and construct the regression model.
c) Predict the value of test score if the student is attended the class 8 times only.
d) Construct the regression model and find the coefficient of determination 𝑟𝑟 2 . Find the
value of sales if the market spent RM65,000 for advertising.
Example 4 :
b) Find 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 . Then, test the appropriateness of the regression model for monthly sales
from the market area Pagoh.
The output from excel shows the result from ANOVA Table.
b) Test the appropriateness of the regression model about salaries in the company.