0% found this document useful (0 votes)
6 views

Module 10_MS102

Uploaded by

harleytiongson
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)
6 views

Module 10_MS102

Uploaded by

harleytiongson
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/ 18

Module 10:

SIMPLE LINEAR REGRESSION


At the end of this module, students are expected to :
❑ to explain the significance of regression analysis in predicting the value
of dependent variable based on an independent variable;

❑ to explain what is the slope and intercept of the model; and

❑ to understand the underlying assumptions before conducting simple


linear regression.
What is Simple Linear Regression Analysis?
Regression is a term used to describe the process of estimating the
relationship between two variables. The relationship is estimated by fitting a
straight line through the given data. The method of least squares permits us to
find a line of best fit called regression line which keeps the errors of prediction
to a minimum.

Example :
A study is interested on the numerical grade of BS IT students in MS 101 a.k.a.
Discrete Mathematics and MS 102 a.k.a. Quantitative Methods. There are claims that the
grade in MS 101 of students is related to the students’ grade in MS 102. If we want to
predict the dependent variable (say, numerical grade in MS 102) from their numerical
grade in MS 101 (independent variable), the common method is to fit a particular model.
Two Main Objectives

❑ Establish if there is a relationship between two variables.


-More specifically, establish if there is a statistically significant relationship
between the two.
Examples : Income and spending , wage and gender , time spent in
studying and exam scores.

❑ Forecast new observations.


-Can we use what we know about the relationship to forecast unobserved
values?
Examples: What will our sales be over the next quarter?
Predicting a Student’s Exam Score Based on Study Hours
Variable’s Roles
Dependent Variable Dependent Variable

• This is the variable whose values we • This is the variable that


want to explain or forecast. explains the other
• Its values depend on something else. • Its values are independent.
• We denote it as 𝒚. • We denote it as 𝒙 .
A Linear Equation
• You may remember one of these :
𝑦 = 𝑎 + 𝑏𝑥
𝑦 = 𝑚𝑥 + 𝑏

• In stats world, we use a different notation:


𝑦 = 𝛽0 + 𝛽1 𝑥

We call it “linear” because the equation represents a straight line in a bi-


dimensional plot.
Linear Equation Example:

𝑦 = 𝛽0 + 𝛽1 𝑥

𝑦 = 4 + 2𝑥
𝜷𝟏

𝜷𝟎
What happens if we change the intercept?

𝑦 = 𝛽0 + 𝛽1 𝑥

𝑦 = 4 + 2𝑥
𝑦 = 9 + 2𝑥
𝑦 = −2 + 2𝑥

Note :
If we increase the y-intercept:
The line shifts upward on the graph,
moving further away from the origin while
remaining parallel to the original line.

If we decrease the y-intercept: The line


shifts downward, moving closer to or further
below the origin, again remaining parallel to
the original line.
What happens if we change the slope?

𝑦 = 𝛽0 + 𝛽1 𝑥
𝑦 = 4 + 2𝑥
𝑦 = 4 + 5𝑥
𝑦 = 4 + 0𝑥
𝑦 = 4 − 3𝑥
The slope of a linear graph 𝛽1 determines the steepness and direction of the line. Changing the slope
has the following effects:

1. Steepness (Inclination)
•Increase in the slope (𝛽1 ): The line becomes steeper, rising more rapidly as 𝑥 increases.
•Decrease in the slope (𝛽1 ): The line becomes less steep, rising more gradually as 𝑥 increases.

2. Direction of the Line


•If the slope is positive (𝛽1 >0): The line slants upward from left to right. Increasing mmm makes it
steeper, and decreasing mmm makes it flatter.
•If the slope is negative (𝛽1 <0 ): The line slants downward from left to right. A larger negative value
(e.g., from −2 to −5 ) makes the decline steeper, while a smaller negative value (e.g., from −5 to
−2) makes the decline flatter.
•If the slope is zero (𝛽1 =0 ): The line becomes horizontal.
But the world is not linear!

𝑦 = 4 + 2𝑥

True Values

The regression line shows how changes in the independent variable (𝑥) are associated with
changes in the dependent variable (𝑦).
The regression line helps to identify and quantify the relationship between two variables (e.g., whether there is a
positive, negative, or no correlation between them).
Example : Test scores of nine (9) students in Trigonometry and Geometry are given
below

a. Draw a scatter diagram


b. Find the regression line equation
c. Predict the score in Geometry (𝑦) if the score in Trigonometry (𝑥) of
the student is 57.
Solution

a. Draw a scatter plot. If the scatter plot does not show any (linear) trend stop analysis, conclude “no
relationship”. Otherwise proceed to step number 2.

The scatter plot indicates an upward linear trend between the Trigonometry grade and Geometry grade .
Thus, “there is a reason to believe that they are related.”
Formulate the regression line equation by
2. Find the regression line equation
solving first the value of the variables 𝑏1 and 𝑏0 .

𝑁 σ 𝑥𝑦 − σ 𝑥 σ 𝑦
Work on the worksheet table. 𝑏1 =
𝑁 σ 𝑥2 − σ 𝑥 2

(9) 16860 − (386)(380)


𝑏1 = 2
= 𝟏. 𝟏𝟐
9 17058 − (386)
Solving for 𝒃𝟎 .
𝑏0 = 𝑦ത − 𝑏1 𝑥ҧ
𝑏0 = 42.22 − 1.12 42.80
= −5.82

Substitute the computed values of 𝑏1 and 𝑏0 to the


regression line equation.
𝑦 = 𝑏0 + 𝑏1 𝑥
𝒚 = −𝟓. 𝟖𝟐 + 𝟏. 𝟏𝟐𝒙
c. We can now estimate scores in Geometry (𝑦) using the regression line equation by
substituting a value or score in Trigonometry (𝑥). Say for instance, if 𝑥 is equal to 57, then
solving for 𝑦 will give a 58.02.

𝑦 = −5.82 + 1.12 𝑥
𝑦 = −5.82 + 1.12 57

𝒚 = 𝟓𝟖. 𝟎𝟐

Therefore, the estimated score in Geometry is 58.02 or approximately equivalent to 58 if


the score in Trigonometry is 57. The regression line equation may be used now in estimating
scores for y by substituting a value of x.
Seatwork # 6

Name : Lastname, Firstname M.I Score : ________________________


Year and Section : __________________________ Date : _______________________

The Grade of Students who took MS101 and MS102 from the previous Academic Year

Student No. 1 2 3 4 5 6 7 8 9 10
MS 101 Grade 78 81 93 91 76 82 75 88 84 78
MS 102 Grade 80 82 94 93 79 83 75 90 86 79

a. Draw the scatter diagram.


b. Find the regression line equation.
d. What is the predicted value of 𝑦 if 𝑥 are 77 and 90 .

You might also like