Welcome to an example on how to use Desmos
to preform linear regression and also how to use Desmos
to make a prediction using the line of best fit.
The following is data for the first and second quiz scores
for eight students in a class.
We want to use a data to determine the line of best fit.
Plot the points of the coordinate plane.
Graph the line of best fit over the data.
And then finally, use the line of best fit
to predict the second quiz score if a student scores a 40
on the first quiz.
And, we're asked to round to the nearest whole number.
So, the first step is to go to Desmos.com
and launch the calculator.
So here's Desmos.com, we're going to click
on this red button to Launch the Calculator.
Next, we want to enter the data
and there's two ways to do this.
To enter the data by hand, we would click Add Item
and select the Table.
But, if the data is in Excel in our case in Math AS,
we can simply copy and paste all the data in one step.
To do this, we go to our question or Excel,
and we copy the data.
So, we select the data in the table here.
And, notice how we can include the column titles as well.
To copy this we press Control + C,
or if we want, right-click and select Copy.
We go back to Desmos, click in this first cell,
and paste the table here by pressing Control + V.
Notice how once we do this, the table shows up
and the points have already been plotted
on the coordinate plane here on the right,
and the axis have already been scaled appropriately.
If we want to change the color of the points
we can do that as well by clicking Edit List,
Y one, and then select the color that we want.
Let's select red and now we click Done.
Notice how now the points are red.
Now, we can preform the linear regression.
To do this we click Add Item and select F of X expression.
And, because we have X sub one and Y sub one,
we want to enter Y sub one as Y one,
and then for regressed against we use the Twiddle
which is Shift + apostrophe from the keyboard.
And, then M times X of one plus B.
So, M X one plus B,
and notice when we enter this, the linear regressions
already preformed where the slope is 0.858
and B the vertical intercept is 2.1.
Notice how we're also given the coloration coefficient
which is 0.987, because this is close to the positive one.
We know this linear equation is a good fit for the data
and the line has a positive slope.
Notice how it also provides the residuals
which we can plot by clicking this button here.
The residuals of the difference between the Y values
from the table and the Y values from the line of best fit.
Because we're asked to graph this line of best fit
on the coordinate plane, if the cursor is N Y one,
if we move the mouse over the vertical intercept,
it gives us the coordinance of zero comma 2.1.
It also give us the horizontal intercept of
negative 2.44 comma zero.
If we click anywhere else on the orange line,
the coordinance up here, so we can use any other point
on the line of best fit to help us graph this
on the coordinate plane.
For example, we could us this point here
with coordiance 30 comma 27.84
to help us graph the line of best fit
on our own coordinate plane.
Now, let's make the prediction for the second quiz score
when the first quiz score is 40.
To do this, we'll go back up to Add Item,
and select F of X expression.
And, we'll enter the equation for the line of best fit,
which Y equals 0.858
times X plus 2.1.
Now from here we're going to go back up to Edit List
and then for the equation that we just entered
we're going to click here to convert to a table.
Once a table appears using our line of best fit,
we can enter any X value
and the corresponding Y value or output
will show on the table.
So, we'll go to the first row, delete negative two,
and enter 40 for X and notice how the Y value,
or second quiz score would be approximately 36.42
rounding to the nearest whole number,
we'd predict the second quiz score to 36.
Now, going back to our question,
remember we have a line of best fit of Y equals
0.858 X plus 2.1.
Now, the question does ask to plot the points
on the coordinate plane which I've already done.
Next, we'll go into sketch the line of best fit
over the data.
To do this in Math AF we first select the line tool here
then we click on one point on the line.
Let's use the vertical intercept
which would be zero comma 2.1,
which would be approximately here.
And, we click on the second point
and remember we found from Desmos
we could use the second point with coordinance
30 comma 27.84.
So, 30 27.84 would be approximately here.
And therefore, the line of best fit
would pass through these two points.
Let's also graph this line in Math AS.
So, we first select the line tool,
then we'll click on the vertical intercept
of 2.1 approximately here.
Of course, we can use any two points on our line
but this is a convenient one to use.
And the second point that we found was
30 comma 27.84.
Which would be approximately here.
So, a single click for the first point.
Single click for the second point.
To make any adjustments, notice how if we move
the mouse over one of the points,
this double arrow appears,
and we could adjust the line as needed.
And, finally for the last question.
It says use the line of best fit to predict the second quiz
score if a student scores a 40 on the first quiz.
And again, going back to Desmos,
we already determined
we would predict the second quiz score to be 36
to the nearest whole number.
So, the second quiz score
is predicted to be 36.
I hope you found this helpful.