I Regression line with zero slope and average as best prediction

AI Thread Summary
The discussion centers on a regression analysis where the outcome variable Y (number of likes) shows no linear relationship with the predictor variable X (number of comments), resulting in a best fit line with a zero slope. This indicates that the average value of Y serves as the best prediction, regardless of X. A question arises about the difference between the overall average of Y values and the average of Y values for specific X values, with clarification that these two averages may not always be numerically close due to sample variability. The importance of statistical significance in regression modeling is also emphasized, cautioning against including terms without solid justification. Overall, the conversation highlights the nuances of interpreting regression results when no linear relationship exists.
fog37
Messages
1,566
Reaction score
108
TL;DR Summary
Regression line with zero slope and average as best prediction
Hello,

I was considering some made up data ##(X,Y)## and a its best fit regression line. The outcome variable ##Y## is the number of likes and ##X## is the number of comments on a website.

We have 100 data points which spread in such a way that the best fit line has zero slope. This implies that there is no linear relationship between the variables ##X## and ##Y##. This also means that the average of ##Y## would be the best prediction for ##Y## regardless of the value of ##X##. It does not matter what the value of ##X## is, the best prediction for ##Y## would be equal to the average and have a constant value....

My question: here we are talking about taking the arithmetic average of ALL the ##Y## values from all different ##X## values, correct?
What about the average of the ##Y## values for the same ##X## value (assuming there is more than just one ##Y## value for each ##X## value)? These two averages should always be numerically close, correct?

Thank you!
 
Physics news on Phys.org
Y does not depend on X value, so I could not infer anything about a particular Y. Unless there is a nonlinear relationship.
 
fog37 said:
TL;DR Summary: Regression line with zero slope and average as best prediction

Hello,

I was considering some made up data ##(X,Y)## and a its best fit regression line.
Be careful with "best" here. It is the best that can be done with solid statistical significance. If you "throw everything at the wall to see what sticks" then you can often get very good fits to the data that has no statistical significance at all. You want to be able to convince people, even very skeptical ones, that every term in your model probably belongs there. A good linear regression application should only include terms that show a statistically significant reason to be included
fog37 said:
The outcome variable ##Y## is the number of likes and ##X## is the number of comments on a website.

We have 100 data points which spread in such a way that the best fit line has zero slope. This implies that there is no linear relationship between the variables ##X## and ##Y##. This also means that the average of ##Y## would be the best prediction for ##Y## regardless of the value of ##X##. It does not matter what the value of ##X## is, the best prediction for ##Y## would be equal to the average and have a constant value....

My question: here we are talking about taking the arithmetic average of ALL the ##Y## values from all different ##X## values, correct?
Yes. They are all involved in the linear regression calculations.
fog37 said:
What about the average of the ##Y## values for the same ##X## value (assuming there is more than just one ##Y## value for each ##X## value)? These two averages should always be numerically close, correct?
No. That is too strong a statement. In the 100 data points that you collected for your sample, there might be values of ##X## where that sample happened to be off. In fact, with only 100 samples, if you collected data at 10 ##X## values, you can expect the ##Y## average of some of those ##X## value sets to be off more than others.
 
Last edited:
Back
Top