In a previous lecture on Pearson's r, we found two sets of data to be highly correlated:
If we know that two variables are strongly correlated, we can use one variable to predict the other using the following equations:
Here, we first calculate beta1 and beta0 and place them in the top equation. Then, if we plug an x into the equation, we can predict what our y value will be.
The stronger your correlation (that is, the closer r is to -1 or 1), the more accurate your prediction will be.
First, we solve for beta1:
We then use beta1's value to solve for beta0:
Now, putting those values into the original equation, we have our completed regression equation:
Predict the yearly income of someone who is 33 years old.
We would expect someone who is 33 years old to make approximately $36,963 a year.