2. Table of
Contents!
Overview
EQUATION OF A LINE
Assignment
Desmos Classroom
Line of Best Fit
Standards and Lesson
Objectives
Summarize, represent, and interpret data on two
categorical and quantitative variables
6. Represent data on two quantitate variables on
a scatter plot, and describe how the variables
are related*
a. Fit a function to the data; use functions
fitted to data to solve problems in the context
of the data. Use given functions or choose a
function suggested by the context. Emphasize
linear, quadratic, and exponential models. *
b. Informally asses the fit of a function by
plotting and analyzing residuals. *
c. Fit a linear function for a scatter plot that
suggest a linear association. *
About the Topic
We will introduce two different
ways of approaching line of best
fit. An informal way and a formal
way.
4. In linear regressions it is assumed that
the relationship between two quantitative
variables x and y is modeled through a
linear equation.
● The equation of a line as we know is
Y= mx+b
● In which m is the slope and b our y-
intercept.
● Slope represented by rise over run,
or in other words the change in y
over change in x
● Y – intercept is the value of y when
x=0.
Introduction
5. —Israelmore Ayivor
“Life is a linear equation in which
you can't cross multiply! If you
think you can do it, you can do it.
If you think you can't do it, you
can't do it. It's a simple formula!”
6. Linear regression,
understanding line of best
fit, residuals
● Finding a line that is the best fit
to the data.
● Determining if the line found is the
line of best fit.
● Understanding the relationship this
line creates between the two
quantitative variables.
● Once the line of best fit has been
determined we are able to predict a
quantity of the response variable
given the explanatory variable.
What Is This
Topic About?
7. Definition of
Concepts
Linear Regression
The statistical method for
fitting a line to data where
the relationship of two
variables, x and y, can be
modeled by a straight line
with some residuals
Residuals
The difference between
the observed value of
the dependent variable
and the predicted
variable,
Residual = y-y*
X and Y variable
X represents the explanatory
variable and the Y
represents the response
variable.
Scatterplot
This graph shows the
relationship between the
two quantitative variables
measured.
8. Practical Uses
of This Subject Businesses
Linear regression
helps business
understand
relationship of
advertising spending
and revenue
Medical Research
Linear regression is
often used to see
relationship between
different drug
dosages and blood
pressure, sugar
levels, etc.
9. STOP
Let’s see some
statistics live.
What does this video portray?
How is it related to what we
are learning?
https://www.youtube.com/watch?v=jbkSRLYSojo&t=218s
10. How to determine if a line
is THE line of best fit
Step 1 Step 2 Step 3 Step 4
Find the
equation of the
line (eyed)
Determine if
the sum is the
minimum
Find the
residuals of
the data
Take the sum of
the square of
the residuals
11. Ex. The
guessed line.
4. Found the residuals of the line
Graph of residuals on the guessed line
5. Calculated the sum of the squares of
the residuals, result of 10.9.
0
2
4
6
0 5 10 15
Time
awake
(min)
Times woken up
Time awake in middle of night
(minutes)
1. Interpret scatter plot: Relationship of time awake (in
minutes) given the number of times woken up.
2. We eye (guess) a line of best fit and plot it (black line)
3. Calculate the estimated line of best fit, using y=mx+b,
in which case we use two points (2,1), (7,1.8) to find
m and b.
𝑚 =
𝑦2−𝑦1
𝑥2−𝑥1
=
1.8−1
7−2
=
0.8
5
= 0.16
1.8 = 0.16 7 + 𝑏
𝑏 = 0.68
𝑦∗
= 0.16𝑥 + 0.68
X-Values Y-Values
1 0
2 1
3 2
4 0.5
5 3
6 0.5
7 1.8
8 0.7
9 4
10 2
12. Ex. The line of
best fit.
0
2
4
6
0 5 10 15
Time
awake
(min)
Times woken up
Times woken up in middle of sleep
(minutes)
Most calculators have a linear regression feature
that helps calculate the line of best fit for a set of
data. In which case provides you with the equation
of the line with the minimum sum of squared
residuals. For our data set above, the line of best
fit is described by
𝑦 = 0.205𝑥 + 0.42
The sum of the residuals of this respected
line equaled to 10.726, which is only 0.2
away from the one we eyed. Therefore, we
can conclude that although going through
the most points is not the best method to
approach it also is not the worse.
Graph of the residuals of The line of best fit
13. Let us wrap up by
making a prediction?
• We now have a line of best fit for
the data we observed,
𝑦 = 0.205𝑥 + 0.42
• Let us create a prediction to
understand the relationship of this
data.
• Allow x to be 10, what does this
mean?
• What is the value of y? What is the
interpretation of y?
If we have x = 10, meaning we woke up
a total of 10 times in the night, thanks
to the line of best fit we can predict how
long we were awake. We find that
y = 2.42, meaning that if we woke up a
total of 10 times at night we were
awake for a total of 2.42 minutes.
There is positive relationship on the
number of times we wake up in the
middle of the night with the total time
we are awake during the night.
14. Let us now organize
all that we have
learned today using a
KWL chart.
I ask that each student fill out this
chart. I will be providing you with a
clean copy right now. I want a minimum
of three take always for each column. I
will be providing you with an example
of what I am asking, but you cannot
steal what is on the KWL chart I
created.