STAT 2103 Lecture Notes - Lecture 20: Dependent And Independent Variables, Scatter Plot
STAT 2103 – Lecture 20 – Simple Linear Regression
Examining Relationships
• Start with a graph
• Look for an overall pattern and deviations from that pattern
• Add numerical descriptions of the data
• Correlation measures the strength and direction of the linear relationship between 2
quantitative variables
• If the scatterplot shows a linear pattern summarize the pattern with a line
Example:
Following is data on 50 houses in Ames, Iowa.
Selling Price S F Age
268380 1897 1
131000 1157 15
112000 1024 35
112000 935 35
122000 1236 39
127900 1248 32
157600 1620 33
135000 1124 33
145900 1248 35
126000 1139 39
142000 1329 40
107500 1040 45
110000 951 42
500 1500 2500
50000
150000
250000
350000
Square Footage ($)
Selling Price
• Overall pattern
o Positive association
o Linear relationship
o r = 0.835
Regression Line
• Describe how a response variable, y changes as an explanatory variable, x changes
(y=mx+b, y=a+bx)
• Must have an explanatory and response relationship
• Use the regression line for prediction
Ex: If the square footage is 1500, what do we predict as the selling price?
• slope (b1)
o amount y changes when x changes by 1
• intercept (b0)
o value of y when x = 0
• prediction
o substitute an x-value into the equation
Regression Formula
xbby
10
ˆ
+=
)y ,x(point ethrough th
goes line regression The
:intercept
:slope
10
1
xbyb
s
s
rb
x
y
-=
=
Document Summary
Stat 2103 lecture 20 simple linear regression. Examining relationships: start with a graph, look for an overall pattern and deviations from that pattern, add numerical descriptions of the data, correlation measures the strength and direction of the linear relationship between 2 quantitative variables. If the scatterplot shows a linear pattern summarize the pattern with a line. Following is data on 50 houses in ames, iowa. 5001500250050000150000250000350000square footage ($)selling price overall pattern: positive association, linear relationship, r = 0. 835. Regression line: describe how a response variable, y changes as an explanatory variable, x changes (y=mx+b, y=a+bx, must have an explanatory and response relationship, use the regression line for prediction. Regression formula xbby10 +=)y ,x(point ethrough th goes line regression the:intercept:slope101xbybssrbxy-==fitted line plot. Selling price= 4795. 40 + 92. 8022 (1500) = ,440. 50015002500 50000150000250000350000square footaselling pricselling pric = 4795. 40 + 92. 8022 square footas = 30344. 2 r-sq = 69. 6 % r-sq(adj) = 69. 0 %regression plot. Use excel: data > data analysis > regression.