Statistics and Probability q4 Mod21 Calculating The Slope and Y Intercept of A Regression Line V2
Statistics and Probability q4 Mod21 Calculating The Slope and Y Intercept of A Regression Line V2
Probability
Quarter 4 – Module 21:
Calculating the Slope and
Y-Intercept of a Regression Line
Republic Act 8293, section 176 states that: No copyright shall subsist in any work of
the Government of the Philippines. However, prior approval of the government agency or office
wherein the work is created shall be necessary for exploitation of such work for profit. Such
agency or office may, among other things, impose as a condition the payment of royalties.
Borrowed materials (i.e., songs, stories, poems, pictures, photos, brand names,
trademarks, etc.) included in this module are owned by their respective copyright holders.
Every effort has been exerted to locate and seek permission to use these materials from their
respective copyright owners. The publisher and authors do not represent nor claim ownership
over them.
Office Address: Gate 2 Karangalan Village, Brgy. San Isidro, Cainta, Rizal
Telefax: 02-8682-5773/8684-4914/8647-7487
E-mail Address: [email protected]
Statistics and
Probability
Quarter 4 – Module 21:
Calculating the Slope and
Y-Intercept of a Regression Line
Introductory Message
This Self-Learning Module (SLM) is prepared so that you, our dear learners,
can continue your studies and learn while at home. Activities, questions, directions,
exercises, and discussions are carefully stated for you to understand each lesson.
Each SLM is composed of different parts. Each part shall guide you step-by-
step as you discover and understand the lesson prepared for you.
In addition to the material in the main text, Notes to the Teacher are also
provided to our facilitators and parents for strategies and reminders on how they can
best help you on your home-based learning.
Please use this module with care. Do not put unnecessary marks on any part
of this SLM. Use a separate sheet of paper in answering the exercises and tests. And
read the instructions carefully before performing each task.
If you have any questions in using this SLM or any difficulty in answering the
tasks in this module, do not hesitate to consult your teacher or facilitator.
Thank you.
What I Need to Know
In the previous modules, you’ve learned about independent and dependent variables
and how these variables are related. You also learned about scatter plots that can
help you better understand statistical data. Furthermore, you calculated correlation
coefficient and analyzed existing relationships between variables.
This module will introduce you to concepts about regression analysis and the
regression line. Also, you will master calculating the slope and y-intercept of the
regression line as well as using the computed values to create a regression equation.
Later, you will interpret the calculated slope and y-intercept of the regression line.
Before you proceed to the lesson, make sure to answer first the questions in the next
page (What I Know).
Choose the letter of the best answer. Write the chosen letter on a separate sheet of
paper.
1. Which straight line is used to predict the value of y (dependent variable) for a
given value of x (independent variable)?
a. approximation point c. regression form
b. approximation line d. regression line
3. What indicates the location where the regression line intersects the y-axis?
a. domain c. slope
b. range d. y-intercept
x 1 2 3 4 5 6 7
y 4 5 1 6 7 10 7
13. What is the slope (b) of the regression equation based on the data above?
a. 0.89 b. 1.37 c. 1.98 d. 2.14
14. What is the y-intercept (a) of the regression equation based on the given data
set?
a. 0.89 b. 1.37 c. 1.98 d. 2.14
15. What is the equation of the regression line based on the given data?
a. 𝑦̂ = 2.14 + 0.89𝑥 c. 𝑦̂ = 2.14 − 0.89𝑥
b. 𝑦̂ = 0.89 + 2.14𝑥 d. 𝑦̂ = 0.89 − 2.14𝑥
In this module, you will start to explore and learn about regression analysis. First,
you need to recall important terms related to regression analysis by answering the
next activity.
What’s In
Jumbled Letters
Based on the given definition, rearrange the letters to form the correct word. Write
your answers on a separate sheet of paper.
1. L S P O E
Shows the steepness of a line and represents the rate of change in
y as x changes
2. R E E I T T N P C
A point where the line crosses or intersects the horizontal or vertical axis
3. N E R A L I
A type of regression that finds the best-fit line to represent a bivariate
data set
4. A N D M I O
The x-values which represent the independent variable
5. Q A E N O I T U
The algebraic expression of a regression line
Now, you will learn how to calculate the slope and y-intercept of the regression line.
Start your progress by answering the next activity.
Read the given situation, follow the instructions, and fill in the missing values. Then,
answer the guide questions that follow.
Number of General
A teacher believes that excellence is a Absences (x) Average (y)
fruit of hard work and persistence. 1 1 98
That’s why she wants to prove if the 2 2 90
number of students’ absences is 3 3 86
related to their general average. On 4 5 87
her gathered data, the recorded 5 7 85
number of absences and general 6 9 85
average in the recent semester are 7 10 78
shown on the table.
The teacher decided to use linear equations to describe the relationship of the
two variables. She wants to see if two pairs of points will result in the same or
approximately the same equations since the points came from a similar set of data.
For the two pairs of data, she used the absences and general average of Students 1
and 7 and Students 1 and 4, respectively. Her computations were as follows:
Step 1. Using the given data as points, find the slope (𝑚) using algebraic
method.
Use the points (1, 98) and (10, 78). Use the points (1, 98) and (5, 87).
𝑦2 − 𝑦1 𝑦2 − 𝑦1
𝑚= 𝑚=
𝑥2 − 𝑥1 𝑥2 − 𝑥1
78 − 98 ____ − 98
𝑚= 𝑚=
10 − 1 ____ − 1
−20
𝑚= 𝑚=
9
𝑚 = −2.22 𝑚 = _____
Name Focus
Botany Plants
Zoology Animals
Anatomy structure of living things
Taxonomy classification of living things
Cytology cells, their structure and
functions
Step 2. Find the y-intercept using the slope (𝑚), the point (1, 98), and the
slope-intercept form of a line (𝑦 = 𝑚𝑥 + 𝑏).
𝑦 = 𝑚𝑥 + 𝑏 98 = 𝑚𝑥 + 𝑏
98 = (−2.22)(1) + 𝑏 98 = (_______)(1) + 𝑏
98 = −2.22 + 𝑏 98 = ________ + 𝑏
𝑏 = 98 + 2.22 𝑏 = 98 + _________
𝑏 = 100.22 𝑏 = ___________
Step 3. Write the equation of the line. Substitute the value of 𝑚 and the
value of 𝑏 in 𝑦 = 𝑚𝑥 + 𝑏.
𝑦 = −2.22𝑥 + 100.22 𝑦 = ________𝑥 + _______
Guide Questions:
1. Compare the slope solved using the points (1, 98) and (10, 78) with the slope
solved using (1, 98) and (5, 87). Are the two slopes equal?
2. Compare the y-intercept solved using the points (1, 98) and (10, 78) with the y-
intercept solved using the points (1, 98) and (5, 87). Are the computed y-intercepts
equal?
4. Do you think the teacher can describe the relationship of the given variables using
the two equations he just computed? Why?
In the previous activity, unequal slopes and y-intercepts are solved because two
different pairs of points are used. Since the slopes and y-intercepts are unequal, two
different equations are obtained using the algebraic method.
Whenever there are more than two points of data, it is usually impossible to find one
line that passes through all points. However, a best-fit line that is a good
approximation of the data can usually be found. This best-fit straight line used to
predict the value of y for a given value of x is called the regression line.
For statistics, there is a simpler way to find the equation of the best-fit line. The
equation of the best-fit line is also called equation of the regression line or simply
regression equation.
Examples:
a. 𝑦̂ = 2𝑥 + 3 𝑏 = 2; 𝑎 = 3; The slope is 2 and y-intercept is 3.
𝑥 1 1
b. 𝑦̂ = − 1 𝑏 = ; 𝑎 = −1; The slope is and y-intercept is -1.
2 2 2
As shown in the activity, the slope and y-intercept can be easily determined
from the equation of a regression line.
In real life, however, students need to calculate the slope and y-intercept from
the raw data. The y-intercept and slope can be solved using the step-by-step solution
and formulas for finding the slope and y-intercept.
The steps in calculating the slope and y-intercept from a given set of data are
the following:
Step 1: Make a data table with four columns (x, y, xy, and x2). Note the sample size,
n.
Step 2: List the data for x and y. Multiply x and y to get xy. Square x to get x2.
Complete the table.
Step 3: Find the sum of x, y, xy, and x2 by adding the values in each column.
𝑛(∑𝑥𝑦) − (∑𝑥)(∑𝑦)
𝑏=
𝑛(∑𝑥 2 ) − (∑𝑥)2
(∑𝑦) − 𝑏(∑𝑥)
𝑎=
𝑛
Let us solve the given situation in the previous activity (Step Yes, Step Do!) using
these steps.
By doing Steps 1 and 2, you will make this four-column data table.
Number of General
xy x2
Absences (x) Average (y)
1 1 98 98 1
2 2 90 180 4
3 3 86 258 9
4 5 87 435 25
5 7 85 595 49
6 9 85 765 81
7 10 78 780 100
∑𝑥 = 37 ∑𝑦 = 609 ∑𝑥𝑦 = 3111 ∑𝑥 2 = 269
From the table of data, you will be able to determine the sum of x, y, xy, and
x2. These are the values that will be substituted into the formula to calculate the
slope and y-intercept.
𝑛=7 ∑𝑥 = 37 ∑𝑦 = 609 ∑𝑥𝑦 = 3111 ∑𝑥 2 = 269
𝒏(∑𝒙𝒚) − (∑𝒙)(∑𝒚)
𝒃=
𝒏(∑𝒙𝟐 ) − (∑𝒙)𝟐
7(3111) − (37)(609)
𝑏=
7(269) − (37)2
−756
𝑏=
514
(∑𝒚) − 𝒃(∑𝒙)
𝒂=
𝒏
609 + 54.39
𝑎=
7
663.39
𝑎=
7
From the previous activity (Step Yes, Step Do!), we obtained two equations of
the line by using two different pairs of points. Using those steps, you will be able to
determine the slope and y-intercept. Also, you will find the equation of the best-fit
line.
Best-Fit Line
X y xy x2
1 4 4 1
2 3 6 4
3 8 24 9
4 6 24 16
5 12 60 25
6 10 60 36
7 8 56 49
∑𝑥 = _______ ∑𝑦 = _________ ∑𝑥𝑦 = ______ ∑𝑥 = _______
2
Find the slope, y-intercept, and regression equation for the given data.
From the given table, list the values that must be substituted into the formula
on a separate sheet of paper.
𝒏(∑𝒙𝒚) − (∑𝒙)(∑𝒚)
𝒃=
𝒏(∑𝒙𝟐 ) − (∑𝒙)𝟐
7(234) − (28)(51)
𝑏=
7(140) − (28)2
210
𝑏=
196
(∑𝒚) − 𝒃(∑𝒙)
𝒂=
𝒏
51 − 1.07(28)
𝑎=
7
51 − 29.96
𝑎=
7
21.04
𝑎=
7
X y xy x2
1 98 1 1
2 90 180
3 86
5 87 435 25
7 85 595
9 85 81
10 80
∑𝑥 = ∑𝑦 = ∑𝑥𝑦 = ∑𝑥 2 =
Solve for the slope and y-intercept. Show your complete solutions.
X y xy x2
5 40
12 28
20 17
8 32
15 24
25 1
∑𝑥 = ∑𝑦 = ∑𝑥𝑦 = ∑𝑥 2 =
Solve for the slope and y-intercept. Then, find the equation of the regression line.
Show your complete solutions.
Fill in the blanks to complete the statements. Copy and answer on a separate sheet
of paper.
𝑛(∑𝑥𝑦) − (∑𝑥)(∑𝑦)
𝑏=
𝑛(∑𝑥 2 ) − (∑𝑥)2
Make a process flowchart showing the steps and formulas in calculating the slope
and y-intercept from a given set of data. Show your imagination and creativity. Use
long bond paper.
Rubric for Creative Process Flowchart
Standards 4 3 2 1
Multiple Choice. Choose the letter of the best answer. Write the chosen letter on a
separate sheet of paper.
1. What is the set of statistical method used to describe the relationship between
independent variables and a dependent variable?
a. regression analysis c. regression form
b. regression equation d. regression line
𝑛(∑𝑥𝑦)−(∑𝑥)(∑𝑦)
2. What can be computed using the formula: 𝑏 = ?
𝑛(∑𝑥 2 )−(∑𝑥)2
a. domain c. slope
b. range d. y-intercept
(∑𝑦)−𝑏(∑𝑥)
3. What can be computed using the formula: 𝑎 = ?
𝑛
a. domain c. slope
b. range d. y-intercept
x 1 2 3 4 5 6 7
y 2 6 4 8 12 10 12
12. What is the slope (b) of the regression equation based on the data table?
a. 0.83 b. 0.93 c. 1.07 d. 1.64
13. What is the y-intercept (a) of the regression equation based on the given data
set?
a. 0.83 b. 0.93 c. 1.14 d. 1.67
14. What is the equation of the regression line based on the given data?
a. 𝑦̂ = 1.14 + 1.64𝑥 c. 𝑦̂ = 0.83 + 0.93𝑥
b. ̂𝑦 = 1.64 + 1.14𝑥 d. 𝑦̂ = 0.93 + 0.83𝑥
15. Which of among the choices is the equation of a regression line based on the
data table below?
x 2 4 6 8 10 12 14
y 20 15 12.5 11.8 7.5 4 2
Additional Activities
Albacea, Zita VJ., Mark John V. Ayaay, Isidoro P. David, and Imelda E. De Mesa.
Teaching Guide for Senior High School: Statistics and Probability. Quezon City:
Commision on Higher Education, 2016.
Punzalan, Joyce Raymond B. Senior High School Statistics and Probability. Malaysia:
Oxford Publishing, 2018.
Sirug, Winston S. Statistics and Probability for Senior High School CORE Subject A
Comprehensive Approach K to 12 Curriculum Compliant. Manila: Mindshapers
Co., Inc., 2017.
Online Resources
Frost, Jim. “Choosing the Correct Type of Regression Analysis.” Accessed May 25,
2020. https://statisticsbyjim.com/regression/choosing-regression-analysis/
Parker, Mary. “Interpreting the Slope and Intercept in a Linear Regression Model.”
Accessed May 25, 2020. https://www.austincc.edu/mparker/1342/lessons/
less5-8/interpret_slope.pdf.
Rourke, Emily O. “Performance Based Learning and Assessment Task Tuition Cost
Activity.” Accessed May 25, 2020. https://www.radford.edu/rumath-
smpdc/Performance/src/Emily O’Rourke - Tuition Cost Activity.pdf.