psychology 302
1
Bivariate Regression
Straight Lines
¾ Simple way to describe a relationship ¾ Remember the equation for a straight line?
z y = mx + b ¾ What is m? What is b?
¾ How do you compute the equation?
(x1,y1)
(x2,y2)
What if every point is not on the line?
¾ Straight line may be good description even if not all points are on the line
Computing the line when points are scattered
¾ = a + bX ¾ Y-hat means predicted value of Y ¾ Computing the slope:
¾ b = 𝑋−𝑋 𝑌−𝑌 𝑋−𝑋
¾ I ill ri e/r n, b no e al o consider variability in X and Y
Computing the intercept
¾ a = - bX ¾ Need o pl g in al e of (X, ) ¾ Can e j an Y or X!
z Line would be very different depending on which ones you chose
¾ Must have X and Y that we know are on the line z mean of X and mean of Y
2
Computing the intercept
¾ Regression line will always go through the mean of X and mean of Y
¾ A = 𝑌 - b𝑋
¾ Le r it with our example from before
X (# of kids)
Y (hours of
housework) 𝑋 𝑋 𝑌 𝑌 𝑋 𝑋 𝑌 𝑌 𝑋 𝑋 1 1 -1.75 -2.5 4.375 3.063
1 2 -1.75 -1.5 2.625 3.063
1 3 -1.75 -0.5 0.875 3.063
2 6 -0.75 2.5 -1.875 0.563
2 4 -0.75 0.5 -0.375 0.563
2 1 -0.75 -2.5 1.875 0.563
3 5 0.25 1.5 0.375 0.063
3 0 0.25 -3.5 -0.875 0.063
4 6 1.25 2.5 3.125 1.563
4 3 1.25 -0.5 -0.625 1.563
5 7 2.25 3.5 7.875 5.063
5 4 2.25 0.5 1.125 5.063
MX=2.75 MY=3.5 = 0 = 0 = 18.5 = 24.25
Computing the equation
¾ b = . .
.76
¾ a = 3.5 - .76(2.75) ¾ = 1.41
¾ = 1.41 + .76X
Interpreting the coefficients ¾ Slope
z For a one unit increase in X, we predict a b unit increase in Y
What does that mean for this study?
¾ Intercept z The predicted value of Y when X = 0
What does that mean for this study?
Interpreting the coefficients ¾ Slope
z For each additional child, we predict parents will do an additional .76 hours of housework per day
¾ Intercept z For a family with zero kids, we predict they
will do 1.41 hours of housework per day
Drawing the regression line
¾ Need to plot two points z 𝑋, 𝑌 z Y-intercept