Chapter 5 - Correlation and Regression
Chapter 5 - Correlation and Regression
Correlation
Scatter Diagrams
Sx y
r = , |r | ⩽ 1
Sx x Syy
∑ x∑ y
∑ ∑
Sx y = (x − x̄ )(y − ȳ) = xy −
n
2
( ∑ x)
(x − x̄ )2 = x2 −
∑ ∑
Sx y =
n
Dependent Variables
• Also called response variables
• Values determined by the values of the independent variable
• Plotted along the y-axis
Causal Relationship
• Two variables are in a causal relationship if a change in one variable causes a change in the other
variable.
• Use common sense to discern whether two variables are in a causal relationship.
Linear Regression
Requirements for using linear regression
• Strong correlation ( | r | close to 1)
• Linear correlation (Data resembles a straight line in the scatter plot)
a = ȳ + b x̄
Interpreting y = a + bx
a is the value of y when x is zero.
b is the amount by which y increases for an increase of 1 in x.
You must write your interpretation in context − copy out the question word for word.
Coding and Regression Lines
Given: a coded to x
b coded to y
dataset for x and y
Solution:
1. Find regression line for x and y
2. Convert a into x
3. Find the value of y with the regression line and the value of x
4. Convert y into b