34-Linear Regression

CC Algebra I
Lesson 34-Scatter Plots and Lines of Best Fit
Name: __________________________
Date: _________________
Aim How do we use the calculator to find linear regression?
Warm Up: Plot the following points on the graph provided.
DO NOT CONNECT THE POINTS!



____________________ are similar to line graphs in that each graph uses the x-axis
and the y-axis to plot data points.
They show how much one variable is affected by another.
The relationships between two variables is called their ____________________.
1
Correlation

The _________________________ or ____________ is a number between -1 and +1 that
tells whether or not there is a linear relationship between two variables.
***The closer the correlation coefficient is to -1 or 1, the closer the data fits a given curve. ***
Types of Correlations
________________________
________________________
______________________

A _____________________________ is drawn on a scatter plot to show the linear trend in
a set of paired data.

The _______________________ the correlation, the closer the points are to the line.
2
Steps for Calculating Regression Equations
1. 2nd 0 scroll down and turn diagnosticsOn
2. Press the “STAT” button
3. Select “Edit”
Here you will see vertical columns with
L1 (list 1), L2 (list 2) etc...
4. Enter the data
The x values goes in L1 and y values go into L2.
5. Press the “STAT” button and use the right arrow to move over to "CALC" (on the right)
6. Scroll down to "LinReg(ax + b)" or "ExpReg" (depending on the problem)
7. Make sure the Xlist says L1 and the YList says L2. Scroll down to “Calculate” and once
it is highlighted, hit ENTER.
Steps 2 &3
Steps 3 & 4
Steps 5 &6
Step 7
Example: What is the regression model for the following function?
3
Now Try: In a mathematics class of ten students, the teacher wanted to determine how a
homework grade influenced a student’s performance on the subsequent test. The homework grade
and subsequent test for each student are given in the accompanying graph.
a) Determine the linear relationship for x (homework grade) versus y (test grade), based on the data
given. Round to the nearest thousandth
b) A new student comes to the class and earns a homework grade of 78.
Based on the equation in part a, what grade would the teacher predict
the student would receive on the subsequent test, to the nearest integer?
2) Since 1990, fireworks usage nationwide has grown, as shown in the accompanying table, where t
represents the number of years since 1990, and p represents the fireworks usage per year, in
millions of pounds.
a) Find the equation of the linear regression for this set of data, where t is the independent variable.
Round values to four decimal places
b) Using this equation, determine in what year fireworks usage would have reached 90 million
pounds.
c) Base on this linear mode, how many millions of pounds of fireworks would be used in the year
2008? Round your answer to the nearest tenth
4
5
1.
Which equation most closely represents the line of best fit for the scatter plot below?
1)
2)
3)
4)
2.
The table below shows the number of prom tickets sold over a ten-day period.
Plot these data points on the coordinate grid below. Use a consistent and appropriate scale. Draw a
reasonable line of best fit and write its equation.
6
RESIDUAL:
On the graph above highlight the residual with a highlighter
Prom Ticket Sales
Days
x
Number of
Prom Tickets
sold y
1
30
2
35
5
55
7
60
10
70
Predicted
Value
Residual
Actual-Predicted
Looking at the graph, does the residual plot suggest a linear relationship?
Explain.
What is the absolute value of the residuals added together?
7
Directions: Complete each table using the given values. A calculator will be very useful.
(Round answers to one decimal place) Be sure to label the independent and dependent
variables, along with the units.
1.
a) Linear Regression equation: y = 0.49x
x
y
5
3
10
4
15
9
20
7
25
13
30
15
Predicted
Value
Residual Value
Actual-Predicted
b) Create RESIDUAL PLOT
c) Does the residual plot suggest a linear relationship?
Explain.
d) What is the absolute value of the residuals added together? Is the line a good fit?
8
2.
a) Linear Regression equation:
x
y
0
14
1
7
2
2
3
-1
4
-2
Predicted
Value
Residual Value
Actual-Predicted
5
b) Create RESIDUAL PLOT
c) Does the residual plot suggest a linear relationship?
Explain.
d) What is the absolute value of the residuals added together? Is the line a good fit?
9
3.
The number of hours spent on math homework each week and the final exam grades for twelve students
in Mr. Dylan's algebra class are plotted below.
Based on a line of best fit, which exam grade is the best prediction for a student who spends about 4
hours on math homework each week?
4.
A scatter plot was constructed on the graph below and a line of best fit was drawn.
What is the equation of this line of best fit?
10
5.
Megan and Bryce opened a new store called the Donut Pit. Their goal is to reach a profit of $20,000 in
their 18th month of business. The table and scatter plot below represent the profit, P, in thousands of
dollars, that they made during the first 12 months.
Draw a reasonable line of best fit. Using the line of best fit, predict whether Megan and Bryce will
reach their goal in the 18th month of their business. Justify your answer.
11
6.
The table below shows the attendance at a museum in select years from 2007 to 2013.
State the linear regression equation represented by the data table when
is used to represent the year
2007 and y is used to represent the attendance. Round all values to the nearest hundredth. State the
correlation coefficient to the nearest hundredth and determine whether the data suggest a strong or weak
association.
7. Erica, the manager at Stellarbeans, collected data on the daily high temperature and revenue from coffee
sales. Data from nine days this past fall are shown in the table below.
State the linear regression function,
, that estimates the day's coffee sales with a high temperature of
t. Round all values to the nearest integer. State the correlation coefficient, r, of the data to the nearest
hundredth. Does r indicate a strong linear relationship between the variables? Explain your reasoning.
12
8. The data table below shows the median diameter of grains of sand and the slope of the beach for 9
naturally occurring ocean beaches.
Write the linear regression equation for this set of data, rounding all values to the nearest
thousandth. Using this equation, predict the slope of a beach, to the nearest tenth of a degree, on a
beach with grains of sand having a median diameter of 0.65 mm.
13
Name: __________________________
CC Algebra I
Lesson 34-Scatter Plots and Lines of Best Fit
Date: _________________
Exit Slip
Match each graph to the correct correlation descriptions.
r=0
r=1
r = -1
__________
___________
__________
Name: __________________________
CC Algebra I
Lesson 34-Scatter Plots and Lines of Best Fit
Date: _________________
Exit Slip
Match each graph to the correct correlation descriptions.
r=0
r=1
__________
___________
r = -1
__________
14