# Thread: Using linear regression information to make a prediction

1. ## Using linear regression information to make a prediction

A regression was run to determine if there is a relationship between hours of TV watched per day (x) and number of situps a person can do (y).

The results of the regression were:
y=ax+b a=-0.864 b=37.082 r2=0.850084 r=-0.922
Use this to predict the number of situps a person who watches 4.5 hours of TV can do (to one decimal place.

I plugged in 4.5 into the equation and got 40.9. The answer is wrong. What am I doing wrong?

2. ## Re: Using linear regression information to make a prediction

Hey DasRabbit.

Here is the results using R:

> -0.864*4.5 +37.082
[1] 33.194

3. ## Re: Using linear regression information to make a prediction

hey I am having a similar problem and have scoured for someone to show me how it's done. I do not get where the r's com into the equation.

4. ## Re: Using linear regression information to make a prediction

The "r" does not come into the equation at all!

DasRabbit wrote
The results of the regression were:
y=ax+b a=-0.864 b=37.082 r2=0.850084 r=-0.922
That is y= -0.864x+ 37.082, and then wrote
Use this to predict the number of situps a person who watches 4.5 hours of TV can do (to one decimal place.

I plugged in 4.5 into the equation and got 40.9. The answer is wrong. What am I doing wrong?
And he simply did the arithmetic wrong y(4.5)= -0.864(4.5)+ 37.082= -3.888+ 37.082= 33.194.

It looks like he forgot the "-" on a= -0.865. If it were +0.865(4.5)+ 37.082= 3.888+ 37.082, then it would be 40.97.

A "linear regression" replaces some unknown function with a linear approximation. The "r" gives an estimate of how accurate that liner approximation is likely to be.