Disclaimer: this is directly related to a homework problem. The example I am giving is based off the homework problem (because I am more interested in how to solve it than in what the answer is).

Data given:

  • Number of people surveyed: 50
  • Sum of x values: 1500
  • Sum of y values: 500
  • Point on least squares regression line: (5, 0)

Problem: What is the least squares regression line's predicted y-value at x = 25?

What I've done so far: Based off of the count and sum, I was able to get the mean for x (30) and for y (10). However, it is here that I get stuck. I only know how to calculate the least square regression line (LSRL) when given Sx and Sy (std dev of x and y). But I cannot calculate the std dev of either without having the actual data points!

After some thought, I realized that since I know one point of the LSRL, I could figure out any other point along the line if I knew the slope. But then I realized I do not know how to calculate the slope without first knowing Sx and Sy.

I have reached the conclusion that there are only three possible reasons I do not yet have the answer to this question...

  1. There is a way to calculate the std dev from this data, but I don't know it.
  2. There is another way to calculate the second point without using std dev, but I don't know it.
  3. My professor forgot to give us the data table, and without that I am unable to solve this.
  • $\begingroup$ It's number two. $\endgroup$
    – Fojtasek
    Oct 25 '11 at 2:03
  • $\begingroup$ @Fojtasek haha, yeah. I just figured it out and answered my own question. I think the actual act of writing down step by step all the issues I was having is what allowed me to realize the answer XD $\endgroup$
    – Moses
    Oct 25 '11 at 2:08

As it turns out, the answer to this question is quite simple, and I had an aha moment shortly after posting this question that revealed the answer to me.

A least squared linear regression model always goes through the point (x-bar,y-bar). Knowing this fact as well as a second point on the line, I was able to solve the problem.

First calculate the slope:

b0 = (y2 - y1) / (x2 - x1)

Then calculate the y-intercept:

b1 = -b0*x + y

Finally, plugin in the desired x-value. Now that you have the slope and y-int, so you are able to solve for any point on the line by plugging in the x or y value into the y=mx+b formula.

~Hope this helps someone else who also had this question~


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.